summaryrefslogtreecommitdiff
path: root/mk/subst.mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-01-07 18:43:05 +0000
committerrillig <rillig@pkgsrc.org>2006-01-07 18:43:05 +0000
commit2e71854a233f0c3d75194371e5a0a27edb416b28 (patch)
tree7712250834cde100d2a4cf6c0ee37bf7dc36266f /mk/subst.mk
parent76f0865976d26078f25b9782e254fc141b03e36a (diff)
downloadpkgsrc-2e71854a233f0c3d75194371e5a0a27edb416b28.tar.gz
Removed the use of ${FILE_CMD} from the substitution framework. The
detection whether a given file was a text file or some other file had been unreliable. In the recent bulk builds, all of the warnings that had appeared because of that unreliable detection had been false positives.
Diffstat (limited to 'mk/subst.mk')
-rw-r--r--mk/subst.mk13
1 files changed, 2 insertions, 11 deletions
diff --git a/mk/subst.mk b/mk/subst.mk
index 3a2eaca7638..5340382463c 100644
--- a/mk/subst.mk
+++ b/mk/subst.mk
@@ -1,4 +1,4 @@
-# $NetBSD: subst.mk,v 1.29 2006/01/05 23:16:01 joerg Exp $
+# $NetBSD: subst.mk,v 1.30 2006/01/07 18:43:05 rillig Exp $
#
# This Makefile fragment implements a general text replacement facility.
# Package makefiles define a ``class'', for each of which a particular
@@ -34,13 +34,6 @@
ECHO_SUBST_MSG?= ${ECHO}
-# _SUBST_IS_TEXT_FILE returns 0 if $${file} is a text file.
-_SUBST_IS_TEXT_FILE?= \
- { ${TEST} -f "$$file" \
- && ${FILE_CMD} "$$file" \
- | ${EGREP} "(executable .* script|shell script|text)"; \
- } >/dev/null 2>&1
-
_SUBST_BACKUP_SUFFIX= .subst.sav
.for _class_ in ${SUBST_CLASSES}
@@ -82,7 +75,7 @@ ${_SUBST_COOKIE.${_class_}}:
for file in $$files; do \
case $$file in /*) ;; *) file="./$$file";; esac; \
tmpfile="$$file"${_SUBST_BACKUP_SUFFIX:Q}; \
- if ${_SUBST_IS_TEXT_FILE}; then \
+ if ${TEST} -f "$$file"; then \
${MV} -f "$$file" "$$tmpfile" || exit 1; \
${SUBST_FILTER_CMD.${_class_}} \
< "$$tmpfile" \
@@ -96,8 +89,6 @@ ${_SUBST_COOKIE.${_class_}}:
${SUBST_POSTCMD.${_class_}}; \
${ECHO} "$$file" >> ${.TARGET}; \
fi; \
- elif ${TEST} -f "$$file"; then \
- ${ECHO_SUBST_MSG} "[subst.mk] WARNING: Ignoring non-text file \"$$file\"." 1>&2; \
else \
${ECHO_SUBST_MSG} "[subst.mk] WARNING: Ignoring non-existent file \"$$file\"." 1>&2; \
fi; \