summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-25 15:39:46 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-25 15:39:46 +0100
commit73a3e8443c7114542fc1e5c38e0be36c07c8c104 (patch)
treedaf03939b63555c68837be915c6432dc97586f4b /source4
parent247220e946d579666bf8bb4103c4fa46dfb43cbf (diff)
downloadsamba-73a3e8443c7114542fc1e5c38e0be36c07c8c104.tar.gz
samba-73a3e8443c7114542fc1e5c38e0be36c07c8c104.tar.bz2
samba-73a3e8443c7114542fc1e5c38e0be36c07c8c104.zip
Remove the now unused cflags script.
(This used to be commit c8b00610428208266d3cad69d70f01c8f4d3a85b)
Diffstat (limited to 'source4')
-rw-r--r--source4/Makefile1
-rw-r--r--source4/rules.mk16
-rwxr-xr-xsource4/script/cflags.pl42
3 files changed, 6 insertions, 53 deletions
diff --git a/source4/Makefile b/source4/Makefile
index 1fddfefce3..f9a753eb67 100644
--- a/source4/Makefile
+++ b/source4/Makefile
@@ -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
diff --git a/source4/rules.mk b/source4/rules.mk
index 9791466712..b3a786a2c9 100644
--- a/source4/rules.mk
+++ b/source4/rules.mk
@@ -1,11 +1,9 @@
# Dependencies command
DEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.o) -MT $@ \
- $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
- $(CPPFLAGS) $(FIRST_PREREQ) -o $@
+ $(CFLAGS) $(CPPFLAGS) $(FIRST_PREREQ) -o $@
# Dependencies for host objects
HDEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.ho) -MT $@ \
- $(HOSTCC_FLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
- $(CPPFLAGS) $(FIRST_PREREQ) -o $@
+ $(HOSTCC_FLAGS) $(CPPFLAGS) $(FIRST_PREREQ) -o $@
# Dependencies for precompiled headers
PCHDEPENDS = $(CC) -M -MG -MT include/includes.h.gch -MT $@ \
$(CFLAGS) $(CPPFLAGS) $(FIRST_PREREQ) -o $@
@@ -19,23 +17,19 @@ PCHDEPENDS = $(CC) -M -MG -MT include/includes.h.gch -MT $@ \
# building with $srcdir != $builddir work.
# Run a static analysis checker
-CHECK = $(CC_CHECKER) $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
- $(PICFLAG) $(CPPLAGS) -c $(FIRST_PREREQ) -o $@
+CHECK = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) $(CPPLAGS) -c $(FIRST_PREREQ) -o $@
# Run the configured compiler
COMPILE = $(CC) $(CFLAGS) $(PICFLAG) \
- `$(PERL) $(srcdir)/script/cflags.pl $@` \
$(CPPFLAGS) \
-c $(FIRST_PREREQ) -o $@
# Run the compiler for the build host
-HCOMPILE = $(HOSTCC) $(HOSTCC_FLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
- $(CPPFLAGS) -c $(FIRST_PREREQ) -o $@
+HCOMPILE = $(HOSTCC) $(HOSTCC_FLAGS) $(CPPFLAGS) -c $(FIRST_PREREQ) -o $@
# Precompile headers
PCHCOMPILE = @$(CC) -Ilib/replace \
- $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
- $(PICFLAG) $(CPPFLAGS) -c $(FIRST_PREREQ) -o $@
+ $(CFLAGS) $(PICFLAG) $(CPPFLAGS) -c $(FIRST_PREREQ) -o $@
# Partial linking
PARTLINK = @$(PROG_LD) -r
diff --git a/source4/script/cflags.pl b/source4/script/cflags.pl
deleted file mode 100755
index 37b5aa7e71..0000000000
--- a/source4/script/cflags.pl
+++ /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;