From 535cc97895309bd73b24c9fac85c42ab16c9687c Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Sun, 10 Feb 2002 19:48:19 +0000 Subject: [PATCH] Nice set of fixes to use SCRIPT instead of PROG, thus fixing up a lot of nasty STRIP= problems. This has the added side effect if neatening up some leaf makefiles very nicely. Submitted by: ru --- gnu/usr.bin/perl/pod/Makefile.inc | 30 ++++++++++++++++++------- gnu/usr.bin/perl/pod/pod2html/Makefile | 11 +-------- gnu/usr.bin/perl/pod/pod2latex/Makefile | 9 +------- gnu/usr.bin/perl/pod/pod2man/Makefile | 12 ++-------- gnu/usr.bin/perl/pod/pod2text/Makefile | 9 +------- gnu/usr.bin/perl/utils/Makefile.inc | 22 ++++++++++-------- gnu/usr.bin/perl/utils/c2ph/Makefile | 2 +- gnu/usr.bin/perl/utils/dprofpp/Makefile | 2 +- gnu/usr.bin/perl/utils/h2ph/Makefile | 4 ++-- gnu/usr.bin/perl/utils/h2xs/Makefile | 2 +- gnu/usr.bin/perl/utils/perlbc/Makefile | 2 +- gnu/usr.bin/perl/utils/perlbug/Makefile | 2 +- gnu/usr.bin/perl/utils/perlcc/Makefile | 2 +- gnu/usr.bin/perl/utils/perldoc/Makefile | 2 +- gnu/usr.bin/perl/utils/pl2pm/Makefile | 2 +- gnu/usr.bin/perl/utils/splain/Makefile | 2 +- gnu/usr.bin/perl/x2p/Makefile.inc | 25 ++++++++++++++++----- gnu/usr.bin/perl/x2p/find2pl/Makefile | 13 +---------- gnu/usr.bin/perl/x2p/s2pl/Makefile | 13 +---------- 19 files changed, 73 insertions(+), 93 deletions(-) diff --git a/gnu/usr.bin/perl/pod/Makefile.inc b/gnu/usr.bin/perl/pod/Makefile.inc index 1e3cbfe7fc72..8c3231d747d7 100644 --- a/gnu/usr.bin/perl/pod/Makefile.inc +++ b/gnu/usr.bin/perl/pod/Makefile.inc @@ -2,13 +2,27 @@ # $FreeBSD$ # -PERL5SRC?= ${.CURDIR}/../../../../../contrib/perl5 -MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl - -CLEANFILES+= ${PROG}.1 ${PROG}.PL - -.ORDER: ${PROG}.PL ${PROG} ${PROG}.1 ${PROG}.1.gz - -STRIP= +PERL5SRC= ${.CURDIR}/../../../../../contrib/perl5 +PERL5LIBSRC= ${.CURDIR}/../../libperl .include "../Makefile.inc" + +MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl + +.if defined(SCRIPTS) +.if !defined(NOMAN) +MAN= ${SCRIPTS}.1 +.endif + +${SCRIPTS}: ${SCRIPTS}.PL + ${MINIPERL} ${MINIPERLOPT} ${.ALLSRC} + +${SCRIPTS}.1: ${SCRIPTS}.PL + ${MINIPERL} ${MINIPERLOPT} \ + ${.OBJDIR}/../pod2man/pod2man ${.ALLSRC} > ${.TARGET} + +${SCRIPTS}.PL: ${PERL5SRC}/pod/${SCRIPTS}.PL + ln -sf ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${SCRIPTS} ${SCRIPTS}.1 ${SCRIPTS}.PL +.endif diff --git a/gnu/usr.bin/perl/pod/pod2html/Makefile b/gnu/usr.bin/perl/pod/pod2html/Makefile index e3f306164862..8c3cbab223c2 100644 --- a/gnu/usr.bin/perl/pod/pod2html/Makefile +++ b/gnu/usr.bin/perl/pod/pod2html/Makefile @@ -2,15 +2,6 @@ # $FreeBSD$ # -PROG= pod2html - -${PROG}: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${PROG}.PL - -${PROG}.1: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${.OBJDIR}/../pod2man/pod2man ${PROG}.PL > ${PROG}.1 +SCRIPTS=pod2html .include - -${PROG}.PL: ${PERL5SRC}/pod/${PROG}.PL - cp -p ${.OODATE} ${.TARGET} diff --git a/gnu/usr.bin/perl/pod/pod2latex/Makefile b/gnu/usr.bin/perl/pod/pod2latex/Makefile index b2ea8b356d1f..ad0bec1dc457 100644 --- a/gnu/usr.bin/perl/pod/pod2latex/Makefile +++ b/gnu/usr.bin/perl/pod/pod2latex/Makefile @@ -2,14 +2,7 @@ # $FreeBSD$ # -PROG= pod2latex - +SCRIPTS=pod2latex NOMAN= true -${PROG}: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${PROG}.PL - .include - -${PROG}.PL: ${PERL5SRC}/pod/${PROG}.PL - cp -p ${.OODATE} ${.TARGET} diff --git a/gnu/usr.bin/perl/pod/pod2man/Makefile b/gnu/usr.bin/perl/pod/pod2man/Makefile index 37cc2e65e52a..0d4488943452 100644 --- a/gnu/usr.bin/perl/pod/pod2man/Makefile +++ b/gnu/usr.bin/perl/pod/pod2man/Makefile @@ -2,16 +2,8 @@ # $FreeBSD$ # -PROG= pod2man +SCRIPTS=pod2man -${PROG}: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${PROG}.PL - -${PROG}.1: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${.OBJDIR}/../pod2man/pod2man ${PROG}.PL \ - > ${PROG}.1 +.ORDER: pod2man pod2man.1 .include - -${PROG}.PL: ${PERL5SRC}/pod/${PROG}.PL - cp -p ${.OODATE} ${.TARGET} diff --git a/gnu/usr.bin/perl/pod/pod2text/Makefile b/gnu/usr.bin/perl/pod/pod2text/Makefile index 80cbb5727d90..1ad926739d52 100644 --- a/gnu/usr.bin/perl/pod/pod2text/Makefile +++ b/gnu/usr.bin/perl/pod/pod2text/Makefile @@ -2,14 +2,7 @@ # $FreeBSD$ # -PROG= pod2text - +SCRIPTS=pod2text NOMAN= true -${PROG}: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${PROG}.PL - .include - -${PROG}.PL: ${PERL5SRC}/pod/${PROG}.PL - cp -p ${.OODATE} ${.TARGET} diff --git a/gnu/usr.bin/perl/utils/Makefile.inc b/gnu/usr.bin/perl/utils/Makefile.inc index a82b1ce65345..80b2f6f7b2d5 100644 --- a/gnu/usr.bin/perl/utils/Makefile.inc +++ b/gnu/usr.bin/perl/utils/Makefile.inc @@ -9,16 +9,20 @@ PERL5LIBSRC= ${.CURDIR}/../../libperl MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl -I${PERL5SRC} -${PROG}: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${.OODATE} +.if defined(SCRIPTS) +.if !defined(NOMAN) +MAN= ${SCRIPTS}.1 +.endif -${PROG}.1: ${PROG}.PL +${SCRIPTS}: ${SCRIPTS}.PL + ${MINIPERL} ${MINIPERLOPT} ${.ALLSRC} + +${SCRIPTS}.1: ${SCRIPTS}.PL ${MINIPERL} ${MINIPERLOPT} \ - ${.OBJDIR}/../../pod/pod2man/pod2man ${.OODATE} > ${.TARGET} + ${.OBJDIR}/../../pod/pod2man/pod2man ${.ALLSRC} > ${.TARGET} -${PROG}.PL: ${PERL5SRC}/utils/${PROG}.PL - ln -sf ${.OODATE} ${.TARGET} +${SCRIPTS}.PL: ${PERL5SRC}/utils/${SCRIPTS}.PL + ln -sf ${.ALLSRC} ${.TARGET} -CLEANFILES+= ${PROG}.1 ${PROG}.PL pstruct - -STRIP= +CLEANFILES+= ${SCRIPTS} ${SCRIPTS}.1 ${SCRIPTS}.PL pstruct +.endif diff --git a/gnu/usr.bin/perl/utils/c2ph/Makefile b/gnu/usr.bin/perl/utils/c2ph/Makefile index 0225a28f249a..c2b780b23bc8 100644 --- a/gnu/usr.bin/perl/utils/c2ph/Makefile +++ b/gnu/usr.bin/perl/utils/c2ph/Makefile @@ -2,6 +2,6 @@ # $FreeBSD$ # -PROG= c2ph +SCRIPTS=c2ph .include diff --git a/gnu/usr.bin/perl/utils/dprofpp/Makefile b/gnu/usr.bin/perl/utils/dprofpp/Makefile index 5ffdfcc91a32..8b289e1c6cd1 100644 --- a/gnu/usr.bin/perl/utils/dprofpp/Makefile +++ b/gnu/usr.bin/perl/utils/dprofpp/Makefile @@ -2,6 +2,6 @@ # $FreeBSD$ # -PROG= dprofpp +SCRIPTS=dprofpp .include diff --git a/gnu/usr.bin/perl/utils/h2ph/Makefile b/gnu/usr.bin/perl/utils/h2ph/Makefile index 6951a3b4d849..6d3c51ec9688 100644 --- a/gnu/usr.bin/perl/utils/h2ph/Makefile +++ b/gnu/usr.bin/perl/utils/h2ph/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ # -PROG= h2ph +SCRIPTS=h2ph beforedepend all: scripts @@ -10,7 +10,7 @@ beforedepend all: scripts afterinstall: cd ${DESTDIR}/usr/include; \ - ${MINIPERL} -I${.OBJDIR}/lib ${.OBJDIR}/${PROG} -d \ + ${MINIPERL} -I${.OBJDIR}/lib ${.OBJDIR}/${SCRIPTS} -d \ ${DESTDIR}/usr/libdata/perl/${VERSION}/mach * */* .PATH: ${PERL5SRC} diff --git a/gnu/usr.bin/perl/utils/h2xs/Makefile b/gnu/usr.bin/perl/utils/h2xs/Makefile index fa635dbe8646..a45a92619fe8 100644 --- a/gnu/usr.bin/perl/utils/h2xs/Makefile +++ b/gnu/usr.bin/perl/utils/h2xs/Makefile @@ -2,6 +2,6 @@ # $FreeBSD$ # -PROG= h2xs +SCRIPTS=h2xs .include diff --git a/gnu/usr.bin/perl/utils/perlbc/Makefile b/gnu/usr.bin/perl/utils/perlbc/Makefile index 47a247d06894..ec0fa29e442c 100644 --- a/gnu/usr.bin/perl/utils/perlbc/Makefile +++ b/gnu/usr.bin/perl/utils/perlbc/Makefile @@ -2,6 +2,6 @@ # $FreeBSD$ # -PROG= perlbc +SCRIPTS=perlbc .include diff --git a/gnu/usr.bin/perl/utils/perlbug/Makefile b/gnu/usr.bin/perl/utils/perlbug/Makefile index baea837bb2e8..f258f55ebf7b 100644 --- a/gnu/usr.bin/perl/utils/perlbug/Makefile +++ b/gnu/usr.bin/perl/utils/perlbug/Makefile @@ -2,6 +2,6 @@ # $FreeBSD$ # -PROG= perlbug +SCRIPTS=perlbug .include diff --git a/gnu/usr.bin/perl/utils/perlcc/Makefile b/gnu/usr.bin/perl/utils/perlcc/Makefile index 02ce3a3ef077..b38ab85f71bd 100644 --- a/gnu/usr.bin/perl/utils/perlcc/Makefile +++ b/gnu/usr.bin/perl/utils/perlcc/Makefile @@ -2,6 +2,6 @@ # $FreeBSD$ # -PROG= perlcc +SCRIPTS=perlcc .include diff --git a/gnu/usr.bin/perl/utils/perldoc/Makefile b/gnu/usr.bin/perl/utils/perldoc/Makefile index 5d55722414f4..91ef5121b21a 100644 --- a/gnu/usr.bin/perl/utils/perldoc/Makefile +++ b/gnu/usr.bin/perl/utils/perldoc/Makefile @@ -2,6 +2,6 @@ # $FreeBSD$ # -PROG= perldoc +SCRIPTS=perldoc .include diff --git a/gnu/usr.bin/perl/utils/pl2pm/Makefile b/gnu/usr.bin/perl/utils/pl2pm/Makefile index fea06a33d29e..d5b3ff4efbe3 100644 --- a/gnu/usr.bin/perl/utils/pl2pm/Makefile +++ b/gnu/usr.bin/perl/utils/pl2pm/Makefile @@ -2,6 +2,6 @@ # $FreeBSD$ # -PROG= pl2pm +SCRIPTS=pl2pm .include diff --git a/gnu/usr.bin/perl/utils/splain/Makefile b/gnu/usr.bin/perl/utils/splain/Makefile index b05337e16b69..ab1ae5990e98 100644 --- a/gnu/usr.bin/perl/utils/splain/Makefile +++ b/gnu/usr.bin/perl/utils/splain/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ # -PROG= splain +SCRIPTS=splain NOMAN= true .include diff --git a/gnu/usr.bin/perl/x2p/Makefile.inc b/gnu/usr.bin/perl/x2p/Makefile.inc index 7f8371ceb29f..fb78cfff2513 100644 --- a/gnu/usr.bin/perl/x2p/Makefile.inc +++ b/gnu/usr.bin/perl/x2p/Makefile.inc @@ -4,10 +4,25 @@ PERL5SRC= ${.CURDIR}/../../../../../contrib/perl5 PERL5LIBSRC= ${.CURDIR}/../../libperl -MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl - -LDFLAGS+= -L${.OBJDIR}/../../libperl - -STRIP= .include "../Makefile.inc" + +MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl + +.if defined(SCRIPTS) +.if !defined(NOMAN) +MAN= ${SCRIPTS}.1 +.endif + +${SCRIPTS}: ${SCRIPTS}.PL + ${MINIPERL} ${MINIPERLOPT} ${.ALLSRC} + +${SCRIPTS}.1: ${SCRIPTS}.PL + ${MINIPERL} ${MINIPERLOPT} \ + ${.OBJDIR}/../../pod/pod2man/pod2man ${.ALLSRC} > ${.TARGET} + +${SCRIPTS}.PL: ${PERL5SRC}/x2p/${SCRIPTS}.PL + ln -sf ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${SCRIPTS} ${SCRIPTS}.1 ${SCRIPTS}.PL +.endif diff --git a/gnu/usr.bin/perl/x2p/find2pl/Makefile b/gnu/usr.bin/perl/x2p/find2pl/Makefile index 5453d5e6ff73..ff5a1592a458 100644 --- a/gnu/usr.bin/perl/x2p/find2pl/Makefile +++ b/gnu/usr.bin/perl/x2p/find2pl/Makefile @@ -2,18 +2,7 @@ # $FreeBSD$ # -PROG= find2perl +SCRIPTS=find2perl NOMAN= true -${PROG}: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${.OODATE} - -${PROG}.1: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${.OBJDIR}/../../pod/pod2man/pod2man ${.OODATE} > ${.TARGET} - -CLEANFILES+= ${PROG}.1 ${PROG}.PL - .include - -${PROG}.PL: ${PERL5SRC}/x2p/${PROG}.PL - @ln -sf ${.OODATE} ${.TARGET} diff --git a/gnu/usr.bin/perl/x2p/s2pl/Makefile b/gnu/usr.bin/perl/x2p/s2pl/Makefile index 63e6062f222a..e10e30cd83b3 100644 --- a/gnu/usr.bin/perl/x2p/s2pl/Makefile +++ b/gnu/usr.bin/perl/x2p/s2pl/Makefile @@ -2,17 +2,6 @@ # $FreeBSD$ # -PROG= s2p - -${PROG}: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${.OODATE} - -${PROG}.1: ${PROG}.PL - ${MINIPERL} ${MINIPERLOPT} ${.OBJDIR}/../../pod/pod2man/pod2man ${.OODATE} > ${.TARGET} - -CLEANFILES+= ${PROG}.1 ${PROG}.PL +SCRIPTS=s2p .include - -${PROG}.PL: ${PERL5SRC}/x2p/${PROG}.PL - @ln -sf ${.OODATE} ${.TARGET}