From 53aa769d1872dd426a6cb910a0593c0da71a7ab6 Mon Sep 17 00:00:00 2001 From: "E.Smith" <31170571+azlm8t@users.noreply.github.com> Date: Wed, 19 Sep 2018 16:57:24 +0100 Subject: [PATCH] FreeBSD: Support different stat format in Makefile.webui. The stat program on FreeBSD requires different arguments to GNU stat. In the past, this is done by the ports patching the Makefile post-extract. Instead, we'll configure the program's arguments based on platform. We'll also use %z (filesize) instead of the port's %b (file blocks) so we generate equivalent output to the Linux version.. --- Makefile.webui | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile.webui b/Makefile.webui index 9bc3c1880..e63396c2e 100644 --- a/Makefile.webui +++ b/Makefile.webui @@ -45,6 +45,12 @@ else DEBUG = -debug endif +ifeq ($(PLATFORM), freebsd) +STAT_ARG=-f "%-35N %7z" +else +STAT_ARG=--printf="%-35n %7s\n" +endif + JAVASCRIPT = JAVASCRIPT2 = JAVASCRIPT_TV = @@ -189,22 +195,22 @@ define GO_JS $(VV)$(CSS_PY) --in="$^" utf-check $(VV)cat $^ > $@.tmp $(VV)$(RUN_JS) < $@.tmp > $@.tmp2 - @stat --printf="%-35n %7s\n" $@.tmp $@.tmp2 + @stat $(STAT_ARG) $@.tmp $@.tmp2 $(VV)$(GZIPCMD) -c $@.tmp2 > $@.tmp @rm $@.tmp2 @mv $@.tmp $@ - @stat --printf="%-35n %7s\n" $@ + @stat $(STAT_ARG) $@ endef define GO_CSS $(VV)$(CSS_PY) --in="$^" utf-check $(VV)$(CSS_PY) --in="$^" > $@.tmp $(VV)$(RUN_CSS) < $@.tmp > $@.tmp2 - @stat --printf="%-35n %7s\n" $@.tmp $@.tmp2 + @stat $(STAT_ARG) $@.tmp $@.tmp2 $(VV)$(GZIPCMD) -c $@.tmp2 > $@.tmp @rm $@.tmp2 @mv $@.tmp $@ - @stat --printf="%-35n %7s\n" $@ + @stat $(STAT_ARG) $@ endef define merge-po -- 2.47.2