summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-08-20 00:18:44 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-08-20 16:39:14 +0200
commit9009ba6511733c3ea96519ef8023c19828965bd2 (patch)
tree29e9e4fbab9de7afa9d170c263c650551c8ca0ba
parent12897fd34dbd37a77e4adb60750344e451c44679 (diff)
downloadgnutls-9009ba6511733c3ea96519ef8023c19828965bd2.tar.gz
sed: use it in a portable way in makefiles
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-rw-r--r--lib/Makefile.am6
-rw-r--r--lib/x509/Makefile.am4
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 9e22bb92cf..3ea1c6cebb 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -222,6 +222,6 @@ gnutls_asn1_tab.c: $(srcdir)/gnutls.asn
-asn1Parser $(srcdir)/gnutls.asn gnutls_asn1_tab.c
priority_options.h: $(srcdir)/priority_options.gperf
- -gperf --global-table -t $^ > $@-tmp && sed -i 's/^const struct priority_options_st \*/static const struct priority_options_st \*/' $@-tmp && mv $@-tmp $@
-
-
+ -gperf --global-table -t $^ > $@-tmp \
+ && sed 's/^const struct priority_options_st \*/static const struct priority_options_st \*/' <$@-tmp >$@ \
+ && rm -f $@-tmp
diff --git a/lib/x509/Makefile.am b/lib/x509/Makefile.am
index d4d9cdae61..128306b95c 100644
--- a/lib/x509/Makefile.am
+++ b/lib/x509/Makefile.am
@@ -86,4 +86,6 @@ libgnutls_x509_la_SOURCES += ocsp.c ocsp_output.c
endif
supported_exts.h: $(srcdir)/supported_exts.gperf
- -gperf --global-table -t $^ > $@-tmp && sed -i 's/^const struct supported_exts_st \*/static const struct supported_exts_st \*/' $@-tmp && mv $@-tmp $@
+ -gperf --global-table -t $^ > $@-tmp \
+ && sed 's/^const struct supported_exts_st \*/static const struct supported_exts_st \*/' <$@-tmp >$@ \
+ && rm -f $@-tmp