diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-03-03 00:23:09 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-03-03 00:23:09 +0100 |
commit | c7dc53b8514f83800184d2b20b1897e54843a614 (patch) | |
tree | 4f09d783271dc5e38809ed02c8252d73f8b147e5 /source4/script | |
parent | 375df425c5014dc852995038e8e5668f98af8ba3 (diff) | |
parent | 85d53f7b603f7c15b007f8c3fdde1989f07a6eb2 (diff) | |
download | samba-c7dc53b8514f83800184d2b20b1897e54843a614.tar.gz samba-c7dc53b8514f83800184d2b20b1897e54843a614.tar.bz2 samba-c7dc53b8514f83800184d2b20b1897e54843a614.zip |
Merge branch 'v4-0-test' into id10ts-registry
(This used to be commit f98b59021a5ea39c7970ebc5520d17775e500b8c)
Diffstat (limited to 'source4/script')
-rwxr-xr-x | source4/script/cflags.pl | 42 | ||||
-rwxr-xr-x | source4/script/mkproto.pl | 6 |
2 files changed, 4 insertions, 44 deletions
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; diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl index 3ed845e2bb..87a68e33fa 100755 --- a/source4/script/mkproto.pl +++ b/source4/script/mkproto.pl @@ -144,7 +144,7 @@ sub handle_loadparm($$) my %smap = ( "GLOBAL" => "struct loadparm_context *", - "LOCAL" => "struct loadparm_service *" + "LOCAL" => "struct loadparm_service *, struct loadparm_service *" ); $file->("$tmap{$type}$name($smap{$scope});\n"); @@ -157,7 +157,9 @@ sub process_file($$$) $filename =~ s/\.o$/\.c/g; - if (!open(FH, "< $builddir/$filename")) { + if ($filename =~ /^\//) { + open(FH, "<$filename") or die("Failed to open $filename"); + } elsif (!open(FH, "< $builddir/$filename")) { open(FH, "< $srcdir/$filename") || die "Failed to open $filename"; } |