Use correct method of recursing into subdirs
authorAlan T. DeKok <aland@freeradius.org>
Thu, 29 Dec 2011 22:50:18 +0000 (17:50 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 29 Dec 2011 22:54:36 +0000 (17:54 -0500)
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)

src/modules/rules.mak

index a9067f3..cd159a1 100644 (file)
@@ -116,14 +116,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)
        @echo LINK $@ $^
        @$(LIBTOOL) --quiet --mode=link $(CC) -release $(RADIUSD_VERSION) \
            -module $(LINK_MODE) $(LDFLAGS) $(RLM_LDFLAGS) -o $@     \