Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
RANLIB = @RANLIB@
STRIP = @STRIP@

LEX = @LEX@
BISON_BYACC = @BISON_BYACC@
Expand Down Expand Up @@ -642,6 +643,13 @@ install: install-shared install-archive libpcap.pc pcap-config @INSTALL_RPCAPD@
$(INSTALL_DATA) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
$(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done

install-strip: install
VER=`cat $(srcdir)/VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
$(STRIP) $(DESTDIR)$(libdir)/libpcap.so.$$VER 2>/dev/null || :; \
$(STRIP) $(DESTDIR)$(libdir)/libpcap.$$VER.dylib 2>/dev/null || :; \
$(STRIP) $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER 2>/dev/null || :

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strip allows to specify more than one file argument, so with this approach there is no need to have three separate invocation.

Alternatively, since the "install-shared" target is parametrised on DYEXT, it could make more sense to parametrise "install-strip" the same way, then strip would apply to exactly the files that have been just installed.

On a separate note, this change does not strip rpcapd.


install-shared: install-shared-$(DYEXT)
install-shared-so: libpcap.so
[ -d $(DESTDIR)$(libdir) ] || \
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2350,6 +2350,7 @@ test "x$enable_shared" = "xno" && DYEXT="none"

AC_PROG_RANLIB
AC_CHECK_TOOL([AR], [ar])
AC_CHECK_TOOL([STRIP], [strip], [:])

AC_PROG_LN_S
AC_SUBST(LN_S)
Expand Down