From: Alan T. DeKok Date: Thu, 29 Dec 2011 22:50:18 +0000 (-0500) Subject: Use correct method of recursing into subdirs X-Git-Tag: release_2_2_0~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=892e4224e2438910db275263ea45d96f498e8774;p=thirdparty%2Ffreeradius-server.git Use correct method of recursing into subdirs Since commit 0347cacfe0f470353, we have a better way of recursing into subdirs. Having an explicit test for $(RLM_SUBDIRS), and then manually recursing into them is wrong. It causes modules like rlm_eap to be built twice. Instead, remove the test for $(RLM_SUBDIRS), and make $(TARGET).la depend on $(RLM_SUBDIRS) --- diff --git a/src/modules/rules.mak b/src/modules/rules.mak index e2098956557..7c213d8bab4 100644 --- a/src/modules/rules.mak +++ b/src/modules/rules.mak @@ -113,14 +113,13 @@ endif WHERE=$(shell pwd) build-module: $(TARGET).la $(RLM_UTILS) - @[ "x$(RLM_SUBDIRS)" = "x" ] || $(MAKE) $(MFLAGS) WHAT_TO_MAKE=all common @[ -d $(top_builddir)/src/modules/lib/.libs ] || mkdir $(top_builddir)/src/modules/lib/.libs for x in .libs/* $^; do \ rm -rf $(top_builddir)/src/modules/lib/$$x; \ ln -s $(WHERE)/$$x $(top_builddir)/src/modules/lib/$$x; \ done -$(TARGET).la: $(LT_OBJS) +$(TARGET).la: $(RLM_SUBDIRS) $(LT_OBJS) $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \ -module $(LINK_MODE) $(LDFLAGS) $(RLM_LDFLAGS) -o $@ \ -rpath $(libdir) $^ $(LIBRADIUS) $(RLM_LIBS) $(LIBS)