aboutsummaryrefslogtreecommitdiffstats
path: root/make/make_emakefile.in
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-08-12 11:26:48 +0200
committerLukas Larsson <[email protected]>2016-08-12 11:26:48 +0200
commitdaa0f831aee9dedf8cdf29fd5f97f98f55e072e3 (patch)
tree6365e6511bf76044129a7947887200e72e828cbc /make/make_emakefile.in
parent634998007ebd494cc64db244b748ed52bdff6a0a (diff)
parent0e00f80fb74f8f449eacf237e84a698a5555e7bd (diff)
downloadotp-daa0f831aee9dedf8cdf29fd5f97f98f55e072e3.tar.gz
otp-daa0f831aee9dedf8cdf29fd5f97f98f55e072e3.tar.bz2
otp-daa0f831aee9dedf8cdf29fd5f97f98f55e072e3.zip
Merge branch 'binarin/even-more-absolute-paths/PR-1103/OTP-13800' into maint
* binarin/even-more-absolute-paths/PR-1103/OTP-13800: Use perl discovered by configure Don't make assumptions about build tools paths
Diffstat (limited to 'make/make_emakefile.in')
-rwxr-xr-xmake/make_emakefile.in66
1 files changed, 66 insertions, 0 deletions
diff --git a/make/make_emakefile.in b/make/make_emakefile.in
new file mode 100755
index 0000000000..fbca77887a
--- /dev/null
+++ b/make/make_emakefile.in
@@ -0,0 +1,66 @@
+#!@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";