From 4d96c24ac321fdfaaf780d98e4f13325d0110535 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sat, 9 Mar 2013 20:31:39 +0100 Subject: [PATCH] build-sys make man pages optional --- Makefile.am | 27 ++++++++++++--------------- configure.ac | 19 +++++++++++++++---- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3cdaf7d..626d721 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . -# + ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} AM_MAKEFLAGS = --no-print-directory @@ -28,11 +28,8 @@ AM_LDFLAGS = EXTRA_DIST = autogen.sh README LICENSE CLEANFILES = -# -# gummiboot setup binary -# +# ------------------------------------------------------------------------------ bin_PROGRAMS = gummiboot -dist_man_MANS = src/setup/gummiboot.8 EXTRA_DIST += src/setup/gummiboot.xml CLEANFILES += src/setup/gummiboot.8 @@ -52,6 +49,7 @@ gummiboot_CFLAGS = \ gummiboot_LDADD = \ $(BLKID_LIBS) +if ENABLE_MANPAGES %.8: %.xml $(AM_V_GEN)$(XSLTPROC) -o $@ --nonet \ --stringparam man.output.quietly 1 \ @@ -60,12 +58,13 @@ gummiboot_LDADD = \ --stringparam man.copyright.section.enabled 0 \ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< -# -# EFI compilation -# -# This part of the build system uses custom make rules and bypass regular -# automake to provide absolute control on compiler and linker flags. -# +dist_man_MANS = src/setup/gummiboot.8 +endif + +# ------------------------------------------------------------------------------ +# EFI compilation -- this part of the build system uses custom make rules and +# bypasses regular automake to provide absolute control on compiler and linker +# flags. efi_loadername = gummiboot$(MACHINE_TYPE_NAME).efi efi_sources = src/efi/gummiboot.c @@ -105,7 +104,7 @@ efi_ldflags = \ efi_objects = $(addprefix $(top_builddir)/,$(efi_sources:.c=.o)) efi_solib = $(top_builddir)/src/efi/gummiboot.so -# automake stuff +# ------------------------------------------------------------------------------ gummibootlib_DATA = $(efi_loadername) CLEANFILES += $(efi_objects) $(efi_solib) $(efi_loadername) EXTRA_DIST += $(efi_sources) @@ -125,9 +124,7 @@ $(efi_loadername): $(efi_solib) -j .dynsym -j .rel -j .rela -j .reloc -j .eh_frame \ --target=efi-app-$(ARCH) $< $@ -# -# tests -# +# ------------------------------------------------------------------------------ CLEANFILES += test-disk EXTRA_DIST += test/test-create-disk.sh diff --git a/configure.ac b/configure.ac index f5bd0a3..2bbc235 100644 --- a/configure.ac +++ b/configure.ac @@ -100,6 +100,17 @@ fi AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"]) # ------------------------------------------------------------------------------ +have_manpages=no +AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages])) +AS_IF([test "x$enable_manpages" != xno], [ + AS_IF([test "x$enable_manpages" = xyes -a "x$XSLTPROC" = x], [ + AC_MSG_ERROR([*** Manpages requested but xsltproc not found]) + ]) + AS_IF([test "x$XSLTPROC" != x], [have_manpages=yes]) +]) +AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) + +# ------------------------------------------------------------------------------ AC_CONFIG_FILES([ Makefile ]) @@ -109,13 +120,13 @@ AC_MSG_RESULT([ $PACKAGE_NAME $VERSION arch: $ARCH - machine type: $MACHINE_TYPE_NAME + EFI machine type: $MACHINE_TYPE_NAME prefix: ${prefix} - - blkid: ${have_blkid} efi libs: ${GNUEFI_LIBS} efi lds: ${GNUEFI_LDS_DIR} + blkid: ${have_blkid} + man pages: ${have_manpages} - test bios: ${BIOS} + test QEMU bios: ${BIOS} ]) -- 2.7.4