Make subdirs before modules
authorAlan T. DeKok <aland@freeradius.org>
Thu, 8 Apr 2010 07:59:55 +0000 (09:59 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 8 Apr 2010 08:01:52 +0000 (10:01 +0200)
Fixes "cannot build from clean directory" problem after switching to
the new method of using "make" for recursing into subdirs

src/modules/Makefile

index 2cdcea1..16f2565 100644 (file)
@@ -28,12 +28,14 @@ distclean:
 # Requires GNU Make, but even older ones will do.
 SUBDIRS := $(patsubst %/,%,$(dir $(wildcard $(addsuffix /Makefile,$(MODULES)))))
 
-.PHONY: common $(SUBDIRS)
+.PHONY: common libs $(SUBDIRS)
 
-common: $(SUBDIRS)
+libs:
        @[ -d lib/ ] || mkdir lib
        @[ -d lib/.libs ] || mkdir lib/.libs
 
+common: libs $(SUBDIRS)
+
 $(SUBDIRS): 
        @echo "Making $(WHAT_TO_MAKE) in $@..."
        $(MAKE) $(MFLAGS) -C $@ $(WHAT_TO_MAKE)