Properly track absolute / relative paths
[freeradius.git] / Makefile
index 32c4dcc..b73e316 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,11 +21,8 @@ export DESTDIR := $(R)
 # And over-ride all of the other magic.
 include scripts/boiler.mk
 
-# These are not yet converted to the new system
-SUBDIRS                = $(wildcard raddb scripts doc)
-
-.PHONY: tests
-tests:
+test: build.raddb
+       @$(MAKE) -C raddb/certs
        @$(MAKE) -C src/tests tests
 
 #
@@ -55,10 +52,6 @@ install.bindir:
 install.sbindir:
        @[ -d $(R)$(sbindir) ] || $(INSTALL) -d -m 755 $(R)$(sbindir)
 
-.PHONY: install.raddbdir
-install.raddbdir:
-       @[ -d $(R)$(raddbdir) ] || $(INSTALL) -d -m 755 $(R)$(raddbdir)
-
 .PHONY: install.dirs
 install.dirs: install.bindir install.sbindir
        @$(INSTALL) -d -m 755   $(R)$(mandir)
@@ -84,9 +77,6 @@ $(R)$(mandir)/%: man/%
 
 install: install.dirs install.share install.man
 
-install:
-       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
-
 ifneq ($(RADMIN),)
 ifneq ($(RGROUP),)
 .PHONY: install-chown
@@ -108,20 +98,6 @@ install-chown:
 endif
 endif
 
-.PHONY: common $(SUBDIRS)
-
-#
-#  We need to convert these directories to boilermake!
-#
-all:
-       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
-
-common: $(SUBDIRS)
-
-$(SUBDIRS):
-       @echo "Making $(WHAT_TO_MAKE) in $@..."
-       @$(MAKE) $(MFLAGS) -C $@ $(WHAT_TO_MAKE)
-
 distclean: clean
        @rm -f config.cache config.log config.status libtool \
                src/include/radpaths.h src/include/stamp-h \
@@ -140,6 +116,16 @@ distclean: clean
 #  Automatic remaking rules suggested by info:autoconf#Automatic_Remaking
 #
 ######################################################################
+CONFIG_FILES := $(wildcard src/modules/rlm_*/configure.in src/modules/rlm_*/*/*/configure.in)
+
+$(CONFIG_FILES):
+       @echo "Making reconfig in $(dir $@)..."
+       @cd $(dir $@) && $(AUTOCONF) -I $(top_builddir)
+       @if grep AC_CONFIG_HEADERS $@ >/dev/null; then\
+               cd $(dir $@) && $(AUTOHEADER); \
+        fi
+
+
 .PHONY: reconfig
 reconfig:
        @$(MAKE) $(MFLAGS) -C src reconfig