diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-07-01 15:20:38 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-07-01 15:20:38 +0000 |
commit | f5eac2152adebf3de703707e233f00e2cd249b47 (patch) | |
tree | 0048932237765a6c63f17c9b2b9014404429b3fc /utils | |
parent | e993d95c6e24a91b7f3eb45e4b27ff04efa2e0f6 (diff) | |
download | perl-f5eac2152adebf3de703707e233f00e2cd249b47.tar.gz |
Make 'compile' target a little less broken.
Still very broken, though: -Wall warnings from
the generated code, boot_Foo prototypes missing,
can't autoload Fcntl::SEEK_CUR et alia, ...
p4raw-id: //depot/perl@11061
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Makefile | 20 | ||||
-rw-r--r-- | utils/perlcc.PL | 22 |
2 files changed, 18 insertions, 24 deletions
diff --git a/utils/Makefile b/utils/Makefile index 801b4a4244..043430aba8 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -12,16 +12,16 @@ plextractexe = ./c2ph ./h2ph ./h2xs ./perlbug ./perldoc ./pl2pm ./splain ./perl all: $(plextract) compile: all $(plextract) - $(REALPERL) -I../lib perlcc c2ph -o c2ph.exe -v 10 -log ../compilelog; - $(REALPERL) -I../lib perlcc h2ph -o h2ph.exe -v 10 -log ../compilelog; - $(REALPERL) -I../lib perlcc h2xs -o h2xs.exe -v 10 -log ../compilelog; - $(REALPERL) -I../lib perlcc perlbug -o perlbug.exe -v 10 -log ../compilelog; - $(REALPERL) -I../lib perlcc perldoc -o perldoc.exe -v 10 -log ../compilelog; - $(REALPERL) -I../lib perlcc pl2pm -o pl2pm.exe -v 10 -log ../compilelog; - $(REALPERL) -I../lib perlcc splain -o splain.exe -v 10 -log ../compilelog; - $(REALPERL) -I../lib perlcc perlcc -o perlcc.exe -v 10 -log ../compilelog; - $(REALPERL) -I../lib perlcc dprofpp -o dprofpp.exe -v 10 -log ../compilelog; - $(REALPERL) -I../lib perlcc libnetcfg -o libnetcfg.exe -v 10 -log ../compilelog; + $(REALPERL) -I../lib perlcc -I .. -L .. c2ph -o c2ph.exe -v 10 -log ../compilelog; + $(REALPERL) -I../lib perlcc -I .. -L .. h2ph -o h2ph.exe -v 10 -log ../compilelog; + $(REALPERL) -I../lib perlcc -I .. -L .. h2xs -o h2xs.exe -v 10 -log ../compilelog; + $(REALPERL) -I../lib perlcc -I .. -L .. perlbug -o perlbug.exe -v 10 -log ../compilelog; + $(REALPERL) -I../lib perlcc -I .. -L .. perldoc -o perldoc.exe -v 10 -log ../compilelog; + $(REALPERL) -I../lib perlcc -I .. -L .. pl2pm -o pl2pm.exe -v 10 -log ../compilelog; + $(REALPERL) -I../lib perlcc -I .. -L .. splain -o splain.exe -v 10 -log ../compilelog; + $(REALPERL) -I../lib perlcc -I .. -L .. perlcc -I .. -L .. -o perlcc.exe -v 10 -log ../compilelog; + $(REALPERL) -I../lib perlcc -I .. -L .. dprofpp -o dprofpp.exe -v 10 -log ../compilelog; + $(REALPERL) -I../lib perlcc -I .. -L .. libnetcfg -o libnetcfg.exe -v 10 -log ../compilelog; $(plextract): $(PERL) -I../lib $@.PL diff --git a/utils/perlcc.PL b/utils/perlcc.PL index 63045559d8..cdd7759b31 100644 --- a/utils/perlcc.PL +++ b/utils/perlcc.PL @@ -146,8 +146,10 @@ sub vprint { sub parse_argv { use Getopt::Long; -# Getopt::Long::Configure("bundling"); turned off. this is silly because -# it doesn't allow for long switches. + + # disallows using long arguments + # Getopt::Long::Configure("bundling"); + Getopt::Long::Configure("no_ignore_case"); # no difference in exists and defined for %ENV; also, a "0" @@ -173,17 +175,6 @@ sub parse_argv { 'log:s' # where to log compilation process information ); - # This is an attempt to make perlcc's arg. handling look like cc. - # if ( opt('s') ) { # must quote: looks like s)foo)bar)! - # if (opt('s') eq 'hared') { - # $Options->{shared}++; - # } elsif (opt('s') eq 'tatic') { - # $Options->{static}++; - # } else { - # warn "$0: Unknown option -s", opt('s'); - # } - # } - $Options->{v} += 0; helpme() if opt(h); # And exit @@ -334,6 +325,7 @@ sub cc_harness { $command .= " -L".$_ for split /\s+/, opt(L); my @mods = split /-?u /, $stash; $command .= " ".ExtUtils::Embed::ldopts("-std", \@mods); + $command .= " -lperl"; vprint 3, "running $Config{cc} $command"; system("$Config{cc} $command"); } @@ -582,8 +574,10 @@ perlcc - generate executables from Perl programs $ perlcc -e 'print q//' # Compiles a one-liner into 'a.out' $ perlcc -c -e 'print q//' # Creates a C file 'a.out.c' - $ perlcc -r hello # compiles 'hello' into 'a.out', runs 'a.out'. + $ perlcc -I /foo hello # extra headers (notice the space after -I) + $ perlcc -L /foo hello # extra libraries (notice the space after -L) + $ perlcc -r hello # compiles 'hello' into 'a.out', runs 'a.out'. $ perlcc -r hello a b c # compiles 'hello' into 'a.out', runs 'a.out'. # with arguments 'a b c' |