[pve-devel] [PATCH docs 1/4] pve-doc-generator: make include dirs configurable
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Oct 17 13:01:57 CEST 2018
by setting PERL_DOC_INC_DIRS before including pve-doc-generator.mk
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
note: needed by pve-manager, pve-cluster could probably also use this. future
changes moving doc-generation into its own subdir/makefile would also benefit
from having this already in place ;)
pve-doc-generator.mk.in | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/pve-doc-generator.mk.in b/pve-doc-generator.mk.in
index ddc0217..893e9f8 100644
--- a/pve-doc-generator.mk.in
+++ b/pve-doc-generator.mk.in
@@ -6,6 +6,8 @@ DGDIR?=/usr/share/pve-doc-generator
ASCIIDOC_PVE?=/usr/bin/asciidoc-pve
PERL_DOC_ENV=PVE_GENERATING_DOCS=1
+PERL_DOC_INC_DIRS:=${PERL_DOC_INC_DIRS} .
+PERL_DOC_INC=$(foreach dir,${PERL_DOC_INC_DIRS},-I${dir})
PVE_COMMON_DOC_SOURCES= \
${ASCIIDOC_PVE} \
@@ -19,22 +21,22 @@ attributes.txt docinfo.xml pmxcfs.8-synopsis.adoc:
mv $@.tmp $@
%-opts.adoc: ${DGDIR}/gen-%-opts.pl
- $(PERL_DOC_ENV) perl -I. ${DGDIR}/gen-$*-opts.pl >$@.tmp
+ $(PERL_DOC_ENV) perl ${PERL_DOC_INC} ${DGDIR}/gen-$*-opts.pl >$@.tmp
mv $@.tmp $@
%.adoc: ${DGDIR}/gen-%-adoc.pl
- $(PERL_DOC_ENV) perl -I. ${DGDIR}/gen-$*-adoc.pl >$@.tmp
+ $(PERL_DOC_ENV) perl ${PERL_DOC_INC} ${DGDIR}/gen-$*-adoc.pl >$@.tmp
mv $@.tmp $@
pveperf.1-synopsis.adoc:
echo '*pveperf* `[PATH]`' > pveperf.1-synopsis.adoc
%.1-synopsis.adoc:
- $(PERL_DOC_ENV) perl -I. -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsis();" > $@.tmp
+ $(PERL_DOC_ENV) perl ${PERL_DOC_INC} -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsis();" > $@.tmp
mv $@.tmp $@
%.8-synopsis.adoc:
- $(PERL_DOC_ENV) perl -I. -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsis();" > $@.tmp
+ $(PERL_DOC_ENV) perl ${PERL_DOC_INC} -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsis();" > $@.tmp
mv $@.tmp $@
ifneq (${DGDIR},.)
--
2.19.1
More information about the pve-devel
mailing list