aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/suidperl/Makefile
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>1998-09-22 12:00:59 +0000
committerMark Murray <markm@FreeBSD.org>1998-09-22 12:00:59 +0000
commit7b7360038907f0e2653a1db32079981d777a962b (patch)
tree3c87b460c7f15053801bef964bfe5227097cd857 /gnu/usr.bin/perl/suidperl/Makefile
parent3ab87a0f91eb849fa350b23a05440981a9cda36e (diff)
downloadsrc-7b7360038907f0e2653a1db32079981d777a962b.tar.gz
src-7b7360038907f0e2653a1db32079981d777a962b.zip
Big cleanup of the perl build.
1) Inspired by JB's finding of a hardcoded /usr/bin/ranlib in the config files, these have been properly cleaned up and have been personalised for FreeBSD, not MarkM. 2) Inspired by Peter, copying of the lib/ext etc dirs has been replaced by a link farm. 3) Common code has been moved to a higher-level Makefile.inc. This has been tested with a make -j8.
Notes
Notes: svn path=/head/; revision=39561
Diffstat (limited to 'gnu/usr.bin/perl/suidperl/Makefile')
-rw-r--r--gnu/usr.bin/perl/suidperl/Makefile73
1 files changed, 26 insertions, 47 deletions
diff --git a/gnu/usr.bin/perl/suidperl/Makefile b/gnu/usr.bin/perl/suidperl/Makefile
index e5d59599efbb..6c4fc6e33624 100644
--- a/gnu/usr.bin/perl/suidperl/Makefile
+++ b/gnu/usr.bin/perl/suidperl/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile,v 1.2 1998/09/12 15:45:30 markm Exp $
+# $Id: Makefile,v 1.3 1998/09/16 17:25:52 markm Exp $
#
PROG= suidperl
@@ -18,77 +18,40 @@ CLEANDIRS= lib ext Porting hints
.include <bsd.prog.mk>
-HEADERS=EXTERN.h INTERN.h XSUB.h XSlock.h av.h bytecode.h byterun.h \
- cc_runtime.h cop.h cv.h dosish.h embed.h embedvar.h fakethr.h form.h \
- gv.h handy.h hv.h intrpvar.h iperlsys.h keywords.h mg.h nostdio.h \
- objXSUB.h objpp.h op.h opcode.h patchlevel.h perl.h perlio.h \
- perlsdio.h perlsfio.h perlvars.h perly.h pp.h pp_proto.h proto.h \
- regcomp.h regexp.h regnodes.h scope.h sv.h thrdvar.h thread.h \
- unixish.h util.h
+STATIC_EXT= DynaLoader/DynaLoader
-${PROG}: lib/auto/DynaLoader/DynaLoader.a
+${PROG}: Config.pm lib/auto/DynaLoader/DynaLoader.a
+
+lib/auto/DynaLoader/DynaLoader.a: Config.pm autosplit
config.h: config_h.sh config.sh
sh config_h.sh
config.sh: ${.CURDIR}/../libperl/config.SH-${OBJFORMAT}.${MACHINE_ARCH}
- cp -p ${.OODATE} ${.TARGET}
+ ln -sf ${.OODATE} ${.TARGET}
config_h.sh: config_h.SH
- cp -p ${.OODATE} ${.TARGET}
+ ln -sf ${.OODATE} ${.TARGET}
cflags.sh: cflags.SH
- cp -p ${.OODATE} ${.TARGET}
+ ln -sf ${.OODATE} ${.TARGET}
cflags: cflags.sh
sh ${.OODATE}
-lib:
- @rm -rf lib
- cp -rp ${PERL5SRC}/lib .
-
-ext:
- @rm -rf ext
- cp -rp ${PERL5SRC}/ext .
-
-Porting:
- @rm -rf Porting
- cp -rp ${PERL5SRC}/Porting .
-
-hints:
- @rm -rf hints
- cp -rp ${PERL5SRC}/hints .
-
lib/re.pm: lib ext hints ext/re/re.pm
cat ${PERL5SRC}/ext/re/re.pm > ${.OBJDIR}/lib/re.pm
lib/Config.pm: Config.pm
- @cp -p ${.OODATE} ${.TARGET}
+ cp -p ${.OODATE} ${.TARGET}
myconfig: ${PERL5SRC}/myconfig
- @ln -sf ${.OODATE} ${.TARGET}
+ ln -sf ${.OODATE} ${.TARGET}
Config.pm: myconfig config.sh lib ext hints Porting lib/re.pm
miniperl ${PERL5SRC}/configpm \
Config.pm Porting/Glossary myconfig config.sh
-DEPEND_H=
-
-.for I in ${HEADERS}
-${.OBJDIR}/${I}: ${I}
- @ln -sf ${.OODATE} ${.TARGET}
-
-CLEANFILES+= ${.OBJDIR}/${I}
-DEPEND_H+= ${.OBJDIR}/${I}
-.endfor
-
-lib/auto/DynaLoader/DynaLoader.a: cflags lib/Config.pm ${DEPEND_H}
- cd ext/DynaLoader; \
- miniperl -I../../lib Makefile.PL \
- INSTALLDIRS=perl PERL_SRC=${.OBJDIR}; \
- make -B config PERL_SRC=${.OBJDIR}; \
- make -B all LINKTYPE=static PERL_SRC=${.OBJDIR}
-
${.OBJDIR}/miniperlmain.c: miniperlmain.c
@ln -sf ${.OODATE} ${.TARGET}
@@ -104,4 +67,20 @@ writemain.sh: writemain.SH
writemain: writemain.sh
sh ${.OODATE}
+autosplit: lib ext Porting hints
+ miniperl -I${.OBJDIR}/lib \
+ -e 'use AutoSplit; autosplit_lib_modules(@ARGV)' \
+ lib/*.pm lib/*/*.pm
+
+.for I in ${STATIC_EXT}
+lib/auto/${I}.a: cflags lib/Config.pm ${DEPEND_H}
+ cd ext/${I:H}; \
+ miniperl -I${.OBJDIR}/lib Makefile.PL \
+ INSTALLDIRS=perl PERL_SRC=${.OBJDIR}; \
+ make -B config PERL_SRC=${.OBJDIR}; \
+ make -B all LINKTYPE=static PERL_SRC=${.OBJDIR}
+
+STATICS+= lib/auto/${I}.a
+.endfor
+
.PATH: ${PERL5SRC}