Commit 04781b0a5c767454e569694f5b96c8ae6e9127ea

David Seifert 2021-10-05T04:34:48

build: Avoid non-portable '$<' in non-inference rules OpenBSD's 'pmake' chokes on these. Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/man/Makefile.am b/man/Makefile.am
index 9116453..60ef4db 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -12,13 +12,13 @@ SED_MD4_SUBST = -e 's/mdX/md4/g' -e 's/MDX/MD4/g'
 SED_MD5_SUBST = -e 's/mdX/md5/g' -e 's/MDX/MD5/g'
 
 md2.3: $(srcdir)/mdX.3
-	$(AM_V_GEN) $(SED) $(SED_MD2_SUBST) $< >$@
+	$(AM_V_GEN) $(SED) $(SED_MD2_SUBST) $(srcdir)/mdX.3 >$@
 
 md4.3: $(srcdir)/mdX.3
-	$(AM_V_GEN) $(SED) $(SED_MD4_SUBST) $< >$@
+	$(AM_V_GEN) $(SED) $(SED_MD4_SUBST) $(srcdir)/mdX.3 >$@
 
 md5.3: $(srcdir)/mdX.3
-	$(AM_V_GEN) $(SED) $(SED_MD5_SUBST) $< >$@
+	$(AM_V_GEN) $(SED) $(SED_MD5_SUBST) $(srcdir)/mdX.3 >$@
 
 dist_man_MANS = \
 	md2.3 \
diff --git a/src/Makefile.am b/src/Makefile.am
index 2f3f555..d9363a9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -74,34 +74,34 @@ DISTCLEANFILES = \
 # Generate a simple libtool symbol export list to be used as a fallback if
 # there is no version script support.
 libmd.sym: libmd.map
-	$(AM_V_GEN) $(SED) -ne 's/^[[:space:]]\{1,\}\([A-Za-z0-9]\{1,\}\);/\1/p' $< > $@
+	$(AM_V_GEN) $(SED) -ne 's/^[[:space:]]\{1,\}\([A-Za-z0-9]\{1,\}\);/\1/p' libmd.map > $@
 
 md2hl.c: helper.c
-	$(AM_V_GEN) $(SED) -e 's/hashinc/md2.h/g' -e 's/HASH/MD2/g' $< > $@
+	$(AM_V_GEN) $(SED) -e 's/hashinc/md2.h/g' -e 's/HASH/MD2/g' helper.c > $@
 
 md4hl.c: helper.c
-	$(AM_V_GEN) $(SED) -e 's/hashinc/md4.h/g' -e 's/HASH/MD4/g' $< > $@
+	$(AM_V_GEN) $(SED) -e 's/hashinc/md4.h/g' -e 's/HASH/MD4/g' helper.c > $@
 
 md5hl.c: helper.c
-	$(AM_V_GEN) $(SED) -e 's/hashinc/md5.h/g' -e 's/HASH/MD5/g' $< > $@
+	$(AM_V_GEN) $(SED) -e 's/hashinc/md5.h/g' -e 's/HASH/MD5/g' helper.c > $@
 
 rmd160hl.c: helper.c
-	$(AM_V_GEN) $(SED) -e 's/hashinc/rmd160.h/g' -e 's/HASH/RMD160/g' $< > $@
+	$(AM_V_GEN) $(SED) -e 's/hashinc/rmd160.h/g' -e 's/HASH/RMD160/g' helper.c > $@
 
 sha1hl.c: helper.c
-	$(AM_V_GEN) $(SED) -e 's/hashinc/sha1.h/g' -e 's/HASH/SHA1/g' $< > $@
+	$(AM_V_GEN) $(SED) -e 's/hashinc/sha1.h/g' -e 's/HASH/SHA1/g' helper.c > $@
 
 sha256hl.c: helper.c
 	$(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA256/g' \
-	                -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' $< > $@
+	                -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@
 
 sha384hl.c: helper.c
 	$(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA384/g' \
-	                -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' $< > $@
+	                -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@
 
 sha512hl.c: helper.c
 	$(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA512/g' \
-	                -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' $< > $@
+	                -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@
 
 runtimelibdir = $(libdir)