diff options
author | markm <markm@FreeBSD.org> | 1999-09-24 15:32:11 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 1999-09-24 15:32:11 +0000 |
commit | 20f9db93a619ff9a63dacb3bb6817a506bbe9d90 (patch) | |
tree | 8ee58c2d0c18ffd1966aa087aa1dbd09954813c6 /gnu | |
parent | d6997b00fee4847c7484b8c3d7d32855355d1b14 (diff) | |
download | FreeBSD-src-20f9db93a619ff9a63dacb3bb6817a506bbe9d90.zip FreeBSD-src-20f9db93a619ff9a63dacb3bb6817a506bbe9d90.tar.gz |
Low-level, but significant cleanup of Perl's build process.
This should significantly ease "make; make install" loops.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/perl/Makefile.inc | 37 | ||||
-rw-r--r-- | gnu/usr.bin/perl/libperl/Makefile | 28 | ||||
-rw-r--r-- | gnu/usr.bin/perl/miniperl/Makefile | 27 | ||||
-rw-r--r-- | gnu/usr.bin/perl/perl/Makefile | 51 | ||||
-rw-r--r-- | gnu/usr.bin/perl/suidperl/Makefile | 39 | ||||
-rw-r--r-- | gnu/usr.bin/perl/x2p/Makefile.inc | 1 | ||||
-rw-r--r-- | gnu/usr.bin/perl/x2p/a2pl/Makefile | 36 |
7 files changed, 65 insertions, 154 deletions
diff --git a/gnu/usr.bin/perl/Makefile.inc b/gnu/usr.bin/perl/Makefile.inc index b2847c8..a5070c0 100644 --- a/gnu/usr.bin/perl/Makefile.inc +++ b/gnu/usr.bin/perl/Makefile.inc @@ -1,6 +1,7 @@ # $FreeBSD$ PERL5SRC?= ${.CURDIR}/../../../../contrib/perl5 +PERL5LIB?= ${.CURDIR}/../libperl BINDIR?= /usr/bin @@ -25,8 +26,8 @@ CLEANFILES+= ${.OBJDIR}/${I} DEPEND_H+= ${.OBJDIR}/${I} .endfor -linkfarm: ${DEPEND_H} - @for d in ${CLEANDIRS} ; do \ +links: ${DEPEND_H} + @for d in ${FARMDIRS} ; do \ rm -rf $${d} ;\ for i in `cd ${PERL5SRC}; find $${d} -type d -a \! -name CVS` ;\ do \ @@ -47,8 +48,36 @@ linkfarm: ${DEPEND_H} @ln -sf ${PERL5SRC}/writemain.SH writemain.sh @ln -sf ${PERL5SRC}/regcomp.c regcomp.c @ln -sf ${PERL5SRC}/regexec.c regexec.c - @ln -sf ${CANONICALOBJDIR}/../libperl/config.sh config.sh @touch ${.TARGET} -CLEANFILES+= linkfarm +CLEANFILES+= links +CLEANFILES+= config.h config.sh config_h.sh +CLEANFILES+= regcomp.c regexec.c +CLEANFILES+= writemain writemain.sh config_h.sh cflags cflags.sh myconfig CLEANDIRS+= lib ext Porting hints build +FARMDIRS= lib ext Porting hints + +PERL_THREADED?= no +.if ${PERL_THREADED} == "yes" +CFLAGS+= -pthread +THREAD= threads- +.endif + +PERL_DEBUGGING?= no +.if ${PERL_DEBUGGING} == "yes" +CFLAGS+= -DDEBUGGING +.endif + +config.sh: ${PERL5LIB}/config.SH-${THREAD}${OBJFORMAT}.${MACHINE_ARCH} + ln -sf ${.OODATE} ${.TARGET} + +config.h: links config_h.sh config.sh + sh config_h.sh + +cflags.sh config_h.sh writemain.sh: links + +cflags: cflags.sh + sh cflags.sh + +writemain: writemain.sh + sh writemain.sh diff --git a/gnu/usr.bin/perl/libperl/Makefile b/gnu/usr.bin/perl/libperl/Makefile index 22101c0..22154e5 100644 --- a/gnu/usr.bin/perl/libperl/Makefile +++ b/gnu/usr.bin/perl/libperl/Makefile @@ -13,38 +13,10 @@ SRCS= perl.c gv.c toke.c perly.c op.c regcomp.c dump.c util.c mg.c byterun.c \ # NOPIC= true -beforeinstall beforedepend all: config.h config.sh - -CLEANFILES+= config.h config.sh config_h.sh - .include <bsd.lib.mk> -PERL_THREADED?= no -.if ${PERL_THREADED} == "true" -CFLAGS+= -pthread -.endif - -PERL_DEBUGGING?= no -.if ${PERL_DEBUGGING} == "true" -CFLAGS+= -DDEBUGGING -.endif - .SUFFIXES: .SUFFIXES: .o .po .So .s .S .c .PATH: ${PERL5SRC} - -config.h: config_h.sh config.sh - sh config_h.sh - -.if ${PERL_THREADED} == "true" -config.sh: config.SH-threads-${OBJFORMAT}.${MACHINE_ARCH} - ln -sf ${.OODATE} ${.TARGET} -.else -config.sh: config.SH-${OBJFORMAT}.${MACHINE_ARCH} - ln -sf ${.OODATE} ${.TARGET} -.endif - -config_h.sh: config_h.SH - ln -sf ${.OODATE} ${.TARGET} diff --git a/gnu/usr.bin/perl/miniperl/Makefile b/gnu/usr.bin/perl/miniperl/Makefile index 33985ec..293f1a4 100644 --- a/gnu/usr.bin/perl/miniperl/Makefile +++ b/gnu/usr.bin/perl/miniperl/Makefile @@ -15,33 +15,6 @@ LDADD= -lperl -lm -lcrypt # This gets overwritten. LINKS= ${BINDIR}/${PROG} ${BINDIR}/perl -CLEANFILES= config.h config.sh config_h.sh - .include <bsd.prog.mk> -PERL_THREADED?= no -.if ${PERL_THREADED} == "true" -CFLAGS+= -pthread -LDADD+= -pthread -.endif - -PERL_DEBUGGING?= no -.if ${PERL_DEBUGGING} == "true" -CFLAGS+= -DDEBUGGING -.endif - -miniperlmain.o: config.h - -config.h: config_h.sh config.sh - sh config_h.sh - -${.CURDIR}/../libperl/config.sh: - cd ${.CURDIR}/../libperl ; make config.sh - -config.sh: ${.CURDIR}/../libperl/config.sh - ln -sf ${CANONICALOBJDIR}/../libperl/config.sh ${.TARGET} - -config_h.sh: config_h.SH - ln -sf ${.OODATE} ${.TARGET} - .PATH: ${PERL5SRC} diff --git a/gnu/usr.bin/perl/perl/Makefile b/gnu/usr.bin/perl/perl/Makefile index 188c606..8b67639 100644 --- a/gnu/usr.bin/perl/perl/Makefile +++ b/gnu/usr.bin/perl/perl/Makefile @@ -12,9 +12,8 @@ LDADD= lib/auto/DynaLoader/DynaLoader.a -lperl -lm -lcrypt LINKS= ${BINDIR}/${PROG} ${BINDIR}/perl5 \ ${BINDIR}/${PROG} ${BINDIR}/perl5.00503 -CLEANFILES= config.h config.sh config_h.sh writemain writemain.sh \ - Config.pm cflags cflags.sh myconfig perlmain.c miniperlmain.c \ - autosplit regcomp.c regexec.c pod2man.PL pod2man ext.libs \ +CLEANFILES= Config.pm perlmain.c \ + autosplit pod2man.PL pod2man ext.libs \ man3pages STATIC_EXT= DynaLoader/DynaLoader @@ -22,59 +21,39 @@ STATIC_EXT= DynaLoader/DynaLoader DYNAMIC_EXT= B/B DB_File/DB_File Data/Dumper/Dumper Fcntl/Fcntl IO/IO \ IPC/SysV/SysV NDBM_File/NDBM_File Opcode/Opcode POSIX/POSIX \ SDBM_File/SDBM_File Socket/Socket attrs/attrs re/re - -NONXS_EXT= Errno/pm_to_blib - -.include <bsd.prog.mk> - -PERL_THREADED?= no -.if ${PERL_THREADED} == "true" +.if ${PERL_THREADED} == "yes" DYNAMIC_EXT+= Thread/Thread -CFLAGS+= -pthread -LDADD+= -pthread .endif - -PERL_DEBUGGING?= no -.if ${PERL_DEBUGGING} == "true" -CFLAGS+= -DDEBUGGING -.endif - -${PROG}: linkfarm Config.pm autosplit lib/auto/DynaLoader/DynaLoader.a -config_h.sh config.sh cflags.sh writemain.sh: linkfarm +NONXS_EXT= Errno/pm_to_blib -config.h: linkfarm config_h.sh config.sh - sh -x config_h.sh +.include <bsd.prog.mk> -cflags: linkfarm cflags.sh - sh cflags.sh +${PROG}: Config.pm autosplit lib/auto/DynaLoader/DynaLoader.a -Config.pm: linkfarm ${PERL5SRC}/configpm myconfig config.sh +Config.pm: links ${PERL5SRC}/configpm myconfig config.sh miniperl ${PERL5SRC}/configpm \ Config.pm Porting/Glossary myconfig config.sh cd lib ; ln -sf ../${.TARGET} -perlmain.c: linkfarm writemain config.h +perlmain.c: config.sh writemain config.h sh writemain lib/auto/DynaLoader/DynaLoader.a > ${.TARGET} -writemain: linkfarm writemain.sh - sh writemain.sh - -autosplit: linkfarm Config.pm lib/*.pm lib/*/*.pm +autosplit: links Config.pm lib/*.pm lib/*/*.pm miniperl -I${.OBJDIR}/lib \ -e 'use AutoSplit; autosplit_lib_modules(@ARGV)' \ lib/*.pm lib/*/*.pm touch ${.TARGET} .for I in ${STATIC_EXT} -ext/${I:H}/Makefile: linkfarm ext/${I:H}/Makefile.PL cflags Config.pm config.h +ext/${I:H}/Makefile: links ext/${I:H}/Makefile.PL cflags Config.pm config.h cd ext/${I:H}; \ miniperl -I${.OBJDIR}/lib Makefile.PL \ LINKTYPE=static INSTALLDIRS=perl PERL_SRC=${.OBJDIR} \ LIBS="-lperl" INSTALLMAN3DIR=${DESTDIR}/usr/share/perl/man3; \ make -B config PERL_SRC=${.OBJDIR} -lib/auto/${I}.a: linkfarm ext/${I:H}/Makefile +lib/auto/${I}.a: links ext/${I:H}/Makefile cd ext/${I:H}; \ make -B all PERL_SRC=${.OBJDIR} @@ -84,7 +63,7 @@ STATICS+= lib/auto/${I}.a .endfor .for I in ${DYNAMIC_EXT} -ext/${I:H}/Makefile: linkfarm ext/${I:H}/Makefile.PL cflags Config.pm pod2man config.h +ext/${I:H}/Makefile: links ext/${I:H}/Makefile.PL cflags Config.pm pod2man config.h cd ext/${I:H}; \ miniperl -I${.OBJDIR}/lib Makefile.PL \ LINKTYPE=dynamic INSTALLDIRS=perl PERL_SRC=${.OBJDIR} \ @@ -94,7 +73,7 @@ ext/${I:H}/Makefile: linkfarm ext/${I:H}/Makefile.PL cflags Config.pm pod2man co make -B config PERL_SRC=${.OBJDIR} -lib/auto/${I}.so: linkfarm ${PROG} ext/${I:H}/Makefile +lib/auto/${I}.so: links ${PROG} ext/${I:H}/Makefile cd ext/${I:H}; \ make -B all PERL_SRC=${.OBJDIR} @@ -104,7 +83,7 @@ DYNAMICS+= lib/auto/${I}.so .endfor .for I in ${NONXS_EXT} -ext/${I:H}/Makefile: linkfarm ext/${I:H}/Makefile.PL cflags lib/Config.pm +ext/${I:H}/Makefile: links ext/${I:H}/Makefile.PL cflags lib/Config.pm mkdir -p ${.OBJDIR}/lib/auto/${I:H} ;\ cd ext/${I:H} ;\ miniperl -I${.OBJDIR}/lib Makefile.PL \ @@ -114,7 +93,7 @@ ext/${I:H}/Makefile: linkfarm ext/${I:H}/Makefile.PL cflags lib/Config.pm INST_ARCHLIB=${.OBJDIR}/lib/auto/${I:H} ;\ make -B config PERL_SRC=${.OBJDIR} -lib/auto/${I}: linkfarm ${PROG} ext/${I:H}/Makefile +lib/auto/${I}: links ${PROG} ext/${I:H}/Makefile cd ext/${I:H}; \ make -B all LINKTYPE=nonxs PERL_SRC=${.OBJDIR} diff --git a/gnu/usr.bin/perl/suidperl/Makefile b/gnu/usr.bin/perl/suidperl/Makefile index 6038280..c8d1f45 100644 --- a/gnu/usr.bin/perl/suidperl/Makefile +++ b/gnu/usr.bin/perl/suidperl/Makefile @@ -13,63 +13,42 @@ BINOWN= root BINMODE=4511 LINKS= ${BINDIR}/${PROG} ${BINDIR}/sperl5.00503 - -CLEANFILES= config.h config.sh config_h.sh writemain writemain.sh \ - Config.pm cflags cflags.sh myconfig perlmain.c miniperlmain.c \ - autosplit regcomp.c regexec.c ext.libs sperl.c +CLEANFILES= Config.pm perlmain.c sperl.c \ + autosplit pod2man.PL pod2man ext.libs \ + man3pages STATIC_EXT= DynaLoader/DynaLoader .include <bsd.prog.mk> -PERL_THREADED?= no -.if ${PERL_THREADED} == "true" -CFLAGS+= -pthread -LDADD+= -pthread -.endif - -PERL_DEBUGGING?= no -.if ${PERL_DEBUGGING} == "true" -CFLAGS+= -DDEBUGGING -.endif - -${PROG}: linkfarm Config.pm autosplit lib/auto/DynaLoader/DynaLoader.a +${PROG}: Config.pm autosplit lib/auto/DynaLoader/DynaLoader.a sperl.c: perl.c @ln -sf ${.OODATE} ${.TARGET} -config.h: linkfarm - sh config_h.sh - -cflags: linkfarm - sh cflags.sh - -Config.pm: linkfarm +Config.pm: links ${PERL5SRC}/configpm myconfig config.sh miniperl ${PERL5SRC}/configpm \ Config.pm Porting/Glossary myconfig config.sh cd lib ; ln -sf ../${.TARGET} -perlmain.c: linkfarm writemain config.h +perlmain.c: config.sh writemain config.h sh writemain lib/auto/DynaLoader/DynaLoader.a > ${.TARGET} -writemain: linkfarm - sh writemain.sh - -autosplit: linkfarm Config.pm lib/*.pm lib/*/*.pm +autosplit: links Config.pm lib/*.pm lib/*/*.pm miniperl -I${.OBJDIR}/lib \ -e 'use AutoSplit; autosplit_lib_modules(@ARGV)' \ lib/*.pm lib/*/*.pm touch ${.TARGET} .for I in ${STATIC_EXT} -ext/${I:H}/Makefile: linkfarm ext/${I:H}/Makefile.PL cflags Config.pm +ext/${I:H}/Makefile: links ext/${I:H}/Makefile.PL cflags Config.pm cd ext/${I:H}; \ miniperl -I${.OBJDIR}/lib Makefile.PL \ LINKTYPE=static INSTALLDIRS=perl PERL_SRC=${.OBJDIR} \ LIBS="-lperl" INSTALLMAN3DIR=${DESTDIR}/usr/share/perl/man3; \ make -B config PERL_SRC=${.OBJDIR} -lib/auto/${I}.a: linkfarm ext/${I:H}/Makefile +lib/auto/${I}.a: links ext/${I:H}/Makefile cd ext/${I:H}; \ make -B all PERL_SRC=${.OBJDIR} diff --git a/gnu/usr.bin/perl/x2p/Makefile.inc b/gnu/usr.bin/perl/x2p/Makefile.inc index fe3b710..b19031f 100644 --- a/gnu/usr.bin/perl/x2p/Makefile.inc +++ b/gnu/usr.bin/perl/x2p/Makefile.inc @@ -3,6 +3,7 @@ # PERL5SRC= ${.CURDIR}/../../../../../contrib/perl5 +PERL5LIB= ${.CURDIR}/../../libperl MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl STRIP= diff --git a/gnu/usr.bin/perl/x2p/a2pl/Makefile b/gnu/usr.bin/perl/x2p/a2pl/Makefile index 041ba03..e7ad753 100644 --- a/gnu/usr.bin/perl/x2p/a2pl/Makefile +++ b/gnu/usr.bin/perl/x2p/a2pl/Makefile @@ -7,20 +7,15 @@ CFLAGS+=-I${PERL5SRC}/x2p -I${.OBJDIR} -I${.OBJDIR}/temp LDFLAGS+=-lperl -lm -lcrypt SRCS= a2p.c hash.c str.c util.c walk.c config.h -beforedepend all: config.h temp +CLEANDIRS+= temp +CLEANFILES+= ${PROG}.1 -.include <bsd.prog.mk> +config.h: temp -PERL_THREADED?= no -.if ${PERL_THREADED} == "true" -CFLAGS+= -pthread -LDADD+= -pthread -.endif - -PERL_DEBUGGING?= no -.if ${PERL_DEBUGGING} == "true" -CFLAGS+= -DDEBUGGING -.endif +temp: + @mkdir temp + +.include <bsd.prog.mk> .PATH: ${PERL5SRC}/x2p .PATH: ${PERL5SRC} @@ -28,22 +23,5 @@ CFLAGS+= -DDEBUGGING .SUFFIXES: .SUFFIXES: .c .h .o -temp: - @mkdir temp - -CLEANFILES+= config.h config_h.sh config.sh ${PROG}.1 - -config.h: config_h.sh config.sh - sh config_h.sh - -${.CURDIR}/../../libperl/config.sh: - cd ${.CURDIR}/../../libperl ; make config.sh - -config.sh: ${.CURDIR}/../../libperl/config.sh - ln -sf ${CANONICALOBJDIR}/../../libperl/config.sh ${.TARGET} - -config_h.sh: ${PERL5SRC}/config_h.SH - ln -sf ${.OODATE} ${.TARGET} - ${PROG}.1: ${PROG}.pod miniperl ${MINIPERLOPT} ${.OBJDIR}/../../pod/pod2man/pod2man ${.OODATE} > ${.TARGET} |