]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
FreeBSD: Support different stat format in Makefile.webui.
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Wed, 19 Sep 2018 15:57:24 +0000 (16:57 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 20 Sep 2018 12:35:11 +0000 (14:35 +0200)
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

index ff8a1745e9405eb1e14c8c9fd5704079459c0d14..01166ce7437e33670dc25b5be06802f539a06086 100644 (file)
@@ -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