set -eu cat <<'END' # File generated by confninja.sh; DO NOT EDIT! ninja_required_version = 1.11 rule cargo command = cd $extractrs_dir && cargo build $rust_mode && cp $rs_bin ../bin description = CARGO $out rule scss command = sass --load-path=node_modules/ $scss_mode $in $out description = SCSS $out rule bundle command = esbuild --bundle $bundle_mode --outfile=$out $in description = BUNDLE $out rule dist command = tar --posix --zstd -cf $out $in description = DIST $out rule cpy command = cp $in $out description = CPY $out rule perltest command = prove -l t/ description = PERLTEST rule configure command = ./configure $confargs description = CONFIGURE generator = 1 build test: perltest END echo "confargs = $CONFARGS" echo "build build.ninja lib/JWebmail/Config.pm MANIFEST.BIN: configure configure confninja.sh lib/JWebmail/Config.pm.in MANIFEST MANIFEST.BIN.m4" case "$JWM_MODE" in (development) echo 'bundle_mode = --sourcemap' echo 'rs_bin = target/debug/jwebmail-extract' ;; (production) echo 'bundle_mode = --minify' echo 'sass_mode = --style=compress --no-source-maps' echo 'rust_mode = --release --target x86_64-unknown-linux-musl' echo 'rs_bin = target/x86_64-unknown-linux-musl/release/jwebmail-extract' ;; esac case "$MAILDIR_EXTRACTOR_NAME" in (extractrs) echo "extractrs_dir = $JWM_EXTRACTRS_DIR" echo -n 'build bin/jwebmail-extract: cargo' FILES_RS='arguments.rs cmd.rs error.rs main.rs rfc822.rs cmd/count.rs cmd/folders.rs cmd/list.rs cmd/raw.rs' for f in $FILES_RS do echo -n " \$extractrs_dir/src/$f" done echo ;; esac FILES_JS='src/displayheaders.js src/rendermail.js' if [ "$LOGIN_SCHEME" = cram_md5 ] then FILES_JS="$FILES_JS src/login_cram.js" fi 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";; esac done FILES_CSS='my_bulma' for f in $FILES_CSS 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";; esac done while read f do [ -n "$f" ] && echo "build JWebmail-srcdist/$f: cpy $f" done