diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-08-07 15:30:16 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-08-07 15:30:16 +0000 |
commit | 12e358e72e094a2bc192526c374a6bb0ff82e968 (patch) | |
tree | 054b05dccbb42a97d961c15a8f24c8acf047ba68 /doc | |
parent | a3ad574f21f464cf78c471ea8e83b65d1ebf925d (diff) | |
download | xine-lib-12e358e72e094a2bc192526c374a6bb0ff82e968.tar.gz xine-lib-12e358e72e094a2bc192526c374a6bb0ff82e968.tar.bz2 |
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
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.am | 8 | ||||
-rw-r--r-- | doc/faq/Makefile.am | 30 | ||||
-rw-r--r-- | doc/hackersguide/Makefile.am | 30 |
3 files changed, 46 insertions, 22 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 818ad1b58..93c354b31 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -2,12 +2,14 @@ include $(top_srcdir)/misc/Makefile.common SUBDIRS = man hackersguide faq -EXTRA_DIST = $(docs_DATA) -docsdir = $(prefix)/share/doc/xine docs_DATA = README README.dvb README.dxr3 \ README.freebsd README.irix README.network_dvd README.opengl \ README.solaris README.syncfb -docs: +EXTRA_DIST = $(docs_DATA) + +docsdir = $(prefix)/share/doc/xine + +docs clean-docs: @cd faq && $(MAKE) $@ @cd hackersguide && $(MAKE) $@ 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 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 |