From: Alan T. DeKok Date: Wed, 18 May 2011 09:38:05 +0000 (+0200) Subject: Move the "install binaries" code to rules.mak X-Git-Tag: release_3_0_0_beta0~823 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15250fc792d0f4c64bdff9e2cd890526161878c5;p=thirdparty%2Ffreeradius-server.git Move the "install binaries" code to rules.mak This simplifies the sub-makefiles, and means it's harder to get things wrong --- diff --git a/src/modules/rlm_dbm/Makefile.in b/src/modules/rlm_dbm/Makefile.in index 3e901fd8587..5ee66fb9c76 100644 --- a/src/modules/rlm_dbm/Makefile.in +++ b/src/modules/rlm_dbm/Makefile.in @@ -8,7 +8,7 @@ HEADERS = RLM_UTILS = @dbm_utils@ RLM_CFLAGS = @dbm_cflags@ RLM_LIBS = @dbm_ldflags@ -RLM_INSTALL = @dbm_install@ +RLM_INSTALL = include ../rules.mak @@ -19,12 +19,3 @@ rlm_dbm_parser: rlm_dbm_parser.lo $(LIBRADIUS) rlm_dbm_cat: rlm_dbm_cat.lo $(LIBRADIUS) $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(RLM_LDFLAGS) \ -o $@ $^ $(RLM_LIBS) $(LIBS) - -# -# Install the utility programs in the bin directory. -# -rlm_dbm_install: rlm_dbm_cat rlm_dbm_parser - $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) \ - rlm_dbm_cat$(EXEEXT) $(R)$(bindir) - $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) \ - rlm_dbm_parser$(EXEEXT) $(R)$(bindir) diff --git a/src/modules/rlm_eap/Makefile.in b/src/modules/rlm_eap/Makefile.in index 5576294c0d4..de4e0bdd27b 100644 --- a/src/modules/rlm_eap/Makefile.in +++ b/src/modules/rlm_eap/Makefile.in @@ -37,7 +37,6 @@ radeapclient.lo: radeapclient.c $(HEADERS) install-subdirs: @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=install common - $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) radeapclient$(EXEEXT) $(R)$(bindir) .PHONY: common $(RLM_SUBDIRS) diff --git a/src/modules/rlm_ippool/Makefile.in b/src/modules/rlm_ippool/Makefile.in index a9f9fb2f958..a3613d24acd 100644 --- a/src/modules/rlm_ippool/Makefile.in +++ b/src/modules/rlm_ippool/Makefile.in @@ -8,7 +8,7 @@ HEADERS = RLM_UTILS = @ippool_utils@ RLM_CFLAGS = @ippool_cflags@ RLM_LIBS = @ippool_ldflags@ -RLM_INSTALL = @ippool_install@ +RLM_INSTALL = include ../rules.mak @@ -22,9 +22,3 @@ rlm_ippool_tool.8: rlm_ippool_tool.pod pod2man --release=" " --date="October 2nd, 2003" \ --center="FreeRADIUS Daemon" --section=8 \ rlm_ippool_tool.pod > rlm_ippool_tool.8 - -# Install binary files into the bin directory -rlm_ippool_install: rlm_ippool_tool rlm_ippool_tool.8 - $(INSTALL) -m 644 rlm_ippool_tool.8 $(R)$(mandir)/man8 - $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) \ - rlm_ippool_tool$(EXEEXT) $(R)$(bindir) diff --git a/src/modules/rlm_mschap/Makefile b/src/modules/rlm_mschap/Makefile index d2d5813bee5..3fd2fd9a26e 100644 --- a/src/modules/rlm_mschap/Makefile +++ b/src/modules/rlm_mschap/Makefile @@ -11,7 +11,7 @@ RLM_CFLAGS = RLM_LDFLAGS = RLM_LIBS = RLM_UTILS = smbencrypt -RLM_INSTALL = smbencrypt-install +RLM_INSTALL = # over-ride the previous assignment if we're not building anything include ../rules.mak @@ -21,8 +21,3 @@ $(LT_OBJS): $(HEADERS) smbencrypt: smbencrypt.lo smbdes.lo $(LIBRADIUS) $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(RLM_LDFLAGS) \ -o $@ $^ $(RLM_LIBS) $(LIBS) - -smbencrypt-install: - $(INSTALL) -d -m 755 $(R)$(bindir) - $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) \ - smbencrypt$(EXEEXT) $(R)$(bindir) diff --git a/src/modules/rules.mak b/src/modules/rules.mak index e2098956557..d1a286f98c2 100644 --- a/src/modules/rules.mak +++ b/src/modules/rules.mak @@ -174,3 +174,9 @@ install: rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la; \ ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la || exit $$?; \ fi +ifneq ($(RLM_UTILS),) + $(INSTALL) -d -m 755 $(R)$(bindir) + for x in $(RLM_UTILS); do \ + $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) $$x$(EXEEXT) $(R)$(bindir); \ + done +endif