From: E.Smith <31170571+azlm8t@users.noreply.github.com> Date: Wed, 19 Sep 2018 15:57:24 +0000 (+0100) Subject: FreeBSD: Support different stat format in Makefile.webui. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b251feaa0bdedc2869e45d0922b3c9b181c10089;p=thirdparty%2Ftvheadend.git 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.. --- diff --git a/Makefile.webui b/Makefile.webui index ff8a1745e..01166ce74 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 = @@ -194,22 +200,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