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)
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 $@ \