Remove notes on unsupported configuration items
[freeradius.git] / doc / Makefile
index 8eb4eb2..51172cb 100644 (file)
@@ -6,7 +6,7 @@
 
 include ../Make.inc
 
-SUBDIRS                = rfc
+SUBDIRS                = examples rfc
 WHAT_TO_MAKE   = all
 
 all:
@@ -17,17 +17,22 @@ clean:
        @rm -f *~
 
 install:
-       $(INSTALL) -d -m 755 $(R)$(datadir)/doc
-       $(INSTALL) -d -m 755 $(R)$(datadir)/doc/freeradius
-       for file in *[!~]; do \
-               if [ -f $$file -a $$file != Makefile ]; then \
-                       $(INSTALL) -m 644 $$file $(R)$(datadir)/doc/freeradius; \
-               fi; \
-       done
-       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+       @if [ "$(docdir)" = no ]; then                                  \
+               echo 'Documentation files will NOT be installed.';      \
+       else                                                            \
+               $(INSTALL) -d -m 755 $(R)$(docdir);                     \
+               for file in *[!~]; do                                   \
+                       if [ -f $$file -a $$file != Makefile ]; then    \
+                               $(INSTALL) -m 644 $$file $(R)$(docdir); \
+                       fi;                                             \
+               done;                                                   \
+               $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common;               \
+       fi
+
+common: $(SUBDIRS)
+
+$(SUBDIRS):
+       @echo "Making $(WHAT_TO_MAKE) in $@..."
+       @$(MAKE) $(MFLAGS) -C $@ $(WHAT_TO_MAKE)
 
-common:
-       @for dir in $(SUBDIRS); do \
-               echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
-               (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit $?;\
-       done
+.PHONY: all clean install common $(SUBDIRS)