From 12e358e72e094a2bc192526c374a6bb0ff82e968 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sat, 7 Aug 2004 15:30:16 +0000 Subject: new approach on the SGML problems: * copy the sgml files from $(srcdir) to . if the one in $(srcdir) is newer (if not building to a separate dir, this will be a circular dependency which is ignored) * convert the SGML file inside . if the source is newer than the target and sgmltools are available * if sgmltools are not available, fail during "make dist" or create dummy files otherwise (the dummy creation still ensures that the source is newer than the target by touching the files, this way the files will be built correctly if you install sgmltools later) * use a clean-docs target during distclean * advantage: read-only $(srcdir) should work now CVS patchset: 6877 CVS date: 2004/08/07 15:30:16 --- doc/hackersguide/Makefile.am | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'doc/hackersguide') diff --git a/doc/hackersguide/Makefile.am b/doc/hackersguide/Makefile.am index 08c4110de..67283bf8e 100644 --- a/doc/hackersguide/Makefile.am +++ b/doc/hackersguide/Makefile.am @@ -16,37 +16,45 @@ EXTRA_DIST = README $(hackersguide_sgml) \ docsdir = $(prefix)/share/doc/xine/hackersguide -docs: docs-prepare $(docs_DATA) +docs: $(docs_DATA) -docs-prepare: $(addprefix $(srcdir)/, $(hackersguide_sgml)) - for file in $(hackersguide_sgml); do \ - test -f $$file || cp $(srcdir)/$$file .; \ - done +distclean-generic: clean-docs + +clean-docs: + rm -f $(docs_DATA) + test "x$(srcdir)" = x. || rm -f $(hackersguide_sgml) dist-hook: - @touch $(addprefix $(srcdir)/, $(EXTRA_DIST)) @make fail_if_missing=yes docs cp $(docs_DATA) $(distdir) -$(hackersguide_sgml): $(addprefix $(srcdir)/,$(hackersguide_sgml)) +$(hackersguide_sgml): %.sgml: $(srcdir)/%.sgml cp $^ . hackersguide.html: $(hackersguide_sgml) @if test "$(SGMLTOOLS)" != "no"; then \ $(SGMLTOOLS) -b onehtml hackersguide.sgml; \ - else if test "$(fail_if_missing)" = "yes"; then \ + else \ + if test "$(fail_if_missing)" = "yes"; then \ echo "Please install sgmltools-lite."; \ exit 1; \ - else touch $@; \ + else \ + touch $@; \ + sleep 1; \ + touch $^; \ fi; \ fi %.png: $(srcdir)/%.fig @if test "$(FIG2DEV)" != "no"; then \ $(FIG2DEV) -L png -S 4 $< $@; \ - else if test "$(fail_if_missing)" = "yes"; then \ + else \ + if test "$(fail_if_missing)" = "yes"; then \ echo "Please install fig2dev."; \ exit 1; \ - else touch $@; \ + else \ + touch $@; \ + sleep 1; \ + touch $^; \ fi; \ fi -- cgit v1.2.3