Change 11061 by jhi@alpha on 2001/07/01 15:20:38

        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, ...

Affected files ...

... //depot/perl/ext/B/B/C.pm#59 edit
... //depot/perl/pod/Makefile.SH#10 edit
... //depot/perl/t/TEST#49 edit
... //depot/perl/utils/Makefile#19 edit
... //depot/perl/utils/perlcc.PL#23 edit
... //depot/perl/x2p/Makefile.SH#28 edit

Differences ...

==== //depot/perl/ext/B/B/C.pm#59 (text) ====
Index: perl/ext/B/B/C.pm
--- perl/ext/B/B/C.pm.~1~       Sun Jul  1 09:30:05 2001
+++ perl/ext/B/B/C.pm   Sun Jul  1 09:30:05 2001
@@ -362,7 +362,7 @@
     if (defined($re)) {
        my $resym = sprintf("re%d", $re_index++);
        $decl->add(sprintf("static char *$resym = %s;", cstring($re)));
-       $init->add(sprintf("PM_SETRE($pm,pregcomp($resym, $resym + %u, &$pm));",
+       $init->add(sprintf("PM_SETRE(&$pm,pregcomp($resym, $resym + %u, &$pm));",
                           length($re)));
     }
     if ($gvsym) {

==== //depot/perl/pod/Makefile.SH#10 (text) ====
Index: perl/pod/Makefile.SH
--- perl/pod/Makefile.SH.~1~    Sun Jul  1 09:30:05 2001
+++ perl/pod/Makefile.SH        Sun Jul  1 09:30:05 2001
@@ -163,9 +163,9 @@
        sh ../mv-if-diff perlmodlib.tmp perlmodlib.pod
 
 compile: all
-       $(REALPERL) -I../lib ../utils/perlcc -o pod2latex.exe pod2latex -log 
../compilelog
-       $(REALPERL) -I../lib ../utils/perlcc -o pod2man.exe pod2man -log ../compilelog
-       $(REALPERL) -I../lib ../utils/perlcc -o pod2text.exe pod2text -log 
../compilelog
-       $(REALPERL) -I../lib ../utils/perlcc -o checkpods.exe checkpods -log 
../compilelog
+       $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o pod2latex.exe pod2latex 
+-log ../compilelog
+       $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o pod2man.exe pod2man -log 
+../compilelog
+       $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o pod2text.exe pod2text -log 
+../compilelog
+       $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o checkpods.exe checkpods 
+-log ../compilelog
 
 !NO!SUBS!

==== //depot/perl/t/TEST#49 (xtext) ====
==== //depot/perl/utils/Makefile#19 (text) ====
Index: perl/utils/Makefile
--- perl/utils/Makefile.~1~     Sun Jul  1 09:30:05 2001
+++ perl/utils/Makefile Sun Jul  1 09:30:05 2001
@@ -12,16 +12,16 @@
 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 [email protected]

==== //depot/perl/utils/perlcc.PL#23 (text) ====
Index: perl/utils/perlcc.PL
--- perl/utils/perlcc.PL.~1~    Sun Jul  1 09:30:05 2001
+++ perl/utils/perlcc.PL        Sun Jul  1 09:30:05 2001
@@ -146,8 +146,10 @@
 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 @@
        '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 @@
        $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 -e 'print q//'     # Compiles a one-liner into 'a.out'
     $ perlcc -c -e 'print q//'  # Creates a C file 'a.out.c'
 
+    $ 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' 
 

==== //depot/perl/x2p/Makefile.SH#28 (xtext) ====
Index: perl/x2p/Makefile.SH
--- perl/x2p/Makefile.SH.~1~    Sun Jul  1 09:30:05 2001
+++ perl/x2p/Makefile.SH        Sun Jul  1 09:30:05 2001
@@ -102,7 +102,7 @@
        @echo " "
 
 compile: all
-       $(REALPERL) -I../lib ../utils/perlcc -regex 's/$$/.exe/' $(plextract) -prog 
-verbose dcf -log ../compilelog;  
+       $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. $(plextract) -v -log 
+../compilelog;  
 
 a2p: $(obj) a2p$(OBJ_EXT)
        $(CC) -o a2p $(LDFLAGS) $(obj) a2p$(OBJ_EXT) $(libs)
End of Patch.

Reply via email to