From: Alan T. DeKok Date: Wed, 27 Feb 2013 16:35:58 +0000 (-0500) Subject: Clean up test build rules X-Git-Tag: release_3_0_0_beta1~898 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fccd8f4bb9b6342aec633e9b94e56292aa34bcc;p=thirdparty%2Ffreeradius-server.git Clean up test build rules Next step is to convert the tests to boilermake --- diff --git a/Makefile b/Makefile index b619733c277..b73e316e77b 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,7 @@ export DESTDIR := $(R) # And over-ride all of the other magic. include scripts/boiler.mk -.PHONY: test -test: +test: build.raddb @$(MAKE) -C raddb/certs @$(MAKE) -C src/tests tests @@ -117,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 diff --git a/raddb/all.mk b/raddb/all.mk index a1bb67a4cf2..d7eaa7b9f67 100644 --- a/raddb/all.mk +++ b/raddb/all.mk @@ -40,7 +40,9 @@ INSTALL_FILES := $(wildcard raddb/sites-available/* raddb/mods-available/*) \ INSTALL_RADDB := $(patsubst raddb/%,$(R)$(raddbdir)/%,\ $(filter-out %~,$(INSTALL_FILES))) -all: $(LOCAL_SITES) $(LOCAL_MODULES) +all: build.raddb + +build.raddb: $(LOCAL_SITES) $(LOCAL_MODULES) clean: clean.raddb diff --git a/src/tests/Makefile b/src/tests/Makefile index d6c41ca24ac..b32d9b08145 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -60,7 +60,7 @@ test.conf: dictionary @echo '$$INCLUDE radiusd.conf' >> test.conf @echo '$$INCLUDE $${testdir}/config/' >> test.conf -radiusd.pid: $(RADDB_PATH)/test.conf test.conf raddb +radiusd.pid: $(RADDB_PATH)/test.conf test.conf @$(BIN_PATH)/radiusd -txxl $(TEST_PATH)/radius.log -md $(RADDB_PATH) -n test -i 127.0.0.1 -p $(PORT) || tail -n 20 $(TEST_PATH)/radius.log # We can't make this depend on radiusd.pid, because then make will create @@ -72,13 +72,6 @@ radiusd.kill: fi @rm -f radiusd.pid -# As test.conf includes radiusd.conf and as radiusd.conf includes everything in -# mods-enabled and sites-enable we need to ensure those directories have been -# created and are up to date. -.PHONY: raddb -raddb: - @$(MAKE) -C $(RADDB_PATH) mods-enabled sites-enabled - # Link from the main database directory to here $(RADDB_PATH)/test.conf: test.conf @[ -f $(RADDB_PATH)/test.conf ] || ln -s ../src/tests/test.conf $(RADDB_PATH)/ @@ -125,12 +118,3 @@ leap: $(EAPOL_TEST) -c leap.conf -s $(SECRET) ATTRS := rfc.txt errors.txt extended.txt lucent.txt wimax.txt - -attrs: $(ATTRS) ../main/radattr - ../main/radattr -d ../../share rfc.txt - -${LIBRADIUS}: $(wildcard ../include/*.h) $(wildcard ../lib/*.c) - $(MAKE) -C ../lib all - -../main/radattr: ${LIBRADIUS} ../main/radattr.c - $(MAKE) -C ../main radattr