Fix typo
[freeradius.git] / src / modules / rlm_eap / types / Makefile
index 7b81551..0e89dad 100644 (file)
@@ -5,18 +5,30 @@
 #
 
 all:
-       $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
 
 clean:
-       $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
 
 install:
-       $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
-
-common:
-       @for mod in rlm_eap*; do \
-               if [ -d $$mod ] && [ -f $$mod/Makefile ]; then \
-                       echo "Making $(WHAT_TO_MAKE) in $$mod..."; \
-                       $(MAKE) $(MFLAGS) -C $$mod $(WHAT_TO_MAKE) || exit $$?; \
-               fi; \
-       done
+       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+
+reconfig:
+       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+
+SUBDIRS := $(patsubst %/,%,$(dir $(wildcard rlm_eap*/Makefile)))
+
+.PHONY: common $(SUBDIRS)
+
+common: $(SUBDIRS)
+
+# The PEAP and TTLS sub-modules require eap_tls.
+#
+# If they're not being built, this rule is ignored because they're
+# phony targets.
+# 
+rlm_eap_peap rlm_eap_ttls: rlm_eap_tls
+
+$(SUBDIRS): 
+       @echo "Making $(WHAT_TO_MAKE) in $(X)types/$@..."
+       @$(MAKE) $(MFLAGS) X=$(X)types/ -C $@ $(WHAT_TO_MAKE)