]> granicus.if.org Git - jq/commitdiff
Fix build on BSD make
authorMuh Muhten <muh.muhten@gmail.com>
Wed, 30 Jan 2019 05:05:49 +0000 (00:05 -0500)
committerNico Williams <nico@cryptonector.com>
Wed, 30 Jan 2019 15:48:04 +0000 (09:48 -0600)
Replace uses of the nonstandard $^ variable by explicitly specifying the
source filenames. This is the only obvious thing preventing the build
from running correctly on non-GNU make.

Makefile.am

index d79637df97a8e180f14e8cb0e9793524cee0c4a1..4b47d74aa0ff59f6704832a18b353a771da88d9d 100644 (file)
@@ -106,7 +106,7 @@ src/main.c: src/version.h
 
 src/builtin.inc: src/builtin.jq
        mkdir -p src
-       $(AM_V_GEN) sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' $^ > $@
+       $(AM_V_GEN) sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' src/builtin.jq > $@
 src/builtin.o: src/builtin.inc
 
 bin_PROGRAMS = jq
@@ -135,10 +135,10 @@ if ENABLE_DOCS
 jq.1: $(srcdir)/docs/content/3.manual/manual.yml
        $(AM_V_GEN) ( cd ${abs_srcdir}/docs; '$(BUNDLER)' exec rake manpage ) > $@ || { rm -f $@; false; }
 jq.1.prebuilt: jq.1
-       $(AM_V_GEN) cp $^ $@ || { rm -f $@; false; }
+       $(AM_V_GEN) cp jq.1 $@ || { rm -f $@; false; }
 else
 jq.1: $(srcdir)/jq.1.prebuilt
-       $(AM_V_GEN) cp $^ $@
+       $(AM_V_GEN) cp $(srcdir)/jq.1.prebuilt $@
 endif