Bug #13526
closed
cmd/availdevs always rebuilds
Added by Gordon Ross over 1 year ago.
Updated over 1 year ago.
Description
cd $SRC/cmd/availdevs
make ; make
Note that it always rebuilds. "make -d" says it's because the command changed.
This has to do with the conditional assignment of LDLIBS
all install := LDLIBS += -lxml2
(which is an unfortunate practice, given how it causes problems like this).
That was apparently done originally because we didn't have a lint lib for xml2.
No longer relevant now that we don't run lint anymore.
I'm not sure how many other conditional assignments of LDLIBS might exist.
If anyone is inclined to search them out, perhaps they could be fixed along with this.
Maybe the conditional assignments are OK if done differently. This seems to work:
diff --git a/usr/src/cmd/availdevs/Makefile b/usr/src/cmd/availdevs/Makefile
index dfa150f6c9..ecfa9e0974 100644
--- a/usr/src/cmd/availdevs/Makefile
+++ b/usr/src/cmd/availdevs/Makefile
@@ -38,7 +38,7 @@ INCS += -I$(ADJUNCT_PROTO)/usr/include/libxml2
#
LDLIBS += -lzfs_jni -lnvpair -lzfs
NATIVE_LIBS += libxml2.so
-all install := LDLIBS += -lxml2
+$(PROG) := LDLIBS += -lxml2
CPPFLAGS += $(INCS) -D_LARGEFILE64_SOURCE=1 -D_REENTRANT
$(NOT_RELEASE_BUILD) CPPFLAGS += -DDEBUG
- Description updated (diff)
Testing: cd $SRC/cmd/availdevs
make install
make install
2nd command does nothing.
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 5fbc1fe0da7f34cf8155bf7624c94583cc98e47c
commit 5fbc1fe0da7f34cf8155bf7624c94583cc98e47c
Author: Gordon Ross <gordon.ross@tintri.com>
Date: 2021-03-18T00:58:51.000Z
13526 cmd/availdevs always rebuilds
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Andy Fiddaman <andy@omnios.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Also available in: Atom
PDF