1##-------------------------------------------------------------------------- 2# Makefile for perl 3##-------------------------------------------------------------------------- 4# Wilfredo Sanchez | wsanchez@apple.com 5# I wish they'd just use autoconf. This is hairy. 6# Modified by Edward Moy <emoy@apple.com> 7##-------------------------------------------------------------------------- 8 9# Project info 10Project = perl 11UserType = Developer 12ToolType = Commands 13##-------------------------------------------------------------------------- 14# env_no_rc_trace is a shell script that removes RC_TRACE_ARCHIVES and 15# RC_TRACE_DYLIBS from the environment before exec-ing the argument. 16# This is necessary because otherwise B&I logging messages will get into 17# the cppsymbols value in Config.pm and break h2ph (3093501). 18##-------------------------------------------------------------------------- 19Configure = '$(TOPSRCROOT)/env_no_rc_trace' '$(BuildDirectory)'/Configure 20Extra_Environment = HTMLDIR='$(Install_HTML)' AR='$(TOPSRCROOT)/fix/ar.sh' 21Extra_Install_Flags = HTMLDIR='$(RC_Install_HTML)' HTMLROOT='$(Install_HTML)' 22GnuAfterInstall = zap-sitedirs make-extra-links 23ifeq "$(RC_XBS)" "YES" 24GnuNoBuild = YES 25endif 26 27# It's a GNU Source project 28# Well, not really but we can make it work. 29include $(MAKEFILEPATH)/CoreOS/ReleaseControl/GNUSource.make 30 31# Override compiler setting from GNUSource.make to use those set in GNUmakefile 32override CC = $(MY_CC) 33 34Install_Target = install 35CC_Optimize = 36Configure_Flags = -ds -e -Dprefix='$(Install_Prefix)' -Dccflags='$(CFLAGS)' -Dldflags='$(LDFLAGS)' -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=$(MY_CC) 37 38##--------------------------------------------------------------------- 39# Patch config.h, Makefile and others just after running configure 40##--------------------------------------------------------------------- 41ConfigStamp2 = $(ConfigStamp)2 42 43configure:: $(ConfigStamp2) 44 45$(ConfigStamp2): $(ConfigStamp) 46 $(_v) sed -e 's/@PREPENDFILE@/$(PREPENDFILE)/g' \ 47 -e 's/@APPENDFILE@/$(APPENDFILE)/g' \ 48 -e 's/@NONLP@/$(NONLP)/g' \ 49 -e 's,@UPDATESLIB@,$(UPDATESLIB),g' \ 50 -e 's/@VERSION@/$(ENV_PERL_BASE_VERSION)/g' \ 51 '$(SRCROOT)/fix/config.h.ed' \ 52 | ed - '${BuildDirectory}/config.h' 53 $(_v) ed - '${BuildDirectory}/Makefile' < '$(SRCROOT)/fix/Makefile.ed' 54 $(_v) ed - '${BuildDirectory}/GNUmakefile' < '$(SRCROOT)/fix/Makefile.ed' 55 $(_v) ed - '${BuildDirectory}/cflags' < '$(SRCROOT)/fix/cflags.ed' 56 $(_v) sed 's/@VERSION@/$(ENV_PERL_BASE_VERSION)/g' $(SRCROOT)/fix/perlmain.c.ed | ed - ${BuildDirectory}/perlmain.c 57 $(_v) $(TOUCH) $(ConfigStamp2) 58 59zap-sitedirs: 60 $(_v) $(RMDIR) '$(DSTROOT)$(NSLOCALDIR)$(NSLIBRARYSUBDIR)' 61 62make-extra-links: 63 $(_v) $(LN) '$(DSTROOT)/usr/share/man/man1/perl.1' '$(DSTROOT)/usr/share/man/man1/perl$(ENV_PERL_BASE_VERSION).1' 64 $(_v) $(LN) '$(DSTROOT)/usr/share/man/man1/perl.1' '$(DSTROOT)/usr/share/man/man1/perl$(ENV_PERL_VERSION).1' 65