From 0e00f80fb74f8f449eacf237e84a698a5555e7bd Mon Sep 17 00:00:00 2001 From: Alexey Lebedeff Date: Tue, 21 Jun 2016 18:01:54 +0300 Subject: Use perl discovered by configure --- erts/configure.in | 14 ++++++++--- make/make_emakefile | 66 -------------------------------------------------- make/make_emakefile.in | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 70 deletions(-) delete mode 100755 make/make_emakefile create mode 100755 make/make_emakefile.in diff --git a/erts/configure.in b/erts/configure.in index 7986a55911..6ffd20f210 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -4821,8 +4821,7 @@ dnl Output the result. dnl ---------------------------------------------------------------------- dnl Note that the output files are relative to $srcdir - -AC_OUTPUT( +AC_CONFIG_FILES([ emulator/$host/Makefile:emulator/Makefile.in epmd/src/$host/Makefile:epmd/src/Makefile.in etc/common/$host/Makefile:etc/common/Makefile.in @@ -4832,15 +4831,22 @@ AC_OUTPUT( Makefile:Makefile.in ../make/$host/otp.mk:../make/otp.mk.in ../make/$host/otp_ded.mk:../make/otp_ded.mk.in +]) + +AC_CONFIG_FILES([../make/make_emakefile:../make/make_emakefile.in], + [chmod +x ../make/make_emakefile]) + dnl dnl The ones below should be moved to their respective lib dnl +dnl ../lib/ssl/c_src/$host/Makefile:../lib/ssl/c_src/Makefile.in +AC_CONFIG_FILES([ ../lib/ic/c_src/$host/Makefile:../lib/ic/c_src/Makefile.in ../lib/os_mon/c_src/$host/Makefile:../lib/os_mon/c_src/Makefile.in -dnl ../lib/ssl/c_src/$host/Makefile:../lib/ssl/c_src/Makefile.in ../lib/crypto/c_src/$host/Makefile:../lib/crypto/c_src/Makefile.in ../lib/orber/c_src/$host/Makefile:../lib/orber/c_src/Makefile.in ../lib/runtime_tools/c_src/$host/Makefile:../lib/runtime_tools/c_src/Makefile.in ../lib/tools/c_src/$host/Makefile:../lib/tools/c_src/Makefile.in - ) + ]) +AC_OUTPUT diff --git a/make/make_emakefile b/make/make_emakefile deleted file mode 100755 index 56440d9bf0..0000000000 --- a/make/make_emakefile +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env 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"; 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"; -- cgit v1.2.3