]> git.proxmox.com Git - pmg-gui.git/commitdiff
buildsys: use separate makefiles
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 30 Oct 2020 13:17:08 +0000 (14:17 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 30 Oct 2020 13:17:08 +0000 (14:17 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile
js/Makefile
js/mobile/Makefile [new file with mode: 0644]

index 2cf4b715f778ce7fb4fade58b9aaa184f8284a5e..1f54c32bb0d7971977336214ad96acada41f6a2d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,13 +28,13 @@ deb ${DEB}:
        cd build; dpkg-buildpackage -b -us -uc
        lintian ${DEB}
 
-.PHONY: js/pmgmanagerlib.js js/pmgmanagerlib-mobile.js
+.PHONY: js/pmgmanagerlib.js js/mobile/pmgmanagerlib-mobile.js
 js/pmgmanagerlib.js:
        make -C js pmgmanagerlib.js
-js/pmgmanagerlib-mobile.js:
-       make -C js pmgmanagerlib-mobile.js
+js/mobile/pmgmanagerlib-mobile.js:
+       make -C js/mobile pmgmanagerlib-mobile.js
 
-install: pmg-index.html.tt pmg-mobile-index.html.tt js/pmgmanagerlib.js js/pmgmanagerlib-mobile.js ${IMAGES} ${CSSFILES}
+install: pmg-index.html.tt pmg-mobile-index.html.tt js/pmgmanagerlib.js js/mobile/pmgmanagerlib-mobile.js ${IMAGES} ${CSSFILES}
        install -d -m 755 ${WWWBASEDIR}
        install -d -m 755 ${WWWCSSDIR}
        install -d -m 755 ${WWWIMAGESDIR}
@@ -42,7 +42,7 @@ install: pmg-index.html.tt pmg-mobile-index.html.tt js/pmgmanagerlib.js js/pmgma
        install -m 0644 pmg-index.html.tt ${WWWBASEDIR}
        install -m 0644 pmg-mobile-index.html.tt ${WWWBASEDIR}
        install -m 0644 js/pmgmanagerlib.js ${WWWJSDIR}
-       install -m 0644 js/pmgmanagerlib-mobile.js ${WWWJSDIR}
+       install -m 0644 js/mobile/pmgmanagerlib-mobile.js ${WWWJSDIR}
        for f in ${IMAGES}; do install -m 0644 "$$f" ${WWWIMAGESDIR}; done
        for f in ${CSSFILES}; do install -m 0644 "$$f" ${WWWCSSDIR}; done
 
@@ -53,6 +53,11 @@ upload: ${DEB}
 distclean: clean
        rm -f examples/simple-demo.pem
 
+.PHONY: lint
+lint:
+       $(MAKE) -C js/ lint
+       #$(MAKE) -C js/mobile lint
+
 clean:
        make -C js clean
        rm -rf ./build *.deb *.changes *.buildinfo
index badf7abcf828e812cc74d284425c9a90c7218e64..05268aedf4cbe6d14380b9a5a55639469cc2957c 100644 (file)
@@ -89,37 +89,28 @@ JSSRC=                                                      \
        SpamContextMenu.js                              \
        Application.js
 
-# caution: order is important
-MOBILESRC=                             \
-         mobile/component.js           \
-         mobile/loginscreen.js         \
-         mobile/mailview.js            \
-         mobile/quarantineview.js      \
-         mobile/utils.js               \
-         mobile/app.js                 \
-
 OnlineHelpInfo.js: /usr/bin/asciidoc-pmg
        /usr/bin/asciidoc-pmg scan-extjs ${JSSRC} >$@.tmp
        mv $@.tmp $@
 
 lint: ${JSSRC}
-       eslint ${JSSRC}
+       eslint $?
+
+lint-all: ${JSSRC}
+       eslint $^
 
 pmgmanagerlib.js: OnlineHelpInfo.js ${JSSRC}
        echo "// ${DEB_VERSION_UPSTREAM_REVISION}" > $@.tmp
        cat OnlineHelpInfo.js ${JSSRC} >> $@.tmp
        mv $@.tmp $@
 
-pmgmanagerlib-mobile.js: ${MOBILESRC}
-       cat ${MOBILESRC} >$@.tmp
-       mv $@.tmp $@
-
-all: pmgmanagerlib.js pmgmanagerlib-mobile.js
+all: pmgmanagerlib.js
 
 .PHONY: clean
 clean:
+       $(MAKE) -C mobile clean
        find . -name '*~' -exec rm {} ';'       
-       rm -rf pmgmanagerlib.js pmgmanagerlib-mobile.js OnlineHelpInfo.js
+       rm -rf pmgmanagerlib.js pmgmanagerlib.js.tmp OnlineHelpInfo.js
 
 
 
diff --git a/js/mobile/Makefile b/js/mobile/Makefile
new file mode 100644 (file)
index 0000000..862dffe
--- /dev/null
@@ -0,0 +1,17 @@
+
+# caution: order is important
+MOBILESRC=                             \
+         component.js                  \
+         loginscreen.js                \
+         mailview.js                   \
+         quarantineview.js             \
+         utils.js                      \
+         app.js                        \
+
+pmgmanagerlib-mobile.js: ${MOBILESRC}
+       cat $^ >$@.tmp
+       mv $@.tmp $@
+
+.PHONY: clean
+clean:
+       rm -rf pmgmanagerlib-mobile.js pmgmanagerlib-mobile.js.tmp