summaryrefslogtreecommitdiff
path: root/makeaperl.SH
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafcol.lafayette.edu>1995-02-21 01:14:24 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1995-02-21 01:14:24 +0000
commit40000a8c37c35cc00114329ca0add46bca36a0ec (patch)
tree900a06b8157172e6f7a69446e5e2d10eb27fada7 /makeaperl.SH
parentfed7345c45910a20f6865d6a2f8978d09b352f41 (diff)
downloadperl-40000a8c37c35cc00114329ca0add46bca36a0ec.tar.gz
perl5.000 patch.0l: MakeMaker 4.085 and upgrade Configure to dist3 PL 51.
Here's what's new: Configure Generated by metaconfig PL 51. Correctly set ./mips on a MIPS system. Improved (we hope) handling of $archname. MANIFEST MANIFEST.new Made .SH files out of h2xs and makeaperl so that they get the correct path-to-perl at the top. Makefile.SH Propagate $(perllib) to extensions. U/dist3_051.patches Two patches to apply on top of metaconfig PL 51. I've sent them off for inclusion in the next metaconfig update. config_h.SH config.H Regenerated. Only the order of elements has changed. ext/DB_File/Makefile.PL ext/GDBM_File/Makefile.PL ext/NDBM_File/Makefile.PL Add -L/usr/local/lib to LIBS variable. ext/POSIX/POSIX.xs Place #ifdef around FD_CLOEXEC (needed for Apollo). ext/SDBM_File/sdbm/Makefile.PL Simplified, thanks to MakeMaker enhancements. ext/util/make_ext Pass through $(perllib) argument for cflags. h2xs.SH Changed from h2xs to h2xs.SH. Now finds correct path to perl. hints/next_3_2.sh Updated for hppa. hints/solaris_2.sh Remove potentially problematic -lmalloc from $libswanted. hints/unicos.sh Look in /usr/include/rpcsvc for dbm.h. installperl Install h2xs. lib/Cwd.pm Use 'my' variable to avoid clobbering $_. lib/ExtUtils/MakeMaker.pm Upgraded from 4.06 to 4.085. Lots of documentation improvements. EXE_FILES to refer to an array of executable files to install. Reduce chatter during build process. Don't count a useful -L/path option as a successful search for a particular library. Cleanup handling of aix external symbols. Create/update perllocal.pod to indicate what we've done. makeaperl.SH Changed from makeaperl to makeaperl.SH. Now finds correct path to perl. x2p/util.c Delete unused setenv() and envix() functions. x2p/util.h Delete unused setenv() and envix() prototypes. vms/config.vms Define I_SYS_STAT and I_SYS_TYPES.
Diffstat (limited to 'makeaperl.SH')
-rw-r--r--makeaperl.SH127
1 files changed, 127 insertions, 0 deletions
diff --git a/makeaperl.SH b/makeaperl.SH
new file mode 100644
index 0000000000..c65b41d644
--- /dev/null
+++ b/makeaperl.SH
@@ -0,0 +1,127 @@
+case $CONFIG in
+'')
+ if test -f config.sh; then TOP=.;
+ elif test -f ../config.sh; then TOP=..;
+ elif test -f ../../config.sh; then TOP=../..;
+ elif test -f ../../../config.sh; then TOP=../../..;
+ elif test -f ../../../../config.sh; then TOP=../../../..;
+ else
+ echo "Can't find config.sh."; exit 1
+ fi
+ . $TOP/config.sh
+ ;;
+esac
+: This forces SH files to create target in same directory as SH file.
+: This is so that make depend always knows where to find SH derivatives.
+case "$0" in
+*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
+esac
+echo "Extracting makeaperl (with variable substitutions)"
+$spitshell >makeaperl <<!GROK!THIS!
+#!$bin/perl
+!GROK!THIS!
+
+$spitshell >>makeaperl <<'!NO!SUBS!'
+
+=head1 NAME
+
+makeaperl - create a new perl binary from static extensions
+
+=head1 SYNOPSIS
+
+C<makeaperl -l library -m makefile -o target -t tempdir [object_files] [static_extensions] [search_directories]>
+
+=head1 DESCRIPTION
+
+This utility is designed to build new perl binaries from existing
+extensions on the fly. Called without any arguments it produces a new
+binary with the name C<perl> in the current directory. Intermediate
+files are produced in C</tmp>, if that is writeable, else in the
+current directory. The most important intermediate file is a Makefile,
+that is used internally to call C<make>. The new perl binary will consist
+
+The C<-l> switch lets you specify the name of a perl library to be
+linked into the new binary. If you do not specify a library, makeaperl
+writes targets for any C<libperl*.a> it finds in the search path. The
+topmost target will be the one related to C<libperl.a>.
+
+With the C<-m> switch you can provide a name for the Makefile that
+will be written (default C</tmp/Makefile.$$>). Likewise specifies the
+C<-o> switch a name for the perl binary (default C<perl>). The C<-t>
+switch lets you determine, in which directory the intermediate files
+should be stored.
+
+All object files and static extensions following on the command line
+will be linked into the target file. If there are any directories
+specified on the command line, these directories are searched for
+C<*.a> files, and all of the found ones will be linked in, too. If
+there is no directory named, then the contents of $INC[0] are
+searched.
+
+If the command fails, there is currently no other mechanism to adjust
+the behaviour of the program than to alter the generated Makefile and
+run C<make> by hand.
+
+=head1 AUTHORS
+Tim Bunce <Tim.Bunce@ig.co.uk>, Andreas Koenig
+<koenig@franz.ww.TU-Berlin.DE>;
+
+=head2 STATUS
+First version, written 5 Feb 1995, is considered alpha.
+
+=cut
+
+use ExtUtils::MakeMaker;
+use Getopt::Long;
+use strict qw(subs refs);
+
+$Version = 1.0;
+$Verbose = 0;
+
+sub usage{
+ warn <<END;
+$0 version $Version
+
+$0: [options] [object_files] [static_extensions ...] [directories to search through]
+ -l perllibrary perl library to link from (the first libperl.a found)
+ -m makefilename name of the makefile to be written (/tmp/Makefile.\$\$)
+ -o name name for perl executable (perl)
+ -t directory directory where intermediate files reside (/tmp)
+END
+ exit 1;
+}
+
+if (-w "/tmp") {
+ $opt_t = "/tmp";
+} else {
+ $opt_t = ".";
+}
+$opt_l = '';
+$opt_m = "$opt_t/Makefile.$$";
+$opt_o = 'perl';
+
+$Getopt::Long::ignorecase=0;
+
+GetOptions('t=s', 'l=s', 'm=s', 'o=s') || die &usage;
+
+@dirs = grep -d $_, @ARGV;
+@fils = grep -f $_, @ARGV;
+
+@dirs = $INC[0] unless @dirs;
+
+open MAKE, ">$opt_m";
+MM->init_main();
+MM->init_others();
+print MAKE MM->makeaperl('MAKE' => $opt_m,
+ 'TARGET' => $opt_o,
+ 'TMP' => $opt_t,
+ 'LIBPERL' => $opt_l,
+ 'DIRS' => [@dirs],
+ 'STAT' => [@fils],
+ 'INCL' => [@dirs]
+);
+close MAKE;
+(system "make -f $opt_m") == 0 or die "$0 failed: Please check file $opt_m and run make -f $opt_m\n";
+!NO!SUBS!
+chmod 755 makeaperl
+$eunicefix makeaperl