]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
build: Add --disable-documentation option
authorColin Walters <walters@verbum.org>
Tue, 7 Feb 2012 18:53:58 +0000 (13:53 -0500)
committerHarald Hoyer <harald@redhat.com>
Thu, 27 Sep 2012 14:50:25 +0000 (16:50 +0200)
Some operating system builders may not want to build documention, for
example during a bootstrapping process.

Makefile
configure

index d04d3dd2996a91f1ea9b8a92cd2fde75bc4fa819..ac1c178eef8241eeaea34fa5f6714ba4100e868a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,10 @@ indent:
 
 doc: $(manpages) dracut.html
 
+ifeq ($(enable_documentation),yes)
+all: doc
+endif
+
 %: %.xml
        xsltproc -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 
@@ -76,7 +80,7 @@ dracut.html: dracut.asc $(manpages)
                http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl dracut.xml
        rm dracut.xml
 
-install: doc dracut-version.sh
+install: dracut-version.sh
        mkdir -p $(DESTDIR)$(pkglibdir)
        mkdir -p $(DESTDIR)$(bindir)
        mkdir -p $(DESTDIR)$(sysconfdir)
@@ -94,11 +98,13 @@ install: doc dracut-version.sh
        install -m 0755 dracut-logger.sh $(DESTDIR)$(pkglibdir)/dracut-logger.sh
        install -m 0755 dracut-initramfs-restore.sh $(DESTDIR)$(pkglibdir)/dracut-initramfs-restore
        cp -arx modules.d $(DESTDIR)$(pkglibdir)
+ifeq ($(enable_documentation),yes)
        for i in $(man1pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man1/$${i##*/}; done
        for i in $(man5pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man5/$${i##*/}; done
        for i in $(man7pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man7/$${i##*/}; done
        for i in $(man8pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man8/$${i##*/}; done
        ln -fs dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7
+endif
        if [ -n "$(systemdsystemunitdir)" ]; then \
                mkdir -p $(DESTDIR)$(systemdsystemunitdir); \
                install -m 0644 dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir); \
index 86323984b8fce1b5a2e6a4abc9979c5a730556f5..409256bbeb2861ecdf6c39edc7863ae96833a21e 100755 (executable)
--- a/configure
+++ b/configure
@@ -7,6 +7,8 @@ echo \#buildapi-variable-no-builddir >/dev/null
 
 prefix=/usr
 
+enable_documentation=yes
+
 # Little helper function for reading args from the commandline.
 # it automatically handles -a b and -a=b variants, and returns 1 if
 # we need to shift $3.
@@ -33,6 +35,7 @@ while (($# > 0)); do
         --sysconfdir) read_arg sysconfdir "$@" || shift;;
         --sbindir) read_arg sbindir "$@" || shift;;
         --mandir) read_arg mandir "$@" || shift;;
+        --disable-documentation) enable_documentation=no;;
         *) echo "Ignoring unknown option '$1'";;
     esac
     shift
@@ -45,5 +48,6 @@ datadir ?= ${datadir:-${prefix}/share}
 sysconfdir ?= ${sysconfdir:-${prefix}/etc}
 sbindir ?= ${sbindir:-${prefix}/sbin}
 mandir ?= ${mandir:-${prefix}/share/man}
+enable_documentation ?= ${enable_documentation}
 EOF
 mv Makefile.inc.tmp Makefile.inc