Add support for "./configure --without-docdir" which cancels
authornbk <nbk>
Wed, 4 Apr 2007 09:22:21 +0000 (09:22 +0000)
committernbk <nbk>
Wed, 4 Apr 2007 09:22:21 +0000 (09:22 +0000)
doc files installation instead of raising an error. This is
useful for the downstream distributions of FreeRADIUS.

configure.in
doc/Makefile

index b187377..8c9f648 100644 (file)
@@ -113,7 +113,7 @@ AC_ARG_WITH(docdir,
 [  --with-docdir=DIR       Directory for documentation [DATADIR/doc/freeradius] ],
 [ case "$withval" in
     no)
-       AC_MSG_ERROR(Need docdir)
+       docdir=no
        ;;
     yes)
        ;;
@@ -127,6 +127,9 @@ AC_ARG_WITH(docdir,
 )
 AC_SUBST(docdir)
 AC_MSG_RESULT($docdir)
+if test "x$docdir" = xno; then
+       AC_MSG_WARN(Documentation files will NOT be installed.)
+fi
 
 dnl extra argument: --with-logdir
 logdir='${localstatedir}/log/radius'
index 64ba79d..51172cb 100644 (file)
@@ -17,18 +17,22 @@ clean:
        @rm -f *~
 
 install:
-       $(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
+       @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)
+       @$(MAKE) $(MFLAGS) -C $@ $(WHAT_TO_MAKE)
 
 .PHONY: all clean install common $(SUBDIRS)