From 9f9841eb7327c9fe73e84e197fd2965a97b639cf Mon Sep 17 00:00:00 2001 From: Alexey Lebedeff Date: Wed, 15 Jun 2016 10:40:36 +0300 Subject: Don't make assumptions about build tools paths One more followup to https://github.com/erlang/otp/pull/1056 and https://github.com/erlang/otp/pull/1023 This time it's about `/usr/bin/env` and `/bin/cp`: - `/usr/bin/env` in `diameterc` was used to find the bootstrapped `escript` executable. Changed it to exlpicit call to `escript` in Makefile. - `/usr/bin/env` and `/bin/cp` were referenced in documentation build/install process. Now full paths to this tools are injected using autoconf magic. --- make/emd2exml.in | 2 +- make/otp.mk.in | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 make/emd2exml.in (limited to 'make') diff --git a/make/emd2exml.in b/make/emd2exml.in old mode 100644 new mode 100755 index 903d707716..b4e052fef5 --- a/make/emd2exml.in +++ b/make/emd2exml.in @@ -1,4 +1,4 @@ -#!/usr/bin/env escript +#!@ENV@ escript %% -*- erlang -*- %%! -smp disable diff --git a/make/otp.mk.in b/make/otp.mk.in index c05c499d66..45eda71127 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -260,6 +260,7 @@ DEFAULT_GIF_FILES = $(HTMLDIR)/min_head.gif XSLTPROC = @XSLTPROC@ FOP = @FOP@ XMLLINT = @XMLLINT@ +CP = @CP@ DOCGEN=$(ERL_TOP)/lib/erl_docgen FOP_CONFIG = $(DOCGEN)/priv/fop.xconf -- cgit v1.2.3 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 --- make/make_emakefile | 66 -------------------------------------------------- make/make_emakefile.in | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 66 deletions(-) delete mode 100755 make/make_emakefile create mode 100755 make/make_emakefile.in (limited to 'make') 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