David Wood wrote:

> In message <[EMAIL PROTECTED]>, Nicolas 
> Baradakis <[EMAIL PROTECTED]> writes
> >David Wood wrote:
> >
> >> There's two other things I'm currently modifying the source to achieve,
> >> on which I'd appreciate comments.
> >>
> >> patch-doc::Makefile surrounds the contents of the install target in
> >> doc/Makefile with #ifndef NOPORTDOCS ... #endif. FreeBSD ports have to
> >> respect this flag. Is a neater way to pass --with-docdir=/dev/null to
> >> configure if NOPORTDOCS is defined (which I haven't tried) and abandon
> >> the patch. Has anyone any other suggestions?
> >
> >Every downstream distribution has its own mechanism to mark the
> >files as "documentation".
> 
> --with-docdir=/dev/null results in
> mkdir: /dev/null: File exists
> 
> It looks like the patch (or some other way of modifying doc/Makefile) 
> will have to stay. I will continue to modify the source in some suitable 
> way to achieve this.

Currently "./configure --without-docdir" throws an error, but it's
possible to modify this option in CVS to cancel doc files installation.
I think it might be useful for the Suse package, too.

Please give a try to the following patch. If it solves the problem I'll
add it to the CVS.

Index: configure.in
===================================================================
RCS file: /source/radiusd/configure.in,v
retrieving revision 1.198.2.15.2.13
diff -u -r1.198.2.15.2.13 configure.in
--- configure.in        26 Mar 2007 12:58:16 -0000      1.198.2.15.2.13
+++ configure.in        1 Apr 2007 15:16:32 -0000
@@ -115,7 +115,7 @@
 [  --with-docdir=DIR       Directory for documentation 
[DATADIR/doc/freeradius] ],
 [ case "$withval" in
     no)
-       AC_MSG_ERROR(Need docdir)
+       docdir=no
        ;;
     yes)
        ;;
@@ -129,6 +129,9 @@
 )
 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: doc/Makefile
===================================================================
RCS file: /source/radiusd/doc/Makefile,v
retrieving revision 1.4.4.2.2.3
diff -u -4 -r1.4.4.2.2.3 Makefile
--- doc/Makefile        15 Jul 2006 17:16:51 -0000      1.4.4.2.2.3
+++ doc/Makefile        1 Apr 2007 15:16:44 -0000
@@ -15,16 +15,21 @@
 clean:
        @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
        @rm -f *~
 
+ifeq ($(docdir),no)
+install:
+       @echo 'Documentation files will NOT be installed.'
+else
 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
+endif
 
 common: $(SUBDIRS)
 
 $(SUBDIRS):

-- 
Nicolas Baradakis

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to