cvsuser     01/12/30 11:13:07

  Modified:    .        Configure.pl Makefile.in
  Log:
  Make GCC pickier by default.
  
  Courtesy of: Josh Wilmes <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.46      +16 -3     parrot/Configure.pl
  
  Index: Configure.pl
  ===================================================================
  RCS file: /home/perlcvs/parrot/Configure.pl,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -w -r1.45 -r1.46
  --- Configure.pl      30 Dec 2001 17:26:55 -0000      1.45
  +++ Configure.pl      30 Dec 2001 19:13:07 -0000      1.46
  @@ -2,7 +2,7 @@
   #
   # Configure.pl
   #
  -# $Id: Configure.pl,v 1.45 2001/12/30 17:26:55 gregor Exp $
  +# $Id: Configure.pl,v 1.46 2001/12/30 19:13:07 dan Exp $
   #
   # Author: Brent Dax
   #
  @@ -30,7 +30,7 @@
   # Handle options:
   #
   
  -my($opt_debugging, $opt_defaults, $opt_version, $opt_help) = (0, 0, 0, 0);
  +my($opt_debugging, $opt_defaults, $opt_version, $opt_help, $opt_pedantic) = (0, 0, 
0, 0, 0);
   my(%opt_defines);
   my $result = GetOptions(
       'debugging!' => \$opt_debugging,
  @@ -38,11 +38,12 @@
       'version'    => \$opt_version,
       'help'       => \$opt_help,
       'define=s'   => \%opt_defines,
  +    'pedantic!'  => \$opt_pedantic,
   );
   
   if($opt_version) {
       print "Parrot Version $parrot_version Configure\n";
  -    print '$Id: Configure.pl,v 1.45 2001/12/30 17:26:55 gregor Exp $' . "\n";
  +    print '$Id: Configure.pl,v 1.46 2001/12/30 19:13:07 dan Exp $' . "\n";
       exit;
   }
   
  @@ -51,6 +52,7 @@
   $0 - Parrot Configure
   Options:
      --debugging          Enable debugging
  +   --pedantic           Add "-ansi -pedantic" if using gcc
      --defaults           Accept all default values
      --define name=value  Defines value name as value
      --help               This text
  @@ -124,8 +126,10 @@
       #
   
       ccflags       => $Config{ccflags},
  +    cc_inc     => "-I./include",
       libs          => $Config{libs},
       cc_debug      => '-g',
  +    cc_warn       => '',
       o             => '.o',                # object files extension
       exe           => $Config{_exe},
   
  @@ -164,6 +168,15 @@
       MINOR   =>    $parrot_version[1],
       PATCH   =>    $parrot_version[2],
   );
  +
  +
  +# If using gcc, crank up its warnings as much as possible and make it behave
  +# ansi-ish.
  +if ($Config{ccname} eq "gcc") {
  +   $c{cc_warn} = " -Wall";
  +   $c{cc_warn} .= " -ansi -pedantic" if $opt_pedantic;
  +}
  +
   
   
   #
  
  
  
  1.92      +7 -2      parrot/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/perlcvs/parrot/Makefile.in,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -w -r1.91 -r1.92
  --- Makefile.in       30 Dec 2001 17:58:39 -0000      1.91
  +++ Makefile.in       30 Dec 2001 19:13:07 -0000      1.92
  @@ -91,7 +91,7 @@
   #
   ###############################################################################
   
  -CFLAGS = ${ccflags} ${cc_debug} -I./include
  +CFLAGS = ${ccflags} ${cc_warn} ${cc_debug} ${cc_inc}
   
   C_LIBS = ${libs}
   
  @@ -109,6 +109,8 @@
   TEST_PROG = ${test_prog}
   TEST_PROG_SO = ${test_prog}_so
   PDUMP = pdump${exe}
  +LINT = lclint
  +LINTFLAGS = +showscan +posixlib -weak +longintegral +matchanyintegral -formattype
   
   
   ###############################################################################
  @@ -384,3 +386,6 @@
   status:
        cvs -n -q upd -dP
   
  +lint: ${test_prog}
  +     $(LINT) ${cc_inc} -Iclasses $(LINTFLAGS) `echo $(O_FILES) | sed 's/\.o/\.c/g'`
  +     $(LINT) ${cc_inc} $(LINTFLAGS) test_main.c
  
  
  


Reply via email to