Skip to content

Commit

Permalink
build: Explicitly depend on sed
Browse files Browse the repository at this point in the history
Signed-off-by: Guillem Jover <guillem@hadrons.org>
  • Loading branch information
SoapGentoo authored and guillemj committed Oct 5, 2021
1 parent dc32a59 commit 85f7006
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ LT_INIT
LIBMD_LINKER_VERSION_SCRIPT

# Checks for programs.
AC_PROG_SED
AC_PROG_CC

# Checks for the build machinery.
Expand Down
6 changes: 3 additions & 3 deletions man/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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) $< >$@

md4.3: $(srcdir)/mdX.3
$(AM_V_GEN) sed $(SED_MD4_SUBST) $< >$@
$(AM_V_GEN) $(SED) $(SED_MD4_SUBST) $< >$@

md5.3: $(srcdir)/mdX.3
$(AM_V_GEN) sed $(SED_MD5_SUBST) $< >$@
$(AM_V_GEN) $(SED) $(SED_MD5_SUBST) $< >$@

dist_man_MANS = \
md2.3 \
Expand Down
20 changes: 10 additions & 10 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -74,33 +74,33 @@ 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' $< > $@

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' $< > $@

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' $< > $@

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' $< > $@

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' $< > $@

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' $< > $@

sha256hl.c: helper.c
$(AM_V_GEN) sed -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA256/g' \
$(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' $< > $@

sha384hl.c: helper.c
$(AM_V_GEN) sed -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA384/g' \
$(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' $< > $@

sha512hl.c: helper.c
$(AM_V_GEN) sed -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA512/g' \
$(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' $< > $@

runtimelibdir = $(libdir)
Expand All @@ -111,7 +111,7 @@ install-exec-hook:
mv $(DESTDIR)$(libdir)/libmd*.so.* \
$(DESTDIR)$(runtimelibdir)/; \
soname=`readlink $(DESTDIR)$(libdir)/libmd.so`; \
sorelprefix=`echo $(libdir) | sed -r -e 's:(^/)?[^/]+:..:g'`; \
sorelprefix=`echo $(libdir) | $(SED) -r -e 's:(^/)?[^/]+:..:g'`; \
ln -sf $$sorelprefix$(runtimelibdir)/$$soname \
$(DESTDIR)$(libdir)/libmd.so; \
fi
Expand Down

0 comments on commit 85f7006

Please sign in to comment.