1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-22 07:20:00 +00:00

Clean up some foreign makefiles a bit, attempting to handle .sh files

more like binaries.  This is hard to do using a general rules because
the natural `.sh:' rule has a null suffix and null suffixes are broken.
(With 1.1.5's make they sometimes work and sometimes cause core dumps.
2.0's make has a botched fixed and they never work.)
This commit is contained in:
Bruce Evans 1994-11-14 05:57:36 +00:00
parent a3a5ddcb52
commit 069fcad2d9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4452
2 changed files with 30 additions and 16 deletions

View File

@ -1,15 +1,26 @@
FILES= catman
NOMAN= noman
CLEANFILES= catman
beforeinstall: catman
install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
catman ${DESTDIR}${BINDIR}
CLEANFILES+= ${FILES}
.include <bsd.prog.mk>
all: ${FILES}
# XXX null suffixes are currently broken
# .SUFFIXES:
# .SUFFIXES: .sh
# .sh:
# sed -e 's,%compress%,${compress},' \
# -e 's,%compext%,${compext},' \
# -e 's,%zcat%,${zcat},' \
# ${.IMPSRC} > ${.TARGET}
catman: catman.sh
sed -e 's,%compress%,${compress},' \
-e 's,%compext%,${compext},' \
-e 's,%zcat%,${zcat},' \
${.CURDIR}/catman.sh > catman
-e 's,%compext%,${compext},' \
-e 's,%zcat%,${zcat},' \
${.CURDIR}/${.TARGET}.sh > ${.TARGET}
install:
install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${FILES} ${DESTDIR}${BINDIR}
.include <bsd.prog.mk>

View File

@ -1,17 +1,20 @@
# @(#)Makefile 5.6 (Berkeley) 6/23/90
FILES= makewhatis
NOMAN= noman
CLEANFILES= makewhatis
beforeinstall: makewhatis
install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
makewhatis ${DESTDIR}${BINDIR}
CLEANFILES+= ${FILES}
.include <bsd.prog.mk>
all: ${FILES}
makewhatis: makewhatis.sh
sed -e 's/%sections%/ "1", "n", "l", "6", "8", "2", "3", "4", "5", "7", "p", "o", NULL/' \
-e 's,%zcat%,${zcat},' \
-e 's,%compext%,${compext},' \
${.CURDIR}/makewhatis.sh > makewhatis
-e 's,%compext%,${compext},' \
-e 's,%zcat%,${zcat},' \
${.CURDIR}/${.TARGET}.sh > ${.TARGET}
install:
install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${FILES} ${DESTDIR}${BINDIR}
.include <bsd.prog.mk>