]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/unit-cc.pl
Re-enable removal of a tmp file that was left out for debug.
[user/henk/code/inspircd.git] / make / unit-cc.pl
index 5110037ace2ce851c59980fb1b749aa05d1e3d8a..23a7dfb76fb7d74f031c8f137446760ec0d9c26b 100755 (executable)
@@ -1,21 +1,24 @@
 #!/usr/bin/perl
 use strict;
 use warnings;
-BEGIN { push @INC, '..'; }
+BEGIN { push @INC, $ENV{SOURCEPATH}; }
 use make::configure;
 
-my $file = shift;
+chdir $ENV{BUILDPATH};
+
+my $out = shift;
 my $verbose;
 
-if ($file =~ /^-/) {
-       $_ = $file;
-       $file = shift;
+if ($out =~ /^-/) {
+       $_ = $out;
+       $out = shift;
        $verbose = /v/;
 }
 
-my $out = shift;
+my $file = shift;
 
-my $cflags = nopedantic($file) ? $ENV{NICEFLAGS} : $ENV{FLAGS};
+my $cflags = $ENV{CXXFLAGS};
+$cflags =~ s/ -pedantic// if nopedantic($file);
 $cflags .= ' ' . getcompilerflags($file);
 
 my $flags;