From: David Schleef Date: Sat, 16 Aug 2003 00:20:02 +0000 (+0000) Subject: refactor build system for docs X-Git-Tag: r0_7_21~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=733da099a23be5807f3830fe51b6b5030837caa2;p=comedilib.git refactor build system for docs --- diff --git a/doc/Makefile.am b/doc/Makefile.am index c0fba51..808527b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,37 +1,38 @@ -DOC=comedilib +SUBDIRS = html man + SGML= drivers.sgml funcref.sgml glossary.sgml \ install.sgml intro.sgml other.sgml reference.sgml tutorial.sgml \ driverwriting.sgml -EXTRA_DIST=$(SGML) comedilib.sgml funcref mkref drivers.txt mkdr acq-seq.gif +BUILT_SOURCES = funcref.sgml drivers.sgml -if HAVE_DOCBOOK -all-local: html $(DOC).pdf man +EXTRA_DIST=$(SGML) comedilib.sgml funcref mkref drivers.txt mkdr acq-seq.gif -install-data-local: - $(INSTALL) -d $(mandir)/man3 - -$(INSTALL_DATA) man/*.3 $(mandir)/man3 - $(INSTALL) -d $(pkgdatadir)/html - $(INSTALL_DATA) html/* $(pkgdatadir)/html +if HAVE_DOCBOOK2PDF +all_pdf = comedilib.pdf +install_pdf = install_pdf else +all_pdf = +install_pdf = endif -clean-local: - rm -rf comedilib.pdf drivers.sgml funcref.sgml - rm -rf html man +all-local: $(all_pdf) -locales = de +install-data-local: $(install_pdf) -$(DOC).pdf: $(DOC).sgml $(SGML) - $(JW_PATH) -f docbook -b pdf $(DOC).sgml +install_pdf: + $(INSTALL) -d $(pkgdatadir) + $(INSTALL_DATA) comedilib.pdf $(pkgdatadir) -html: $(DOC).sgml $(SGML) - { $(JW_PATH) -f docbook -b html -o html $(DOC).sgml && touch html; } || { $(RM) -r html; exit 1; } - ln -sf ../acq-seq.gif html/acq-seq.gif +uninstall-local: + rm -f $(pkgdatadir)/comedilib.pdf -man: $(DOC).sgml $(SGML) - -{ $(JW_PATH) -f docbook -b man -o man $(DOC).sgml && touch man; } || { $(RM) -r man; exit 1; } +clean-local: + rm -f comedilib.pdf drivers.sgml funcref.sgml + +comedilib.pdf: $(srcdir)/comedilib.sgml $(SGML) + $(DOCBOOK2PDF) -f docbook -b pdf $(srcdir)/comedilib.sgml funcref.sgml: funcref mkref ./mkref funcref >funcref.sgml @@ -39,8 +40,10 @@ funcref.sgml: funcref mkref drivers.sgml: drivers.txt mkdr ./mkdr drivers.txt >drivers.sgml +locales = de + messages: .phony - xgettext -k_ -k_s $(shell find .. -name '*.c') + xgettext -k_ -k_s `find .. -name '*.c'` for i in $(locales);do \ msgmerge po/$$i.po messages.po -o $$i.po; \ mkdir -p locale/$$i/LC_MESSAGES; \ diff --git a/doc/comedilib.sgml b/doc/comedilib.sgml index 0d9ec8c..59e14c6 100644 --- a/doc/comedilib.sgml +++ b/doc/comedilib.sgml @@ -9,6 +9,8 @@ Comedi"> + + ]>
diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am new file mode 100644 index 0000000..2bf2207 --- /dev/null +++ b/doc/html/Makefile.am @@ -0,0 +1,32 @@ + +EXTRA_DIST = acq-seq.gif + +if HAVE_DOCBOOK2HTML +all_html = all_html +install_html = install_html +uninstall_html = uninstall_html +else +all_html = +install_html = +uninstall_html = +endif + +all-local: $(all_html) + +all_html: $(srcdir)/../comedilib.sgml $(SGML) + $(DOCBOOK2HTML) $(srcdir)/../comedilib.sgml + +install-data-local: $(install_html) + +install_html: + $(INSTALL) -d $(pkgdatadir)/html + for each in *.html $(srcdir)/*.gif ; do $(INSTALL_DATA) $$each $(pkgdatadir)/html ; done + +uninstall-local: $(uninstall_html) + +uninstall_html: + for each in *.html $(srcdir)/*.gif ; do rm $(pkgdatadir)/html/`basename $$each` ; done + +clean-local: + rm -rf *.html + diff --git a/doc/html/acq-seq.gif b/doc/html/acq-seq.gif new file mode 100644 index 0000000..717a0e5 Binary files /dev/null and b/doc/html/acq-seq.gif differ diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am new file mode 100644 index 0000000..8741ac9 --- /dev/null +++ b/doc/man/Makefile.am @@ -0,0 +1,31 @@ + +if HAVE_DOCBOOK2MAN +all_man = all_man +install_man = install_man +uninstall_man = uninstall_man +else +all_man = +install_man = +uninstall_man = +endif + +all-local: $(all_man) + +all_man: $(srcdir)/../comedilib.sgml $(SGML) + $(DOCBOOK2MAN) $(srcdir)/../comedilib.sgml + +install-data-local: $(install_man) + +install_man: + $(INSTALL) -d $(mandir)/man3 + for each in *.3 ; do $(INSTALL_DATA) $$each $(mandir)/man3 ; done + +uninstall-local: $(uninstall_man) + +uninstall_man: + for each in *.3 ; do rm $(mandir)/man3/$$each ; done + +clean-local: + rm -f *.3 + rm -f manpage.links manpage.refs +