]> git.ipfire.org Git - pbs.git/commitdiff
configure: Depend on sassc and uglifyjs
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 May 2022 13:19:18 +0000 (13:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 May 2022 13:19:18 +0000 (13:19 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
configure.ac

index 2277eb4df44f049fac9b765d7b3e7861db471ffb..0affc3b5a6fc63dd19931435bb9495d5cb9251c8 100644 (file)
@@ -432,5 +432,16 @@ SED_PROCESS = \
        $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
                < $< > $@
 
+UGLIFYJS_PROCESS = \
+       $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+               $(UGLIFYJS) --compress --mangle -- $< > $@
+
 %: %.in Makefile
        $(SED_PROCESS)
+
+%.css: %.scss
+       $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+               $(SASSC) --style compressed $< > $@
+
+%.min.js: %.js
+       $(UGLIFYJS_PROCESS)
index 2302ccc5b14939760b25c447fa29214a0255d18b..7dada070ed6d96882850ac316a20d986e4ca2715 100644 (file)
@@ -54,6 +54,18 @@ AC_PROG_SED
 # Python
 AM_PATH_PYTHON([3.9])
 
+# SASSC
+AC_CHECK_PROG(SASSC, [sassc], [sassc])
+if test -z "${SASSC}"; then
+       AC_MSG_ERROR([sassc is required])
+fi
+
+# uglifyjs.terser
+AC_CHECK_PROG(UGLIFYJS, [uglifyjs.terser], [uglifyjs.terser])
+if test -z "${UGLIFYJS}"; then
+       AC_MSG_ERROR([uglifyjs.terser is required])
+fi
+
 save_LIBS="$LIBS"
 
 # pkg-config