diff options
author | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
commit | 84adefa331c4159d432d22840663c38f155cd4c1 (patch) | |
tree | bff9a9c66adda4df2106dfd0e5c053ab182a12bd /make/make_emakefile | |
download | otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2 otp-84adefa331c4159d432d22840663c38f155cd4c1.zip |
The R13B03 release.OTP_R13B03
Diffstat (limited to 'make/make_emakefile')
-rwxr-xr-x | make/make_emakefile | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/make/make_emakefile b/make/make_emakefile new file mode 100755 index 0000000000..80c4acae94 --- /dev/null +++ b/make/make_emakefile @@ -0,0 +1,66 @@ +#!/usr/bin/perl +# -*- cperl -*- + +use strict; + +my $key; +my @opts; +my @modules; +my $m; +my $o; + +foreach (@ARGV) { + if (/^\-I(.+)/) { + push(@opts,"{i,\"$1\"}"); + $key=0; + } + elsif (/^\-o(.+)/) { + push(@opts,"{outdir,\"$1\"}"); + $key=0; + } + elsif (/^\-D(.+)=(.+)/) { + push(@opts,"{d,\'$1\',$2}"); + $key=0; + } + elsif (/^\-D(.+)/) { + push(@opts,"{d,\'$1\'}"); + $key=0; + } + elsif (/^\+(.+)/) { + push(@opts,$1), + $key=0; + } + elsif (/^(\-(.+))$/) { + $key = $1; + } + elsif ($key eq "\-I") { + push(@opts,"{i,\"$_\"}"); + $key=0; + } + elsif ($key eq "\-o") { + push(@opts,"{outdir,\"$_\"}"); + $key=0; + } + elsif ($key) { + print "Warning: Ignoring invalid option \"$key $_\"\n"; + $key=0; + } + else { + push(@modules,"\'$_\'"), + $key=0; + } +}; + +$m = pop(@modules); +print "{[$m"; +foreach (@modules) { + print ",$_"; +}; + +$o = pop(@opts); +print "],[$o"; +foreach (@opts) { + print ",$_"; +}; + +print "]}.\n"; |