]> git.proxmox.com Git - pmg-gui.git/commitdiff
buildsys: fix makefile dependencies
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Oct 2020 11:09:46 +0000 (13:09 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Oct 2020 11:09:48 +0000 (13:09 +0200)
To ensure relevant stuff is always rebuild include the CSS and image
files in the install dependencies.

Further, mark the meta targets for building the pmgmanagerlib normal
and mobile versions as PHONY, as they only re-direct the make to the
respective makefile we need to ensure it always does, as else it
circumvents the actual dependency declaration of the responsible
targets.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index b5ba9d45c5a9c6304098a12433042bd5c92cc88b..2cf4b715f778ce7fb4fade58b9aaa184f8284a5e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,19 +5,17 @@ PACKAGE=pmg-gui
 DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
 
 DESTDIR=
-
 DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
-
 WWWBASEDIR=${DESTDIR}/usr/share/javascript/${PACKAGE}
 WWWCSSDIR=${WWWBASEDIR}/css
 WWWIMAGESDIR=${WWWBASEDIR}/images
 WWWJSDIR=${WWWBASEDIR}/js
 
 IMAGES=                                \
-       logo-128.png            \
-       proxmox_logo.png
+       images/logo-128.png             \
+       images/proxmox_logo.png
 
-CSSFILES = ext6-pmg.css ext6-pmg-mobile.css
+CSSFILES = css/ext6-pmg.css css/ext6-pmg-mobile.css
 
 export DEB_VERSION_UPSTREAM_REVISION
 
@@ -30,13 +28,14 @@ deb ${DEB}:
        cd build; dpkg-buildpackage -b -us -uc
        lintian ${DEB}
 
+.PHONY: js/pmgmanagerlib.js js/pmgmanagerlib-mobile.js
 js/pmgmanagerlib.js:
        make -C js pmgmanagerlib.js
-
 js/pmgmanagerlib-mobile.js:
        make -C js pmgmanagerlib-mobile.js
 
-install: pmg-index.html.tt js/pmgmanagerlib.js js/pmgmanagerlib-mobile.js
+install: pmg-index.html.tt pmg-mobile-index.html.tt js/pmgmanagerlib.js js/pmgmanagerlib-mobile.js ${IMAGES} ${CSSFILES}
+       install -d -m 755 ${WWWBASEDIR}
        install -d -m 755 ${WWWCSSDIR}
        install -d -m 755 ${WWWIMAGESDIR}
        install -d -m 755 ${WWWJSDIR}
@@ -44,8 +43,8 @@ install: pmg-index.html.tt js/pmgmanagerlib.js js/pmgmanagerlib-mobile.js
        install -m 0644 pmg-mobile-index.html.tt ${WWWBASEDIR}
        install -m 0644 js/pmgmanagerlib.js ${WWWJSDIR}
        install -m 0644 js/pmgmanagerlib-mobile.js ${WWWJSDIR}
-       for i in ${IMAGES}; do install -m 0644 images/$$i ${WWWIMAGESDIR}; done
-       for i in ${CSSFILES}; do install -m 0644 css/$$i ${WWWCSSDIR}; done
+       for f in ${IMAGES}; do install -m 0644 "$$f" ${WWWIMAGESDIR}; done
+       for f in ${CSSFILES}; do install -m 0644 "$$f" ${WWWCSSDIR}; done
 
 .PHONY: upload
 upload: ${DEB}