If RLM_SUBDIRS is defined, then recursively make 'common' for the
authoraland <aland>
Thu, 15 Mar 2001 18:03:10 +0000 (18:03 +0000)
committeraland <aland>
Thu, 15 Mar 2001 18:03:10 +0000 (18:03 +0000)
targets static, dynamic, and clean.

This allows the SQL module to build it's sub-modules.

Some minor changes to the SQL module build internals were made
to help this process.

src/modules/rlm_sql/Makefile
src/modules/rlm_sql/drivers/Makefile
src/modules/rules.mak

index 4d50569..fd379e4 100644 (file)
@@ -4,8 +4,7 @@ HEADERS         = rlm_sql.h
 RLM_INSTALL    = install-drivers
 RLM_CFLAGS     = $(INCLTDL)
 RLM_LIBS       =
-
-SUBDIRS                = drivers
+RLM_SUBDIRS    = drivers
 
 $(STATIC_OBJS): $(HEADERS)
 
@@ -23,7 +22,7 @@ install-drivers:
        @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=install common
 
 common: 
-       @for dir in $(SUBDIRS); do \
+       @for dir in $(RLM_SUBDIRS); do \
                echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
                (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
        done
index a18d185..97b46fd 100644 (file)
@@ -1,7 +1,10 @@
+all:
+       $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
 
+static:
+       $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
 
-
-all:
+dynamic:
        $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
 
 clean:
index 7552c48..22dab6e 100644 (file)
@@ -106,9 +106,11 @@ $(TARGET).la: $(DYNAMIC_OBJS)
 #
 #######################################################################
 static: $(TARGET).a
+       @[ "x$(RLM_SUBDIRS)" = "x" ] || $(MAKE) $(MFLAGS) WHAT_TO_MAKE=static common
        @cp $< ../lib
 
 dynamic: $(TARGET).la
+       @[ "x$(RLM_SUBDIRS)" = "x" ] || $(MAKE) $(MFLAGS) WHAT_TO_MAKE=dynamic common
        @cp $< ../lib
 
 #######################################################################
@@ -132,6 +134,7 @@ endif
 clean:
        @rm -f *.a *.o *.lo *.la *~
        @rm -rf .libs _libs
+       @[ "x$(RLM_SUBDIRS)" = "x" ] || $(MAKE) $(MFLAGS) WHAT_TO_MAKE=clean common
 
 distclean:
        @rm -f config.h config.mak