Remove the now unused cflags script.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 25 Feb 2008 14:39:46 +0000 (15:39 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 29 Feb 2008 14:02:30 +0000 (15:02 +0100)
(This used to be commit f97cce2522e7644181506dc49947297b394743eb)

source4/Makefile
source4/rules.mk
source4/script/cflags.pl [deleted file]

index 1fddfefce3b3fcb444165d5c1f3734a022a445ad..f9a753eb6706f5f1be8baf8803cd14655b754879 100644 (file)
@@ -23,6 +23,7 @@ default: all
 
 include rules.mk
 include data.mk
+include extra_cflags.txt
 
 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
                  $(srcdir)/version.h
index b644a6a52aab51586720b162db2fd6f083af556c..d0be997d0cd3e1e99b5bbe12068335c9b2fbd7bb 100644 (file)
@@ -1,33 +1,27 @@
 # Dependencies command
 DEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.o) -MT $@ \
-    $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(CPPFLAGS) $< -o $@
+    $(CFLAGS) $(CPPFLAGS) $< -o $@
 # Dependencies for host objects
 HDEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.ho) -MT $@ \
-    $(HOSTCC_FLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(CPPFLAGS) $< -o $@
+    $(HOSTCC_FLAGS) $(CPPFLAGS) $< -o $@
 # Dependencies for precompiled headers
 PCHDEPENDS = $(CC) -M -MG -MT include/includes.h.gch -MT $@ \
     $(CFLAGS) $(CPPFLAGS) $< -o $@
 
 # Run a static analysis checker
-CHECK = $(CC_CHECKER) $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(PICFLAG) $(CPPLAGS) -c $< -o $@
+CHECK = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) $(CPPLAGS) -c $< -o $@
 
 # Run the configured compiler
 COMPILE = $(CC) $(CFLAGS) $(PICFLAG) \
-          `$(PERL) $(srcdir)/script/cflags.pl $@` \
                  $(CPPFLAGS) \
                  -c $< -o $@
 
 # Run the compiler for the build host
-HCOMPILE = $(HOSTCC) $(HOSTCC_FLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-        $(CPPFLAGS) -c $< -o $@
+HCOMPILE = $(HOSTCC) $(HOSTCC_FLAGS) $(CPPFLAGS) -c $< -o $@
 
 # Precompile headers
 PCHCOMPILE = @$(CC) -Ilib/replace \
-    $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(PICFLAG) $(CPPFLAGS) -c $< -o $@
+    $(CFLAGS) $(PICFLAG) $(CPPFLAGS) -c $< -o $@
 
 # Partial linking
 PARTLINK = @$(PROG_LD) -r
diff --git a/source4/script/cflags.pl b/source4/script/cflags.pl
deleted file mode 100755 (executable)
index 37b5aa7..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env perl
-
-# This is a hack to allow per target cflags. It isn't very elegant, but it
-# is the most portable idea we have come up with yet
-# tridge@samba.org, July 2005
-# jelmer@samba.org, March 2006
-use strict;
-
-my $target = shift;
-
-my $vars = {};
-
-sub check_flags($$);
-sub check_flags($$)
-{
-       my ($path, $name)=@_;
-       open (IN, $path);
-       foreach my $line (<IN>) {
-               if ($line =~ /^include (.*)$/) {
-                       check_flags($1, $name);
-               } elsif ($line =~ /^([A-Za-z0-9_]+) =(.*)$/) {
-                       $vars->{$1} = $2;
-               } elsif ($line =~ /^([^:]+): (.*)$/) {
-                       next unless (grep(/^$target$/, (split / /, $1)));
-                       my $data = $2;
-                       $data =~ s/^CFLAGS\+=//;
-                       foreach my $key (keys %$vars) {
-                               my $val = $vars->{$key};
-                               $data =~ s/\$\($key\)/$val/g;
-                       }
-                       # Remove undefined variables
-                       $data =~ s/\$\([A-Za-z0-9_]+\)//g;
-                       print "$data ";
-               }
-       }
-       close(IN);
-}
-
-check_flags("extra_cflags.txt", $target);
-print "\n";
-
-exit 0;