]> git.proxmox.com Git - pve-docs.git/commitdiff
makefile: convert to use simple parenthesis
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 18 May 2023 11:58:48 +0000 (13:58 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 18 May 2023 13:10:32 +0000 (15:10 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index df339c2ef472261c33c97a5ccd38c8722ffd4649..cfc4661f6bcec7f5d19c22104d0251acab67019d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,12 +12,12 @@ GITVERSION:=$(shell git rev-parse HEAD)
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
-GEN_DEB=${GEN_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${ARCH}.deb
-DOC_DEB=${DOC_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
-MEDIAWIKI_DEB=${MEDIAWIKI_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+GEN_DEB=$(GEN_PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_$(ARCH).deb
+DOC_DEB=$(DOC_PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
+MEDIAWIKI_DEB=$(MEDIAWIKI_PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
 
 export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
-SOURCE_DATE_HUMAN := $(shell date -d "@${SOURCE_DATE_EPOCH}")
+SOURCE_DATE_HUMAN := $(shell date -d "@$(SOURCE_DATE_EPOCH)")
 
 all: index.html
 
@@ -26,21 +26,21 @@ verify-images:
        for i in ./images/screenshot/*.png; do ./png-verify.pl $$i; done
 
 ADOC_SOURCES_GUESS=$(filter-out %-synopsis.adoc %-opts.adoc %-table.adoc, $(wildcard *.adoc))
-.pve-doc-depends link-refs.json: ${ADOC_SOURCES_GUESS} scan-adoc-refs
+.pve-doc-depends link-refs.json: $(ADOC_SOURCES_GUESS) scan-adoc-refs
        ./scan-adoc-refs *.adoc --depends .pve-doc-depends.tmp > link-refs.json.tmp
        @cmp --quiet .pve-doc-depends .pve-doc-depends.tmp || mv .pve-doc-depends.tmp .pve-doc-depends
        @cmp --quiet link-refs.json link-refs.json.tmp || mv link-refs.json.tmp link-refs.json
 
 pve-doc-generator.mk: .pve-doc-depends pve-doc-generator.mk.in
        cat pve-doc-generator.mk.in .pve-doc-depends > $@.tmp
-       sed -i "s/@RELEASE@$$/${DEB_VERSION_UPSTREAM}/" $@.tmp
+       sed -i "s/@RELEASE@$$/$(DEB_VERSION_UPSTREAM)/" $@.tmp
        mv $@.tmp $@
 
 -include ./pve-doc-generator.mk
 
 GEN_DEB_SOURCES=                               \
        pve-doc-generator.mk                    \
-       ${MANUAL_SOURCES}                       \
+       $(MANUAL_SOURCES)                       \
        pmxcfs.8-synopsis.adoc                  \
        qmeventd.8-synopsis.adoc                \
        docinfo.xml
@@ -74,7 +74,7 @@ API_VIEWER_SOURCES=                           \
 
 asciidoc-pve: asciidoc-pve.in link-refs.json
        cat asciidoc-pve.in link-refs.json >asciidoc-pve.tmp
-       sed -e s/@RELEASE@/${DOCRELEASE}/ -i asciidoc-pve.tmp
+       sed -e s/@RELEASE@/$(DOCRELEASE)/ -i asciidoc-pve.tmp
        chmod +x asciidoc-pve.tmp
        mv asciidoc-pve.tmp asciidoc-pve
 
@@ -90,14 +90,14 @@ INDEX_INCLUDES=                                                             \
        man1-index-table.adoc                                           \
        man5-index-table.adoc                                           \
        man8-index-table.adoc                                           \
-       $(sort $(addsuffix .html, ${MANUAL_PAGES}) ${CHAPTER_LIST})
+       $(sort $(addsuffix .html, $(MANUAL_PAGES)) $(CHAPTER_LIST))
 
-ADOC_STDARG=-b $(shell pwd)/asciidoc/pve-html -f asciidoc/asciidoc-pve.conf -a icons -a data-uri -a "date=${SOURCE_DATE_HUMAN}" -a "revnumber=${DOCRELEASE}" -a footer-style=revdate
+ADOC_STDARG=-b $(shell pwd)/asciidoc/pve-html -f asciidoc/asciidoc-pve.conf -a icons -a data-uri -a "date=$(SOURCE_DATE_HUMAN)" -a "revnumber=$(DOCRELEASE)" -a footer-style=revdate
 
 BROWSER?=xdg-open
 
 README.html: README.adoc
-       asciidoc -a toc ${ADOC_STDARG} -o $@ $<
+       asciidoc -a toc $(ADOC_STDARG) -o $@ $<
 
 .PHONY: index
 index: index.html
@@ -119,13 +119,13 @@ man8-index-table.adoc: asciidoc-pve
        ./asciidoc-pve man8page-table >$@.tmp
        mv $@.tmp $@
 
-index.html: index.adoc ${API_VIEWER_SOURCES} ${INDEX_INCLUDES}
-       asciidoc ${ADOC_STDARG} -o $@ index.adoc
+index.html: index.adoc $(API_VIEWER_SOURCES) $(INDEX_INCLUDES)
+       asciidoc $(ADOC_STDARG) -o $@ index.adoc
 
-pve-admin-guide.html: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
-       asciidoc -a pvelogo ${ADOC_STDARG} -o $@ pve-admin-guide.adoc
+pve-admin-guide.html: $(PVE_ADMIN_GUIDE_ADOCDEPENDS)
+       asciidoc -a pvelogo $(ADOC_STDARG) -o $@ pve-admin-guide.adoc
 
-pve-admin-guide.chunked: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
+pve-admin-guide.chunked: $(PVE_ADMIN_GUIDE_ADOCDEPENDS)
        rm -rf $@.tmp $@
        mkdir $@.tmp
        a2x -D $@.tmp -a docinfo -a docinfo1 -a icons -f chunked pve-admin-guide.adoc
@@ -136,40 +136,40 @@ PVE_DBLATEX_OPTS='-p ./asciidoc/pve-dblatex.xsl -s asciidoc/dblatex-custom.sty -
 
 YEAR:=$(shell date '+%Y')
 pve-admin-guide-docinfo.xml: pve-admin-guide-docinfo.xml.in
-       sed -e 's/@RELEASE@/${DOCRELEASE}/' -e 's/@YEAR@/${YEAR}/' <$< >$@
+       sed -e 's/@RELEASE@/$(DOCRELEASE)/' -e 's/@YEAR@/$(YEAR)/' <$< >$@
 
-pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} docinfo.xml pve-admin-guide-docinfo.xml
+pve-admin-guide.pdf: $(PVE_ADMIN_GUIDE_ADOCDEPENDS) docinfo.xml pve-admin-guide-docinfo.xml
        rsvg-convert -f pdf -o proxmox-logo.pdf images/proxmox-logo.svg
        rsvg-convert -f pdf -o proxmox-ci-header.pdf images/proxmox-ci-header.svg
-       grep ">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in  pve-admin-guide-docinfo.xml" && false);
-       a2x -a docinfo -a docinfo1 -f pdf -L --asciidoc-opts="${PVE_DOCBOOK_CONF}" --dblatex-opts ${PVE_DBLATEX_OPTS} pve-admin-guide.adoc
+       grep ">Release $(DOCRELEASE)<" pve-admin-guide-docinfo.xml || (echo "wrong release in  pve-admin-guide-docinfo.xml" && false);
+       a2x -a docinfo -a docinfo1 -f pdf -L --asciidoc-opts="$(PVE_DOCBOOK_CONF)" --dblatex-opts $(PVE_DBLATEX_OPTS) pve-admin-guide.adoc
        rm proxmox-logo.pdf proxmox-ci-header.pdf
 
-pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
+pve-admin-guide.epub: $(PVE_ADMIN_GUIDE_ADOCDEPENDS)
        rm -rf $@.tmp $@
        mkdir $@.tmp
-       a2x -D $@.tmp -f epub --asciidoc-opts="${PVE_DOCBOOK_CONF}" pve-admin-guide.adoc
+       a2x -D $@.tmp -f epub --asciidoc-opts="$(PVE_DOCBOOK_CONF)" pve-admin-guide.adoc
        mv $@.tmp/$@ $@
 
 api-viewer/apidata.js: extractapi.pl
        ./extractapi.pl >$@
 
-api-viewer/apidoc.js: ${API_VIEWER_FILES}
-       cat ${API_VIEWER_FILES} >$@.tmp
+api-viewer/apidoc.js: $(API_VIEWER_FILES)
+       cat $(API_VIEWER_FILES) >$@.tmp
        mv $@.tmp $@
 
 .PHONY: dinstall
-dinstall: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
-       dpkg -i ${GEN_DEB} ${DOC_DEB} # ${MEDIAWIKI_DEB}
+dinstall: $(GEN_DEB) $(DOC_DEB) $(MEDIAWIKI_DEB)
+       dpkg -i $(GEN_DEB) $(DOC_DEB) # $(MEDIAWIKI_DEB)
 
 .PHONY: deb
 deb: $(DOC_DEB)
 $(MEDIAWIKI_DEB) $(GEN_DEB): $(DOC_DEB)
 $(DOC_DEB):
-       rm -f ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
+       rm -f $(GEN_DEB) $(DOC_DEB) $(MEDIAWIKI_DEB)
        rm -rf build
        rsync -a * build/
-       echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
+       echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout $(GITVERSION)" > build/debian/SOURCE
        cd build; dpkg-buildpackage -b -us -uc
        lintian $(DOC_DEB) $(GEN_DEB) $(MEDIAWIKI_DEB)
 
@@ -186,33 +186,33 @@ gen-install: $(GEN_DEB_SOURCES) asciidoc-pve asciidoc/mediawiki.conf
        install -dm755 $(DESTDIR)/usr/share/doc/$(GEN_PACKAGE)
        install -dm755 $(DESTDIR)/usr/bin
        # install files
-       install -m 0644 ${GEN_DEB_SOURCES} $(DESTDIR)/usr/share/${GEN_PACKAGE}
-       install -m 0755 ${GEN_SCRIPTS} $(DESTDIR)/usr/share/${GEN_PACKAGE}
+       install -m 0644 $(GEN_DEB_SOURCES) $(DESTDIR)/usr/share/$(GEN_PACKAGE)
+       install -m 0755 $(GEN_SCRIPTS) $(DESTDIR)/usr/share/$(GEN_PACKAGE)
        # install asciidoc-pve
        install -m 0755 asciidoc-pve $(DESTDIR)/usr/bin/
-       install -D -m 0644 asciidoc/mediawiki.conf $(DESTDIR)/usr/share/${GEN_PACKAGE}/asciidoc/mediawiki.conf
-       install -m 0644 asciidoc/asciidoc-pve.conf $(DESTDIR)/usr/share/${GEN_PACKAGE}/asciidoc/
-       install -m 0644 asciidoc/pve-html.conf $(DESTDIR)/usr/share/${GEN_PACKAGE}/asciidoc/
+       install -D -m 0644 asciidoc/mediawiki.conf $(DESTDIR)/usr/share/$(GEN_PACKAGE)/asciidoc/mediawiki.conf
+       install -m 0644 asciidoc/asciidoc-pve.conf $(DESTDIR)/usr/share/$(GEN_PACKAGE)/asciidoc/
+       install -m 0644 asciidoc/pve-html.conf $(DESTDIR)/usr/share/$(GEN_PACKAGE)/asciidoc/
 
 .PHONY: doc-install
 doc-install: index.html $(WIKI_IMPORTS) $(API_VIEWER_SOURCES) verify-images examples
        install -dm755 $(DESTDIR)/usr/share/$(DOC_PACKAGE)
        install -dm755 $(DESTDIR)/usr/share/doc/$(DOC_PACKAGE)
        # install files for pvedocs package
-       install -dm755 $(DESTDIR)/usr/share/${DOC_PACKAGE}
-       install -dm755 $(DESTDIR)/usr/share/doc/${DOC_PACKAGE}
-       install -dm755 $(DESTDIR)/usr/share/${DOC_PACKAGE}/examples/
-       install -m 755 examples/guest-example-hookscript.pl $(DESTDIR)/usr/share/${DOC_PACKAGE}/examples/
-       install -m 0644 index.html ${INDEX_INCLUDES} $(DESTDIR)/usr/share/${DOC_PACKAGE}
-       install -m 0644 ${WIKI_IMPORTS} $(DESTDIR)/usr/share/${DOC_PACKAGE}
+       install -dm755 $(DESTDIR)/usr/share/$(DOC_PACKAGE)
+       install -dm755 $(DESTDIR)/usr/share/doc/$(DOC_PACKAGE)
+       install -dm755 $(DESTDIR)/usr/share/$(DOC_PACKAGE)/examples/
+       install -m 755 examples/guest-example-hookscript.pl $(DESTDIR)/usr/share/$(DOC_PACKAGE)/examples/
+       install -m 0644 index.html $(INDEX_INCLUDES) $(DESTDIR)/usr/share/$(DOC_PACKAGE)
+       install -m 0644 $(WIKI_IMPORTS) $(DESTDIR)/usr/share/$(DOC_PACKAGE)
        # install images
        make -C images install
        # install screenshot images
-       install -dm755 $(DESTDIR)/usr/share/${DOC_PACKAGE}/images/screenshot
-       install -m 0644 images/screenshot/*.png $(DESTDIR)/usr/share/${DOC_PACKAGE}/images/screenshot
+       install -dm755 $(DESTDIR)/usr/share/$(DOC_PACKAGE)/images/screenshot
+       install -m 0644 images/screenshot/*.png $(DESTDIR)/usr/share/$(DOC_PACKAGE)/images/screenshot
        # install api doc viewer
-       install -dm755 $(DESTDIR)/usr/share/${DOC_PACKAGE}/api-viewer
-       install -m 0644 ${API_VIEWER_SOURCES} $(DESTDIR)/usr/share/${DOC_PACKAGE}/api-viewer
+       install -dm755 $(DESTDIR)/usr/share/$(DOC_PACKAGE)/api-viewer
+       install -m 0644 $(API_VIEWER_SOURCES) $(DESTDIR)/usr/share/$(DOC_PACKAGE)/api-viewer
 
 .PHONY: mediawiki-install
 mediawiki-install: pve-docs-mediawiki-import
@@ -224,8 +224,8 @@ mediawiki-install: pve-docs-mediawiki-import
        install -m 0755 pve-docs-mediawiki-import $(DESTDIR)/usr/bin/
 
 .PHONY: upload
-upload: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
-       tar cf - ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye
+upload: $(GEN_DEB) $(DOC_DEB) $(MEDIAWIKI_DEB)
+       tar cf - $(GEN_DEB) $(DOC_DEB) $(MEDIAWIKI_DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye
 
 .PHONY: update
 update:
@@ -236,7 +236,7 @@ update:
 .PHONY: update-static
 update-static:
        make clean-static
-       make $(filter %-synopsis.adoc %-opts.adoc, ${PVE_ADMIN_GUIDE_ADOCDEPENDS}) pve-firewall-macros.adoc api-viewer/apidata.js
+       make $(filter %-synopsis.adoc %-opts.adoc, $(PVE_ADMIN_GUIDE_ADOCDEPENDS)) pve-firewall-macros.adoc api-viewer/apidata.js
 
 .PHONY: clean-static
 clean-static: