-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
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; \
--- /dev/null
+
+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
+
--- /dev/null
+
+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
+