diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-09-16 13:31:19 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-09-16 13:31:19 +0200 |
commit | 094922a7ce67c65cfc7e7da0516848f50af203d5 (patch) | |
tree | 3fd018eccb9ccf8c86ce447704a9369981f23c26 | |
parent | 8e46410b23718ccdc8f39e35e0ad067a5375f0ec (diff) |
cleanup of build.ninja
-rw-r--r-- | confninja.sh | 57 |
1 files changed, 26 insertions, 31 deletions
diff --git a/confninja.sh b/confninja.sh index c5f8c1a..4b921b0 100644 --- a/confninja.sh +++ b/confninja.sh @@ -17,20 +17,12 @@ rule bundle command = esbuild --log-level=warning --bundle $bundle_mode --outfile=$out $in description = BUNDLE $out -rule dist - command = tar -a -cf $out $in - description = DIST $out - -rule cpy - command = cp $in $out - description = CPY $out - rule instexec - command = install -T $in $out + command = install $in $out description = INSTEXEC $out rule instdata - command = install -m0644 -T $in $out + command = install -m0644 $in $out description = INSTDATA $out rule perltest @@ -42,7 +34,7 @@ rule configure description = CONFIGURE generator = 1 -build test: perltest +build test: perltest extract END # CONFIGURE @@ -75,7 +67,10 @@ case "$MAILDIR_EXTRACTOR_NAME" in echo -n " \$extractrs_dir/src/$f" done echo + echo "build extract: phony bin/jwebmail-extract" ;; + (extractpl) echo "build extract: phony script/extract.pl";; + (extractpy) echo "build extract: phony script/extract.py";; esac # PUBLIC @@ -84,35 +79,35 @@ FILES_JS='src/displayheaders.js src/rendermail.js' if [ "$LOGIN_SCHEME" = cram_md5 ] then FILES_JS="$FILES_JS src/login_cram.js" fi + +PUBLIC= for f in $FILES_JS do case "$JWM_MODE" in - (development) echo "build public/$f | public/$f.map: bundle $f";; - (production) echo "build public/$f: bundle $f";; + (development) + echo "build public/$f | public/$f.map: bundle $f" + PUBLIC="$PUBLIC public/$f public/$f.map" + ;; + (production) + echo "build public/$f: bundle $f" + PUBLIC="$PUBLIC public/$f" + ;; esac done -FILES_CSS='my_bulma' -for f in $FILES_CSS +for f in my_bulma do case "$JWM_MODE" in - (development) echo "build public/css/$f.css | public/css/$f.css.map: scss scss/$f.scss";; - (production) echo "build public/css/$f.css: scss scss/$f.scss";; + (development) + echo "build public/css/$f.css | public/css/$f.css.map: scss scss/$f.scss" + PUBLIC="$PUBLIC public/css/$f.css public/css/$f.css.map" + ;; + (production) + echo "build public/css/$f.css: scss scss/$f.scss" + PUBLIC="$PUBLIC public/css/$f.css" + ;; esac done -# BINDIST - -#while read f -#do [ -n "$f" ] && echo "build JWebmail-bindist/$f: cpy $f" -#done <MANIFEST.BIN -# -#if command -v zstd >/dev/null -#then echo -n "build JWebmail-bindist.tar.zstd: dist" -#else echo -n "build JWebmail-bindist.tar.gz: dist" -#fi -#while read f -#do [ -n "$f" ] && echo -n " JWebmail-bindist/$f" -#done <MANIFEST.BIN -#echo +echo "build public: phony $PUBLIC" # INSTALL |