From d6404f6beb48ccfdc855bd8a1f3c407a77e65bc8 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 3 Jul 2023 11:38:09 +0200 Subject: [PATCH] added install_pdf to create pdf doc from html man pages --- Makefile | 3 +++ doc/Makefile | 3 +++ doc/xschem_man/create_pdf_man | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 0c9d691c..38a841bb 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,9 @@ install: FORCE cd doc && $(MAKE) install cd src/utile && $(MAKE) install +install_pdf: FORCE + cd doc && $(MAKE) install_pdf + uninstall: FORCE cd src && $(MAKE) uninstall cd xschem_library && $(MAKE) uninstall diff --git a/doc/Makefile b/doc/Makefile index 160e5de4..b4e30d8b 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -10,6 +10,9 @@ install: FORCE $(SCCBOX) install -f -d xschem_man/*.html xschem_man/*.css xschem_man/*.png "$(XDOCDIR)"/xschem_man $(SCCBOX) install -f manpages/xschem.1 "$(MANDIR)"/man1/xschem.1 +install_pdf: FORCE + sh -c "cd xschem_man; ./create_pdf_man" && $(SCCBOX) install -f -d xschem_man/xschem_man.pdf "$(XDOCDIR)"/xschem_man + uninstall: FORCE $(SCCBOX) rm -f "$(XDOCDIR)"/xschem_man/* $(SCCBOX) rm -f "$(XDOCDIR)"/* diff --git a/doc/xschem_man/create_pdf_man b/doc/xschem_man/create_pdf_man index fa91c367..41d37278 100755 --- a/doc/xschem_man/create_pdf_man +++ b/doc/xschem_man/create_pdf_man @@ -40,5 +40,12 @@ generate_pdf () { rm -rf $tmpdir } +# check for htmldoc else return error exit status +if ! [ -x "$(command -v htmldoc)" ]; then + echo "htmldoc could not be found" + exit 1 +fi + #### generate pdf doc generate_pdf xschem_man.html xschem_man.pdf +exit 0