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/faq/Makefile.am | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'doc/faq') diff --git a/doc/faq/Makefile.am b/doc/faq/Makefile.am index 21d2851e0..3370a4c5f 100644 --- a/doc/faq/Makefile.am +++ b/doc/faq/Makefile.am @@ -1,36 +1,50 @@ include $(top_srcdir)/misc/Makefile.common EXTRA_DIST = README faq.sgml + docs_DATA = faq.html faq.txt docsdir = $(prefix)/share/doc/xine/faq -docs: docs-prepare $(docs_DATA) +docs: $(docs_DATA) + +distclean-generic: clean-docs -docs-prepare: $(srcdir)/faq.sgml - test -f faq.sgml || cp $^ . +clean-docs: + rm -f $(docs_DATA) + test "x$(srcdir)" = x. || rm -f faq.sgml dist-hook: - @touch $(addprefix $(srcdir)/, $(EXTRA_DIST)) @make fail_if_missing=yes docs cp $(docs_DATA) $(distdir) +faq.sgml: $(srcdir)/faq.sgml + cp $^ . + faq.html: faq.sgml @if test "$(SGMLTOOLS)" != "no"; then \ $(SGMLTOOLS) -b onehtml faq.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 faq.txt: faq.sgml @if test "$(SGMLTOOLS)" != "no"; then \ $(SGMLTOOLS) -b txt faq.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 -- cgit v1.2.3