block 633884 by 696189 thanks (Updating this bug to reflect the available support in perl-cross-debian to simplify the cross-building support for perl.)
Some of the background has already discussed with the perl maintainers during the development of perl-cross-debian and now that perl-cross-debian is in experimental, we can continue the process in the BTS. The process needs more testing - especially runtime testing of the cross-built perl packages. There are steps upstream to improve perl cross-building [0] and there appears to be some overlap between how this upstream support can be implemented and how perl-cross-debian can support cross-building in the meantime. The attached patches are the parts of perl-cross-debian support which need to be patched into perl - Makefile.SH for avoiding the execution of cross-built binaries alongside the use of pre-configured config data and changes to debian/rules to replace calls to perl.static with a variable to support calling /usr/bin/perl when cross-building. The patches themselves have evolved since #285559 was filed against perl 5.8.4 and updated for #633884 - there are elements of the current patches which are historical. Nearly all of the changes to Makefile.SH are isolated within conditionals utilising CROSS_PERL except one - the extensions target. This could do with some more testing but it is mainly to support the alternative extensions build target to avoid some of the work needed by the 'all' target. It could also be useful in the generation of the cache files themselves as the content of the generated headers are common to some combinations of architecture. It *should* make it easier to prevent the kind of errors which have tripped me up once already. [1] I hope to use this target *on native* machines to only generate the extensions data to try and debug similar problems. debian/rules has a wider range of changes. The current set are predicated on dpkg-cross style cross-dependency paths. It should be possible to detect MultiArch paths simply by checking for certain directories but that can be added later. The changes to debian/rules move the current setting of INCLUDE and LIB alongside the setting of ZLIB_INCLUDE and BZIP2_INCLUDE etc. With MultiArch support, it could be worth testing if these are historical or still necessary as the headers are arch-independent (currently). HOST_PERL_LIBS is set to the package_upstream_version because perl has problems trying to cross-build one version or perl using the native perl binaries from a different version. DynaLoader was the first to fail when I was testing this. perl-cross-debian checks that these versions match. perl-cross-debian is not (and isn't expected to be) a build-dependency of perl (cross build or not) but that's expected with cross-builds. Cross-builders are used to less-than-graceful failures - the fact that the cross-build will fail noisily if perl-cross-debian is not installed is actually a bonus because it will fail early. Installing the cross-compiler itself is a largely undocumented process... After perl-cross-debian is called, the cross-build calls perl directly. This may seem inconsistent but the other uses of PERL_TO_USE are mainly to allow for use in both native and cross builds. perl-cross-debian itself isn't called using PERL_TO_USE and it is a perl script. > > + $(MAKE) perl $(test_target) CROSS_PERL=$(HOST_PERL) > > + mv libperl.a libperl-static The explanation for this is that $(test_target) is empty for a cross-build via the DEB_BUILD_OPTIONS="nocheck" and debian/config.debian --test-target. perl-cross-debian checks for this variable and fails the build if it is not set. I can attach compressed build logs of the 5.14 and 5.16 cross-build, if that is useful. > > - ./perl.static -Ilib -V > > + $(PERL_TO_USE) -Ilib -V This does work - running the host perl with the cross Config.pm and the rest. It's one of the reasons why the versions of the cross perl build and the host perl must match. > > +ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) > > $(MAKE) all $(test_target) || { rm -f libperl.so*; exit 1; } > > +else > > + @echo "Need to use installed (host) extensions when building > > extensions...." > > + @echo "Overwrite any built so far" > > + cp -fr $(HOST_PERL_LIBS)/auto/* lib/auto/ > > + @echo "Now make the extensions" > > + -mkdir lib/$(DEB_HOST_GNU_TYPE) > > + $(MAKE) extensions CROSS_PERL=$(HOST_PERL) > > INST_ARCHLIB=$(srcdir)/lib/$(DEB_HOST_GNU_TYPE) > > +endif I will try and get some more testing done on whether the overwriting is the right thing to do or whether the extensions need to be deleted or made unreadable with chmod -r. > > - debian/substvars debian/files debian/list.tmp $(tmp) $(build) > > + debian/substvars debian/files debian/list.tmp $(tmp) $(build) \ > > + Configure.cross config.sh config.h xconfig.h uudmap.h > > bitcount.h > This is a bug in perl-cross-debian - the knowledge of which files are to be deleted lives within perl-cross-debian, so it needs to clean these too. Same with Cross/$(DEB_HOST_GNU_TYPE)/*.new > > +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) > > + @echo "Copy back all the target-independent extensions - for use > > and installation" > > + cp -fr $(HOST_PERL_LIBS)/auto/* lib/auto/ > > + $(MAKE) install CROSS_PERL=$(HOST_PERL) This section could do with some more testing. I'm not sure how much testing the cross-built extensions will actually receive, other than what is needed to use them to build perl natively. OK, what I think I need to do is sort out a few bug fixes in perl-cross-debian, get more people doing testing by applying (and possibly improving) a patch from perl-cross-debian for debian/rules in perl, then updating #633884. I don't mind carrying patches for debian/rules during the testing but if we can get Makefile.SH patched in 5.16, that will make things a lot easier. Hence, blocking this bug with the perl-cross-debian bug which will then result in an updated patch for debian/rules. [0] http://news.perlfoundation.org/2012/05/grant-application-improving-cr.html [1] https://github.com/codehelp/perl-cross-debian/commit/fbdbdcfb3c8e900466fdfb4b36944593dd528ae9 -- Neil Williams ============= http://www.linux.codehelp.co.uk/
--- a/Makefile.SH +++ b/Makefile.SH @@ -291,10 +291,12 @@ OBJ_EXT = $_o PATH_SEP = $p_ +ifeq (,\$(CROSS_PERL)) # Macros to invoke a copy of miniperl during the build. Targets which # are built using these macros should depend on \$(MINIPERL_EXE) MINIPERL_EXE = miniperl\$(EXE_EXT) MINIPERL = \$(LDLIBPTH) \$(RUN) ./miniperl\$(EXE_EXT) -Ilib +HOST_MINIPERL = $(MINIPERL_EXE) # Macros to invoke a copy of our fully operational perl during the build. PERL_EXE = perl\$(EXE_EXT) @@ -303,6 +305,23 @@ # Macros to run our tests RUN_TESTS = \$(LDLIBPTH) ./runtests +else # CROSS_PERL + +# Macros to invoke a copy of miniperl during the build. Targets which +# are built using these macros should depend on \$(MINIPERL_EXE) +MINIPERL_EXE = miniperl\$(EXE_EXT) +MINIPERL = \$(CROSS_PERL) +HOST_MINIPERL = \$(CROSS_PERL) + +# Macros to invoke a copy of our fully operational perl during the build. +PERL_EXE = perl\$(EXE_EXT) +RUN_PERL = \$(CROSS_PERL) + +# Macros to run our tests +RUN_TESTS = echo "Not running tests" + +endif # CROSS_PERL + dynamic_ext = $dynamic_list dynamic_ext_re = $dynamic_ext_re static_ext = $static_list @@ -533,6 +552,9 @@ @echo " "; @echo " Everything is up to date. Type '$(MAKE) test' to run test suite." +# Cross building requires a separate target to allow manipulation of the build tree +extensions: $(dynamic_ext) $(nonxs_ext) + .PHONY: all translators utilities # Both git_version.h and lib/Config_git.pl are built @@ -616,6 +638,9 @@ globals$(OBJ_EXT): uudmap.h bitcount.h +ifeq (,\$(CROSS_PERL)) +# If we're cross-building, we should have uudmap.h and bitcount.h +# provided already uudmap.h: bitcount.h bitcount.h: generate_uudmap$(HOST_EXE_EXT) @@ -623,6 +648,7 @@ generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT) $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs) +endif miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h $(CCCMD) $(PLDLFLAGS) $*.c @@ -795,18 +821,30 @@ aix*|beos*) $spitshell >>$Makefile <<'!NO!SUBS!' $(MINIPERL_EXE): $& miniperlmain$(OBJ_EXT) $(mini_obj) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) +ifeq (,$(CROSS_PERL)) $(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) \ $(mini_obj) \ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(libs) $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest +else + -rm $(MINIPERL_EXE) + ln -s $(HOST_MINIPERL) $(MINIPERL_EXE) +endif + !NO!SUBS! ;; next4*) $spitshell >>$Makefile <<'!NO!SUBS!' $(MINIPERL_EXE): $& miniperlmain$(OBJ_EXT) $(mini_obj) perlmini$(OBJ_EXT) opmini$(OBJ_EXT) +ifeq (,$(CROSS_PERL)) $(CC) -o $(MINIPERL_EXE) $(mini_obj) \ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(libs) $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest +else + -rm $(MINIPERL_EXE) + ln -s $(HOST_MINIPERL) $(MINIPERL_EXE) +endif + !NO!SUBS! ;; darwin*) @@ -825,20 +863,32 @@ $spitshell >>$Makefile <<'!NO!SUBS!' $(MINIPERL_EXE): $& miniperlmain$(OBJ_EXT) $(mini_obj) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) -@rm -f miniperl.xok +ifeq (,$(CROSS_PERL)) $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \ $(mini_obj) \ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(libs) $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest +else + -rm $(MINIPERL_EXE) + ln -s $(HOST_MINIPERL) $(MINIPERL_EXE) +endif + !NO!SUBS! ;; *) $spitshell >>$Makefile <<'!NO!SUBS!' $(MINIPERL_EXE): $& miniperlmain$(OBJ_EXT) $(mini_obj) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) -@rm -f miniperl.xok +ifeq (,$(CROSS_PERL)) $(LDLIBPTH) $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \ $(mini_obj) \ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(libs) $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest +else + -rm $(MINIPERL_EXE) + ln -s $(HOST_MINIPERL) $(MINIPERL_EXE) +endif + !NO!SUBS! ;; esac
--- /home/neil/code/debian/src/perl/perl-5.14.2/debian/rules +++ /home/neil/code/debian/src/perl/patches/rules @@ -35,29 +35,64 @@ checkroot = test `id -u` -eq 0 checkperl = $(SHELL) debian/checkperl +# CROSSING +# Don't configure - copy in cross files +# NOTE: Different for static/shared/debug +# usecrosscompile not set no target host etc +# Don't build miniperl - use host perl +# Later - build host miniperl +# Later - find on host +# + +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + # this may differ from $(fullversion) for release candidates and the like package_upstream_version = $(shell dpkg-parsechangelog | \ sed -ne 's/-[^-]\+$$//; s/^Version: *\([0-9]\+:\)*//p') package_version = $(shell dpkg-parsechangelog | sed -n 's/^Version: *//p') +ifeq ($(DEB_HOST_GNU_TYPE), $(DEB_BUILD_GNU_TYPE)) + HOST_PERL = + PERL_TO_USE = $(srcdir)/perl.static + HEADER_DIR = /usr/include + OBJCOPY = objcopy + STRIP = strip + export ZLIB_INCLUDE=/usr/include + export ZLIB_LIB=/usr/lib + export BZIP2_INCLUDE=/usr/include + export BZIP2_LIB=/usr/lib + export INCLUDE=/usr/include + export LIB=/usr/lib +else + HOST_PERL = $(shell which perl) + PERL_TO_USE = $(HOST_PERL) + HOST_PERL_LIBS = /usr/lib/perl/$(package_upstream_version) + HEADER_DIR = /usr/$(DEB_HOST_GNU_TYPE)/include + OBJCOPY = $(DEB_HOST_GNU_TYPE)-objcopy + STRIP = $(DEB_HOST_GNU_TYPE)-strip + export ZLIB_INCLUDE=/usr/$(DEB_HOST_GNU_TYPE)/include + export ZLIB_LIB=/usr/$(DEB_HOST_GNU_TYPE)/lib + export BZIP2_INCLUDE=/usr/$(DEB_HOST_GNU_TYPE)/include + export BZIP2_LIB=/usr/$(DEB_HOST_GNU_TYPE)/lib + export INCLUDE=/usr/$(DEB_HOST_GNU_TYPE)/include + export LIB=/usr/$(DEB_HOST_GNU_TYPE)/lib +endif + # this gets prepended to the patch names in patchlevel.h patchprefix = DEBPKG: # control file substitutions subst_upstream = -VUpstream-Version=$(package_upstream_version) -subst_perlapi = -Vperlapi:Provides="`./perl.static debian/mkprovides`" +subst_perlapi = -Vperlapi:Provides="`$(PERL_TO_USE) debian/mkprovides`" subst_next_upstream = -VNext-Upstream-Version=$(nextversion) # for cpan/Compress-Raw-Zlib export BUILD_ZLIB=False -export ZLIB_INCLUDE=/usr/include -export ZLIB_LIB=/usr/lib # for cpan/Compress-Raw-Bzip2 export BUILD_BZIP2=0 -export BZIP2_INCLUDE=/usr/include -export BZIP2_LIB=/usr/lib build: build-stamp install: install-stamp @@ -73,61 +108,111 @@ test -f $< # maintainer sanity check debian/gen-patchlevel -p $(patchprefix) -v $(package_version) $< > $@ +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + +define variant +$(if $(findstring static,$1),static,$(if $(findstring debug,$1),debug,shared)) +endef + +define cross-config + /usr/bin/perl-cross-debian --variant $(call variant,$@) + perl -Ilib make_patchnum.pl +endef +endif + perl.static: $(checkdir) rm -f libperl.so* # must be built last - [ ! -f Makefile ] || $(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean CROSS_PERL=$(HOST_PERL) [ -f $(patchlevel) ] || touch $(patchlevel) +ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) $(SHELL) debian/config.debian --static - $(MAKE) perl $(test_target) +else + $(cross-config) +endif + $(MAKE) perl $(test_target) CROSS_PERL=$(HOST_PERL) mv libperl.a libperl-static mv perl perl.static # for the build log - ./perl.static -Ilib -V + $(PERL_TO_USE) -Ilib -V perl.debug: $(checkdir) rm -f libperl.so* # must be built last - [ ! -f Makefile ] || $(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean CROSS_PERL=$(HOST_PERL) [ -f $(patchlevel) ] || touch $(patchlevel) +ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) $(SHELL) debian/config.debian --debug - $(MAKE) perl +else + $(cross-config) +endif + $(MAKE) perl CROSS_PERL=$(HOST_PERL) mv perl perl.debug libperl.so.$(fullversion): $(checkdir) - [ ! -f Makefile ] || $(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean CROSS_PERL=$(HOST_PERL) [ -f $(patchlevel) ] || touch $(patchlevel) +ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) $(SHELL) debian/config.debian --shared - $(MAKE) SHRPLDFLAGS='$$(LDDLFLAGS) -Wl,-soname,libperl.so.$(version)' $@ +else + $(cross-config) +endif + $(MAKE) SHRPLDFLAGS='$$(LDDLFLAGS) -Wl,-soname,libperl.so.$(version)' $@ CROSS_PERL=$(HOST_PERL) ln -s libperl.so.$(fullversion) libperl.so.$(version) ln -s libperl.so.$(version) libperl.so +ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) $(MAKE) all $(test_target) || { rm -f libperl.so*; exit 1; } +else + @echo "Need to use installed (host) extensions when building extensions...." + @echo "Overwrite any built so far" + cp -fr $(HOST_PERL_LIBS)/auto/* lib/auto/ + @echo "Now make the extensions" + -mkdir lib/$(DEB_HOST_GNU_TYPE) + $(MAKE) extensions CROSS_PERL=$(HOST_PERL) INST_ARCHLIB=$(srcdir)/lib/$(DEB_HOST_GNU_TYPE) +endif + clean: $(checkdir) $(checkroot) test -f $(patches) # maintainer sanity check - [ ! -f Makefile ] || $(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean CROSS_PERL=$(HOST_PERL) rm -rf config.over perl.static perl.debug libperl-static libperl.so* \ $(patchlevel) build-stamp install-stamp t/auto debian/shlibs.local \ debian/perl-base.shlibs debian/libperl$(version).shlibs \ - debian/substvars debian/files debian/list.tmp $(tmp) $(build) + debian/substvars debian/files debian/list.tmp $(tmp) $(build) \ + Configure.cross config.sh config.h xconfig.h uudmap.h bitcount.h # <https://rt.cpan.org/Public/Bug/Display.html?id=68214> rm -f cpan/DB_File/DB_File.pm.bak cpan/DB_File/t/db-btree.t.bak \ cpan/DB_File/t/db-hash.t.bak cpan/DB_File/t/db-recno.t.bak + find lib -name .exists -o -name '*.so' -o -name '*.bs' -o -name '*.ld' | xargs rm -f +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + rm -fr Cross/$(DEB_HOST_GNU_TYPE)/*.new +endif install-stamp: build-stamp $(checkdir) $(checkroot) $(checkperl) rm -rf $(tmp) $(build) - +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + @echo "Copy back all the target-independent extensions - for use and installation" + cp -fr $(HOST_PERL_LIBS)/auto/* lib/auto/ + $(MAKE) install CROSS_PERL=$(HOST_PERL) + @echo "Copy the arch dependent ones over the debian ones for installation into packages" + find . -name .exists -o -name '*.bs' | xargs rm -f + cp -fr lib/$(DEB_HOST_GNU_TYPE)/auto/* $(lib)/auto/ + echo "Don't install INST_ARCHLIB into packages" + -find $(tmp)/usr/share/perl -name $(DEB_HOST_GNU_TYPE) -exec rm -fr {} \; +else $(MAKE) install +endif # remove temporary prefix on install vars and switch man # extensions to 1p and 3pm for vendor module installs - SRCDIR="$(srcdir)" ./perl.static -i -pe 's!\Q$$ENV{SRCDIR}\E/$(tmp)/!/! if /install/;' \ + + SRCDIR="$(srcdir)" $(PERL_TO_USE) -i -pe 's!\Q$$ENV{SRCDIR}\E/$(tmp)/!/! if /install/;' \ -e 's/^(man1ext=).*/$$1'\''1p'\''/;' \ -e 's/^(man3ext=).*/$$1'\''3pm'\''/;' \ $(lib)/Config.pm $(lib)/Config_heavy.pl @@ -138,24 +223,24 @@ for flag in $(shell dpkg-buildflags --get CPPFLAGS) \ $(shell dpkg-buildflags --get CFLAGS); do \ case "$$flag" in -fstack-protector) ;; \ - *) ./perl.static -i -pe "/^(cc|cpp)flags/ and \ + *) $(PERL_TO_USE) -i -pe "/^(cc|cpp)flags/ and \ s/(['\s])\Q$$flag\E(['\s])/\1\2/ and s/ +/ /" \ $(lib)/Config.pm $(lib)/Config_heavy.pl ;; \ esac; done; \ for flag in $(shell dpkg-buildflags --get LDFLAGS); do \ - ./perl.static -i -pe "/^ld(dl)?flags/ and \ + $(PERL_TO_USE) -i -pe "/^ld(dl)?flags/ and \ s/(['\s])\Q$$flag\E(['\s])/\1\2/ and s/ +/ /" \ $(lib)/Config.pm $(lib)/Config_heavy.pl ; \ done; \ fi # convert required header files - -cd /usr/include; $(srcdir)/perl.static -I $(srcdir)/lib \ + -cd $(HEADER_DIR); $(PERL_TO_USE) -I $(srcdir)/lib \ $(srcdir)/utils/h2ph -a -d $(srcdir)/$(lib) \ `cat $(srcdir)/debian/headers` # fix up generated headers - ./perl.static -Ilib debian/fixheaders $(lib) + $(PERL_TO_USE) -Ilib debian/fixheaders $(lib) # simple wrapper around Errno module cp debian/errno.ph $(lib) @@ -163,10 +248,10 @@ ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) ifeq (,$(findstring x-perl-notest,$(DEB_BUILD_OPTIONS))) # Verify that the headers are usable - for ph in `< debian/headers sed -e 's/\.h$$/.ph/'`; do \ - if [ ! -f $(lib)/$$ph ]; then \ + for ph in `< $(srcdir)/debian/headers sed -e 's/\.h$$/.ph/'`; do \ + if [ ! -f $(srcdir)/$(lib)/$$ph ]; then \ echo "$$ph: missing"; else \ - echo $$ph | ./perl.static debian/check-require $(tmp) \ + echo $$ph | $(PERL_TO_USE) debian/check-require $(tmp) \ || exit 1; \ fi; \ done @@ -213,14 +298,14 @@ done) >debian/list.tmp; \ (cd $(tmp); cpio -vdumpl ../build/$$p) <debian/list.tmp 2>&1 | \ grep -v ' linked to '; \ - (cd $(tmp); ../../perl.static -nle unlink) <debian/list.tmp; \ + (cd $(tmp); $(PERL_TO_USE) -nle unlink) <debian/list.tmp; \ done # ensure that all file have been moved from debian/tmp test `find $(tmp) ! -type d | wc -l` -eq 0 # move pod out of -base modules and into .pod files in -doc - ./perl.static debian/splitdoc $(build)/perl-base + $(PERL_TO_USE) debian/splitdoc $(build)/perl-base # create symlinks to match @INC ln -s $(fullversion) $(build)/perl-base/usr/lib/perl/$(version) @@ -231,7 +316,7 @@ # Verify that perl-base stays self contained # plain "use IO " and "use re" are deprecated and/or useless - ./perl.static $(srcdir)/debian/check-require $(build)/perl-base \ + $(PERL_TO_USE) $(srcdir)/debian/check-require $(build)/perl-base \ < debian/perl-base.files endif endif @@ -269,7 +354,7 @@ cp debian/rename $(build)/perl/usr/bin/prename chmod 755 $(build)/perl/usr/bin/prename - ./perl.static -Ilib $(build)/perl/usr/bin/pod2man --official \ + $(PERL_TO_USE) -Ilib $(build)/perl/usr/bin/pod2man --official \ debian/rename >$(build)/perl/usr/share/man/man1/prename.1 # install docs @@ -336,12 +421,12 @@ dir=$${path%/*}; \ test -d $(debug)$$dir || mkdir -p $(debug)$$dir; \ # stash debugging symbols \ - objcopy --only-keep-debug $$f $(debug)$$path; \ + $(OBJCOPY) --only-keep-debug $$f $(debug)$$path; \ # strip \ - strip --remove-section=.comment --remove-section=.note \ + $(STRIP) --remove-section=.comment --remove-section=.note \ $$extra $$f; \ # add debuglink \ - objcopy --add-gnu-debuglink=$(debug)$$path $$f; \ + $(OBJCOPY) --add-gnu-debuglink=$(debug)$$path $$f; \ esac; \ done # versioned hardlink for the detached debug symbols @@ -384,7 +469,7 @@ $(checkdir) $(checkroot) rm -f debian/substvars - for p in `./perl.static -l -00ne 'print $$1 if /^Architecture:\s+all/m \ + for p in `$(PERL_TO_USE) -l -00ne 'print $$1 if /^Architecture:\s+all/m \ and /^Package:\s+(.*)/m' debian/control`; \ do \ rm -rf $(build)/$$p/DEBIAN; \ @@ -420,7 +505,7 @@ >debian/perl-base.shlibs endif - for p in `./perl.static -l -00ne 'print $$1 if /^Architecture:\s+any/m \ + for p in `$(PERL_TO_USE) -l -00ne 'print $$1 if /^Architecture:\s+any/m \ and /^Package:\s+(.*)/m' debian/control`; \ do \ rm -rf $(build)/$$p/DEBIAN debian/substvars; \ @@ -436,7 +521,7 @@ >$(build)/$$p/DEBIAN/md5sums; \ done # dpkg-shlibdeps needs to be run only after all the shlibs are present - for p in `./perl.static -l -00ne 'print $$1 if /^Architecture:\s+any/m \ + for p in `$(PERL_TO_USE) -l -00ne 'print $$1 if /^Architecture:\s+any/m \ and /^Package:\s+(.*)/m' debian/control`; \ do \ find $(build)/$$p/usr -type f \
pgpYpsVcEcWbi.pgp
Description: PGP signature