Be extremely verbose about where were looking for things
[freeradius.git] / Makefile
index 9e397ab..b73e316 100644 (file)
--- a/Makefile
+++ b/Makefile
 include Make.inc
 MFLAGS += --no-print-directory
 
-# Speed up the build for developers.  This means editing Make.inc,
-# and adding "BOILER = yes" to the bottom.  Once that's done, the
-#
-#
-ifeq "$(BOILER)" "yes"
-
-# Require at least GNU Make 3.81 for the new build system
-# Don't allow 3.80.  Allow any 3.8x.  This will need to be changed
-# in a decade or two when GNU Make 3.90 is released.
-BOILERMAKE=$(subst 3.8,yes,$(subst 3.80,,$(MAKE_VERSION)))
-
-# The version of GNU Make is too old, don't use it.
-ifeq "" "$(findstring yes,$(BOILERMAKE))"
+# The version of GNU Make is too old, don't use it (.FEATURES variable was
+# wad added in 3.81)
+ifndef .FEATURES
 $(error The build system requires GNU Make 3.81 or later.)
 endif
 
@@ -31,25 +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)
-
-else
-.PHONY: all clean install
-
-SUBDIRS                = $(wildcard src raddb scripts doc)
-WHAT_TO_MAKE   = all
-
-all:
-       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
-
-clean:
-       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
-       @rm -f *~
-endif
-
-.PHONY: tests
-tests:
+test: build.raddb
+       @$(MAKE) -C raddb/certs
        @$(MAKE) -C src/tests tests
 
 #
@@ -78,10 +51,6 @@ install.bindir:
 .PHONY: install.sbindir
 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
@@ -108,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
@@ -132,14 +98,6 @@ install-chown:
 endif
 endif
 
-.PHONY: common $(SUBDIRS)
-
-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 \
@@ -158,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
@@ -251,3 +219,9 @@ dist-tag: freeradius-server-$(RADIUSD_VERSION_STRING).tar.gz freeradius-server-$
 .PHONY: deb
 deb:
        fakeroot dpkg-buildpackage -b -uc
+
+# Developer checks
+.PHONY: warnings
+warnings:
+       @(make clean all 2>&1) | egrep -v '^/|deprecated|^In file included|: In function|   from |^HEADER|^CC|^LINK' > warnings.txt
+       @wc -l warnings.txt