]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Run gperf with --output-file instead of output redirection
authorMartin Willi <martin@strongswan.org>
Mon, 15 Jul 2019 05:43:06 +0000 (07:43 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 26 Aug 2019 08:56:36 +0000 (10:56 +0200)
When missing gperf, the redirection generates an empty file, which must
be manually removed after gperf has been installed. This is difficult
to diagnose, as the produced build error is cryptic.

Use --output-file of gperf instead to avoid creating an empty file if
gperf is missing. This still requires the user to re-run ./configure
after installing gperf, though.

src/libstrongswan/Makefile.am
src/starter/Makefile.am
src/stroke/Makefile.am

index 827e0adb27939b2923cd777694b0e42e7f446f24..db8e9c23ac6e05c9ca221abd0c37da33d3887e09 100644 (file)
@@ -236,8 +236,8 @@ $(srcdir)/crypto/proposal/proposal_keywords_static.h: $(srcdir)/crypto/proposal/
 $(srcdir)/crypto/proposal/proposal_keywords_static.c:  $(srcdir)/crypto/proposal/proposal_keywords_static.txt \
                                                                                                                $(srcdir)/crypto/proposal/proposal_keywords_static.h
                $(AM_V_GEN) \
-               $(GPERF) -N proposal_get_token_static -m 10 -C -G -c -t -D \
-                                                                                               $(srcdir)/crypto/proposal/proposal_keywords_static.txt > $@
+               $(GPERF) -N proposal_get_token_static -m 10 -C -G -c -t -D \
+                       --output-file=$@ $<
 
 if STATIC_PLUGIN_CONSTRUCTORS
 BUILT_SOURCES += $(srcdir)/plugin_constructors.c
index 759d179d3ea64ea3edd8732cfb4733a0fc9f9413..1dc656fed85dc32dc3601da38a58cfe16bb9b9ab 100644 (file)
@@ -54,7 +54,8 @@ keywords.h: $(srcdir)/keywords.h.in
 
 keywords.c:    $(srcdir)/keywords.txt keywords.h
                $(AM_V_GEN) \
-               $(GPERF) -m 10 -C -G -D -t < $(srcdir)/keywords.txt > $@
+               $(GPERF) -m 10 -C -G -D -t \
+                       --output-file=$@ $<
 
 install-exec-local :
                test -e "$(DESTDIR)${sysconfdir}/ipsec.d" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d" || true
index 5c04b5ae79d81a310fe399d02e3c2cebce75fbe2..3b7c465b63a8b4d9b20a3b5985b34b9b9864c56f 100644 (file)
@@ -19,4 +19,5 @@ stroke_keywords.h: $(srcdir)/stroke_keywords.h.in
 
 stroke_keywords.c:     $(srcdir)/stroke_keywords.txt stroke_keywords.h
                $(AM_V_GEN) \
-               $(GPERF) -m 10 -D -C -G -t < $(srcdir)/stroke_keywords.txt > $@
+               $(GPERF) -m 10 -D -C -G -t \
+                       --output-file=$@ $<