diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2013-01-02 17:32:49 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@googlemail.com> | 2013-01-02 17:32:49 +0100 |
commit | 1f38e6beed29b281b6bab2c925884cdf491eddc4 (patch) | |
tree | 24f6b4ee6f622005ae89c96036ab118099ec29c3 | |
parent | ca446c691f702bfc5585d8ac69e245d5b3382679 (diff) |
build: fix man-page compilation
The man_fixup_aliases thingy was a horrible hack. Replace it with a
temporary .man_fixup file that saves compilation timestamps so we have
post-recipies for man-fixups.
Also fix some minor out-of-tree build problems.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 22 |
2 files changed, 13 insertions, 10 deletions
@@ -26,6 +26,7 @@ stamp-* .deps .dirstamp .libs +.man_fixup genshader genunifont src/static_shaders.c diff --git a/Makefile.am b/Makefile.am index 4309e98..d85f266 100644 --- a/Makefile.am +++ b/Makefile.am @@ -397,6 +397,7 @@ check_PROGRAMS += \ test_vt \ test_input \ test_key +MANPAGES += docs/man/kmscon.1 endif kmscon_SOURCES = \ @@ -469,7 +470,6 @@ kmscon_SOURCES += \ nodist_kmscon_SOURCES += src/static_shaders.c kmscon_CPPFLAGS += $(GLES2_CFLAGS) kmscon_LDADD += $(GLES2_LIBS) -MANPAGES += docs/man/kmscon.1 endif # @@ -570,16 +570,14 @@ test_key_LDADD = \ # Manpages # -MAN_XML_FILES = ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,$(MANPAGES)}}}} man_MANS = -EXTRA_DIST += $(MAN_XML_FILES) +EXTRA_DIST += ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,$(MANPAGES)}}}} +CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES) .man_fixup if BUILD_HAVE_XSLTPROC if BUILD_HAVE_MANPAGES_STYLESHEET -CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES) -EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) -man_MANS += $(MANPAGES) $(MANPAGES_ALIASES) man_fixup_aliases +man_MANS += $(MANPAGES) $(MANPAGES_ALIASES) XSLTPROC_FLAGS = \ --stringparam man.authors.section.enabled 0 \ @@ -590,11 +588,15 @@ XSLTPROC_FLAGS = \ XSLTPROC_PROCESS_MAN = \ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ - $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(BUILD_MANPAGES_STYLESHEET) $< + $(XSLTPROC) -o "$@" $(XSLTPROC_FLAGS) $(BUILD_MANPAGES_STYLESHEET) "$<" && \ + touch .man_fixup + +# Force .man_fixup if $(MANPAGES) are not built +.man_fixup: | $(MANPAGES) + @touch .man_fixup -TPHONY += man_fixup_aliases -man_fixup_aliases: $(MANPAGES) $(MANPAGES_ALIASES) - $(AM_V_GEN)if test -n "$(MANPAGES_ALIASES)" ; then $(SED) -i -e 's/^\.so \([a-z_]\+\)\.\([0-9]\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES) ; fi +$(MANPAGES_ALIASES): $(MANPAGES) .man_fixup + $(AM_V_GEN)if test -n "$@" ; then $(SED) -i -e 's/^\.so \([a-z_]\+\)\.\([0-9]\)$$/\.so man\2\/\1\.\2/' "$@" ; fi docs/man/%.1: docs/man/%.xml $(XSLTPROC_PROCESS_MAN) |