Actions
Bug #13526
closedcmd/availdevs always rebuilds
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
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.
Updated by Gordon Ross over 1 year ago
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.
Updated by Gordon Ross over 1 year ago
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
Updated by Gordon Ross over 1 year ago
Testing: cd $SRC/cmd/availdevs
make install
make install
2nd command does nothing.
Updated by Electric Monk over 1 year ago
- 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>
Actions