Blame erlang-corba-0002-Edit-OTP-files-to-allow-out-of-tree-build.patch

e6a0d53
From: Peter Lemenkov <lemenkov@gmail.com>
e6a0d53
Date: Wed, 30 Jan 2019 12:37:31 +0300
e6a0d53
Subject: [PATCH] Edit OTP files to allow out-of-tree build
e6a0d53
e6a0d53
e6a0d53
diff --git a/doc/Makefile b/doc/Makefile
e6a0d53
index 8f00b17..4efe6f4 100644
e6a0d53
--- a/doc/Makefile
e6a0d53
+++ b/doc/Makefile
e6a0d53
@@ -46,17 +46,17 @@ TOPDOCDIR=.
e6a0d53
 # ----------------------------------------------------
e6a0d53
 INDEX_FILE = index.html
e6a0d53
 
e6a0d53
-CSS_PATH=$(ERL_TOP)/lib/erl_docgen/priv/css
e6a0d53
+CSS_PATH=$(DOCGEN)/priv/css
e6a0d53
 
e6a0d53
 CSS_FILES= \
e6a0d53
 	$(CSS_PATH)/otp_doc.css \
e6a0d53
 	$(CSS_PATH)/highlight.css
e6a0d53
 
e6a0d53
-JS_PATH=$(ERL_TOP)/lib/erl_docgen/priv/js
e6a0d53
+JS_PATH=$(DOCGEN)/priv/js
e6a0d53
 
e6a0d53
 HIGHLIGHT_FILES= \
e6a0d53
-	$(JS_PATH)/highlight.js \
e6a0d53
-	$(JS_PATH)/highlight.pack.js
e6a0d53
+	$(ERL_TOP)/make/highlight.js \
e6a0d53
+	$(ERL_TOP)/make/highlight.pack.js
e6a0d53
 
e6a0d53
 FLIPMENU_FILES= \
e6a0d53
 	$(JS_PATH)/flipmenu/flipmenu.js \
e6a0d53
@@ -72,7 +72,7 @@ NOTES_GEN= $(NOTES_FILE:%.xml=%.html)
e6a0d53
 
e6a0d53
 RELEASE_NOTES= release_notes.html
e6a0d53
 
e6a0d53
-IMAGE_FILES=$(ERL_TOP)/lib/erl_docgen/priv/images/erlang-logo.png
e6a0d53
+IMAGE_FILES=$(DOCGEN)/priv/images/erlang-logo.png
e6a0d53
 
e6a0d53
 # ----------------------------------------------------
e6a0d53
 # FLAGS
4df5277
diff --git a/lib/ic/c_src/Makefile b/lib/ic/c_src/Makefile
4df5277
index e308088..80daee8 100644
4df5277
--- a/lib/ic/c_src/Makefile
4df5277
+++ b/lib/ic/c_src/Makefile
4df5277
@@ -25,7 +25,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp_ded.mk
4df5277
 
4df5277
 CORBA_TOP=../../..
4df5277
 
4df5277
-EI_DIR := $(ERL_TOP)/lib/erl_interface
4df5277
+EI_DIR := $(shell erl -noshell -eval 'io:format("~s", [code:lib_dir(erl_interface)]), init:stop().')
4df5277
 
4df5277
 CC = $(DED_CC)
4df5277
 
4df5277
diff --git a/lib/ic/java_src/com/ericsson/otp/ic/Makefile b/lib/ic/java_src/com/ericsson/otp/ic/Makefile
4df5277
index d3e0e1d..39ca396 100644
4df5277
--- a/lib/ic/java_src/com/ericsson/otp/ic/Makefile
4df5277
+++ b/lib/ic/java_src/com/ericsson/otp/ic/Makefile
4df5277
@@ -26,7 +26,7 @@ JAVA_DEST_ROOT = $(CORBA_TOP)/lib/ic/priv/
4df5277
 JAVA_SRC_ROOT = $(CORBA_TOP)/lib/ic/java_src/
4df5277
 JAVA_CLASS_SUBDIR = com/ericsson/otp/ic/
4df5277
 
4df5277
-JAVA_INCL_ROOT := $(ERL_TOP)/lib/jinterface/priv
4df5277
+JAVA_INCL_ROOT := $(shell erl -noshell -eval 'io:format("~s", [code:lib_dir(jinterface, priv)]), init:stop().')
4df5277
 
4df5277
 include $(ERL_TOP)/make/$(TARGET)/otp.mk
4df5277
 
e6a0d53
diff --git a/make/fop.xconf b/make/fop.xconf
e6a0d53
new file mode 100644
e6a0d53
index 0000000..ee48255
e6a0d53
--- /dev/null
e6a0d53
+++ b/make/fop.xconf
e6a0d53
@@ -0,0 +1,46 @@
e6a0d53
+
e6a0d53
+
e6a0d53
+     #
e6a0d53
+     # %CopyrightBegin%
e6a0d53
+     #
e6a0d53
+     # Copyright Ericsson AB 2009-2016. All Rights Reserved.
e6a0d53
+     #
e6a0d53
+     # Licensed under the Apache License, Version 2.0 (the "License");
e6a0d53
+     # you may not use this file except in compliance with the License.
e6a0d53
+     # You may obtain a copy of the License at
e6a0d53
+     #
e6a0d53
+     #     http://www.apache.org/licenses/LICENSE-2.0
e6a0d53
+     #
e6a0d53
+     # Unless required by applicable law or agreed to in writing, software
e6a0d53
+     # distributed under the License is distributed on an "AS IS" BASIS,
e6a0d53
+     # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e6a0d53
+     # See the License for the specific language governing permissions and
e6a0d53
+     # limitations under the License.
e6a0d53
+     #
e6a0d53
+     # %CopyrightEnd%
e6a0d53
+
e6a0d53
+     -->
e6a0d53
+
e6a0d53
+<fop version="1.0">
e6a0d53
+  
e6a0d53
+       warnings about doing the substitutions otherwise -->
e6a0d53
+  <fonts>
e6a0d53
+    <substitutions>
e6a0d53
+      <substitution>
e6a0d53
+	<from font-family="DejaVuSans" font-weight="700"/>
e6a0d53
+	<to font-family="DejaVuSans" font-weight="400"/>
e6a0d53
+      </substitution>
e6a0d53
+      <substitution>
e6a0d53
+	<from font-family="DejaVuSansMono" font-weight="700"/>
e6a0d53
+	<to font-family="DejaVuSansMono" font-weight="400"/>
e6a0d53
+      </substitution>
e6a0d53
+    </substitutions>
e6a0d53
+  </fonts>
e6a0d53
+  <renderers>
e6a0d53
+    <renderer mime="application/pdf">
e6a0d53
+      <fonts>
e6a0d53
+       <auto-detect/>
e6a0d53
+      </fonts>
e6a0d53
+    </renderer>
e6a0d53
+  </renderers>
e6a0d53
+</fop>
e6a0d53
diff --git a/make/highlight.js b/make/highlight.js
e6a0d53
new file mode 100644
e6a0d53
index 0000000..0594b42
e6a0d53
--- /dev/null
e6a0d53
+++ b/make/highlight.js
e6a0d53
@@ -0,0 +1,39 @@
e6a0d53
+/*globals document, window*/
e6a0d53
+window.addEventListener("load", function () {
e6a0d53
+    "use strict";
e6a0d53
+    var body = document.body,
e6a0d53
+        base = window.__otpTopDocDir || "/doc/js/",
e6a0d53
+        cssLink = document.createElement('link'),
e6a0d53
+        script = document.createElement('script'),
e6a0d53
+        intervalId, attempts = 0;
e6a0d53
+
e6a0d53
+    cssLink.rel = "stylesheet";
e6a0d53
+    cssLink.href = base + "../highlight.css";
e6a0d53
+    script.src = base + "highlight.pack.js";
e6a0d53
+
e6a0d53
+    body.appendChild(cssLink);
e6a0d53
+    body.appendChild(script);
e6a0d53
+
e6a0d53
+    function doHighlight() {
e6a0d53
+        attempts += 1;
e6a0d53
+
e6a0d53
+        if (attempts > 20) {
e6a0d53
+            window.clearInterval(intervalId);
e6a0d53
+            return;
e6a0d53
+        }
e6a0d53
+
e6a0d53
+        if (!window.hljs) {
e6a0d53
+            return;
e6a0d53
+        }
e6a0d53
+
e6a0d53
+        window.clearInterval(intervalId);
e6a0d53
+
e6a0d53
+        var i, len, nodes = document.querySelectorAll('.example');
e6a0d53
+        for (i = 0, len = nodes.length; i < len; i += 1) {
e6a0d53
+            window.hljs.highlightBlock(nodes[i]);
e6a0d53
+        }
e6a0d53
+
e6a0d53
+    }
e6a0d53
+
e6a0d53
+    intervalId = window.setInterval(doHighlight, 50);
e6a0d53
+});
e6a0d53
diff --git a/make/highlight.pack.js b/make/highlight.pack.js
e6a0d53
new file mode 100644
e6a0d53
index 0000000..073d39e
e6a0d53
--- /dev/null
e6a0d53
+++ b/make/highlight.pack.js
e6a0d53
@@ -0,0 +1,2 @@
e6a0d53
+/*! highlight.js v9.7.0 | BSD3 License | git.io/hljslicense */
e6a0d53
+!function(e){var n="object"==typeof window&&window||"object"==typeof self&&sel;;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/[&<>]/gm,function(e){return I[e]})}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return R(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||R(i))return i}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset<r[0].offset?e:r:"start"===r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}l+="<"+t(e)+w.map.call(e.attributes,r).join("")+">"}function u(e){l+="</"+t(e)+">"}function c(e){("start"===e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===s);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):E(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"===e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":y.classPrefix,i='',i+n+o}function p(){var e,t,r,a;if(!E.k)return n(B);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(B);r;)a+=n(B.substr(t,r.index-t)),e=g(E,r),e?(M+=e[1],a+=h(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(B);return a+n(B.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!x[E.sL])return n(B);var t=e?l(E.sL,B,!0,L[E.sL]):f(B,E.sL.length?E.sL:void 0);return E.r>0&&(M+=t.r),e&&(L[E.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){k+=null!=E.sL?d():p(),B=""}function v(e){k+=e.cN?h(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(B+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?B+=n:(t.eB&&(B+=n),b(),t.rB||t.eB||(B=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?B+=n:(a.rE||a.eE||(B+=n),b(),a.eE&&(B=n));do E.cN&&(k+=C),E.skip||(M+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"<unnamed>")+'"');return B+=n,n.length||1}var N=R(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,E=i||N,L={},k="";for(w=E;w!==N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var B="",M=0;try{for(var I,j,O=0;;){if(E.t.lastIndex=O,I=E.t.exec(t),!I)break;j=m(t.substr(O,I.index-O),I[0]),O=I.index+j}for(m(t.substr(O)),w=E;w.parent;w=w.parent)w.cN&&(k+=C);return{r:M,value:k,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function f(e,t){t=t||y.languages||E(x);var r={r:0,value:n(e)},a=r;return t.filter(R).forEach(function(n){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function g(e){return y.tabReplace||y.useBR?e.replace(M,function(e,n){return y.useBR&&"\n"===e?"
":y.tabReplace?n.replace(/\t/g,y.tabReplace):void 0}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n,t,r,o,s,p=i(e);a(p)||(y.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):n=e,s=n.textContent,r=p?l(p,s,!0):f(s),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),s)),r.value=g(r.value),e.innerHTML=r.value,e.className=h(e.className,p,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function d(e){y=o(y,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");w.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=x[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function N(){return E(x)}function R(e){return e=(e||"").toLowerCase(),x[e]||x[L[e]]}var w=[],E=Object.keys,x={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
",y={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},I={"&":"&","<":"<",">":">"};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=R,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("erlang",function(e){var r="[a-z'][a-zA-Z0-9_']*",c="("+r+":"+r+"|"+r+")",b={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},i=e.C("%","$"),n={cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},a={b:"fun\\s+"+r+"/\\d+"},d={b:c+"\\(",e:"\\)",rB:!0,r:0,c:[{b:c,r:0},{b:"\\(",e:"\\)",eW:!0,rE:!0,r:0}]},o={b:"{",e:"}",r:0},t={b:"\\b_([A-Z][A-Za-z0-9_]*)?",r:0},f={b:"[A-Z][a-zA-Z0-9_]*",r:0},l={b:"#"+e.UIR,r:0,rB:!0,c:[{b:"#"+e.UIR,r:0},{b:"{",e:"}",r:0}]},s={bK:"fun receive if try case",e:"end",k:b};s.c=[i,a,e.inherit(e.ASM,{cN:""}),s,d,e.QSM,n,o,t,f,l];var u=[i,a,s,d,e.QSM,n,o,t,f,l];d.c[1].c=u,o.c=u,l.c[1].c=u;var h={cN:"params",b:"\\(",e:"\\)",c:u};return{aliases:["erl"],k:b,i:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",c:[{cN:"function",b:"^"+r+"\\s*\\(",e:"->",rB:!0,i:"\\(|#|//|/\\*|\\\\|:|;",c:[h,e.inherit(e.TM,{b:r})],starts:{e:";|\\.",k:b,c:u}},i,{b:"^-",e:"\\.",r:0,eE:!0,rB:!0,l:"-"+e.IR,k:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",c:[h]},n,e.QSM,l,t,f,o,{b:/\.$/}]}});hljs.registerLanguage("erlang-repl",function(e){return{k:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},c:[{cN:"meta",b:"^[0-9]+> ",r:10},e.C("%","$"),{cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},e.ASM,e.QSM,{b:"\\?(::)?([A-Z]\\w*(::)?)+"},{b:"->"},{b:"ok"},{b:"!"},{b:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",r:0},{b:"[A-Z][a-zA-Z0-9_']*",r:0}]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\._]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});
e6a0d53
\ No newline at end of file
e6a0d53
diff --git a/make/target.mk b/make/target.mk
e6a0d53
index 8917e1a..c06be7d 100644
e6a0d53
--- a/make/target.mk
e6a0d53
+++ b/make/target.mk
e6a0d53
@@ -1,70 +1 @@
e6a0d53
-#
e6a0d53
-# %CopyrightBegin%
e6a0d53
-#
e6a0d53
-# Copyright Ericsson AB 1998-2011. All Rights Reserved.
e6a0d53
-#
e6a0d53
-# Licensed under the Apache License, Version 2.0 (the "License");
e6a0d53
-# you may not use this file except in compliance with the License.
e6a0d53
-# You may obtain a copy of the License at
e6a0d53
-#
e6a0d53
-#     http://www.apache.org/licenses/LICENSE-2.0
e6a0d53
-#
e6a0d53
-# Unless required by applicable law or agreed to in writing, software
e6a0d53
-# distributed under the License is distributed on an "AS IS" BASIS,
e6a0d53
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e6a0d53
-# See the License for the specific language governing permissions and
e6a0d53
-# limitations under the License.
e6a0d53
-#
e6a0d53
-# %CopyrightEnd%
e6a0d53
-
e6a0d53
-# Ensure that the make variable TARGET is set
e6a0d53
-#
e6a0d53
-
e6a0d53
-ifeq ($(OVERRIDE_TARGET),)
e6a0d53
-
e6a0d53
-ifeq ($(TARGET),)
e6a0d53
-
e6a0d53
-TARGET := $(shell $(ERL_TOP)/erts/autoconf/config.guess)
e6a0d53
-
e6a0d53
-else
e6a0d53
-
e6a0d53
-endif
e6a0d53
-
e6a0d53
-else
e6a0d53
-
e6a0d53
-ifneq ($(TARGET),)
e6a0d53
-
e6a0d53
-ifneq ($(TARGET), $(OVERRIDE_TARGET))
e6a0d53
-$(warning overriding $$(TARGET) = \
e6a0d53
-	"$(TARGET)" \
e6a0d53
-	with \
e6a0d53
-	$$(OVERRIDE_TARGET) = \
e6a0d53
-	"$(OVERRIDE_TARGET)")
e6a0d53
-else
e6a0d53
-endif
e6a0d53
-
e6a0d53
-override TARGET := $(OVERRIDE_TARGET)
e6a0d53
-
e6a0d53
-else
e6a0d53
-
e6a0d53
-TARGET := $(OVERRIDE_TARGET)
e6a0d53
-
e6a0d53
-endif
e6a0d53
-
e6a0d53
-endif
e6a0d53
-
e6a0d53
-ifneq ($(TARGET),)
e6a0d53
-ifneq ($(TARGET),win32)
e6a0d53
-ifneq ($(findstring vxworks,$(TARGET)),vxworks)
e6a0d53
-override TARGET := $(shell $(ERL_TOP)/erts/autoconf/config.sub $(TARGET))
e6a0d53
-else
e6a0d53
-endif
e6a0d53
-else
e6a0d53
-endif
e6a0d53
-else
e6a0d53
-endif
e6a0d53
-
e6a0d53
-ifeq ($(TARGET),)
e6a0d53
-$(error Neither TARGET nor OVERRIDE_TARGET can be determined!)
e6a0d53
-else
e6a0d53
-endif
e6a0d53
+TARGET := target
e6a0d53
diff --git a/make/target/otp.mk b/make/target/otp.mk
e6a0d53
index 75a820f..f5bd7a9 100644
e6a0d53
--- a/make/target/otp.mk
e6a0d53
+++ b/make/target/otp.mk
e6a0d53
@@ -34,8 +34,8 @@ include $(ERL_TOP)/make/output.mk
e6a0d53
 #       Version
e6a0d53
 # ----------------------------------------------------
e6a0d53
 
e6a0d53
-OTP_VERSION = 20.3.8.18
e6a0d53
-SYSTEM_VSN = 20
e6a0d53
+OTP_VERSION = $(shell rpm -q erlang-erts --qf "%{VERSION}")
e6a0d53
+SYSTEM_VSN = $(shell erl -noshell -s init stop -eval "io:format(\"~s\", [erlang:system_info(otp_release)]).")
e6a0d53
 
e6a0d53
 # ----------------------------------------------------
e6a0d53
 #	Cross Compiling
e6a0d53
@@ -77,9 +77,7 @@ INSTALL_DATA    = ${INSTALL} -m 644
e6a0d53
 CC = gcc
e6a0d53
 GCC = yes
e6a0d53
 HCC = $(CC)
e6a0d53
-CC32 = gcc
e6a0d53
-CFLAGS32 = -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/home/petro/work/erlang/erts/x86_64-unknown-linux-gnu   -fno-tree-copyrename  -D_GNU_SOURCE -m32
e6a0d53
-BASIC_CFLAGS = -Werror=undef -Werror=implicit -Werror=return-type  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/home/petro/work/erlang/erts/x86_64-unknown-linux-gnu   -fno-tree-copyrename  -D_GNU_SOURCE
e6a0d53
+BASIC_CFLAGS = -Werror=undef -Werror=implicit -Werror=return-type $(CFLAGS) -fno-tree-copyrename  -D_GNU_SOURCE
e6a0d53
 DEBUG_FLAGS =  -g
e6a0d53
 LD = $(CC)
e6a0d53
 RANLIB = ranlib
e6a0d53
@@ -266,8 +264,8 @@ FOP = fop
e6a0d53
 XMLLINT = xmllint
e6a0d53
 CP = /bin/cp
e6a0d53
 
e6a0d53
-DOCGEN=$(ERL_TOP)/lib/erl_docgen
e6a0d53
-FOP_CONFIG = $(DOCGEN)/priv/fop.xconf
e6a0d53
+DOCGEN=$(shell erl -noshell -s init stop -eval "io:format(\"~s\", [code:lib_dir(erl_docgen)]).")
e6a0d53
+FOP_CONFIG = $(ERL_TOP)/make/fop.xconf
e6a0d53
 
e6a0d53
 ifneq (,$(findstring $(origin SPECS_ESRC),$(DUBIOUS_ORIGINS)))
e6a0d53
 SPECS_ESRC = ../../src
e6a0d53
diff --git a/make/target/otp_ded.mk b/make/target/otp_ded.mk
e6a0d53
index abf68c8..6ca064a 100644
e6a0d53
--- a/make/target/otp_ded.mk
e6a0d53
+++ b/make/target/otp_ded.mk
e6a0d53
@@ -32,19 +32,19 @@ DED_CC = gcc
e6a0d53
 DED_GCC = yes
e6a0d53
 DED_LD = gcc
e6a0d53
 DED_LDFLAGS = -shared -Wl,-Bsymbolic
e6a0d53
-DED__NOWARN_NOTHR_CFLAGS = -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/home/petro/work/erlang/erts/x86_64-unknown-linux-gnu   -fno-tree-copyrename  -D_GNU_SOURCE -fPIC
e6a0d53
-DED__NOTHR_CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/home/petro/work/erlang/erts/x86_64-unknown-linux-gnu   -fno-tree-copyrename  -D_GNU_SOURCE -fPIC
e6a0d53
-DED__NOWARN_CFLAGS =  -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/home/petro/work/erlang/erts/x86_64-unknown-linux-gnu   -fno-tree-copyrename  -D_GNU_SOURCE -fPIC
e6a0d53
+DED__NOWARN_NOTHR_CFLAGS = $(CFLAGS) -fno-tree-copyrename  -D_GNU_SOURCE -fPIC
e6a0d53
+DED__NOTHR_CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement $(CFLAGS) -fno-tree-copyrename  -D_GNU_SOURCE -fPIC
e6a0d53
+DED__NOWARN_CFLAGS =  -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS $(CFLAGS) -fno-tree-copyrename  -D_GNU_SOURCE -fPIC
e6a0d53
 DED_THR_DEFS = -DUSE_THREADS  -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_GNU_SOURCE
e6a0d53
 DED_EMU_THR_DEFS =  -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS
e6a0d53
 DED_WARN_FLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement
e6a0d53
-DED_CFLAGS = -Werror=undef -Werror=implicit -Werror=return-type  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement  -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/home/petro/work/erlang/erts/x86_64-unknown-linux-gnu   -fno-tree-copyrename  -D_GNU_SOURCE -fPIC
e6a0d53
-DED_STATIC_CFLAGS = -Werror=undef -Werror=implicit -Werror=return-type  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement  -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/home/petro/work/erlang/erts/x86_64-unknown-linux-gnu   -fno-tree-copyrename  -D_GNU_SOURCE -DSTATIC_ERLANG_NIF -DSTATIC_ERLANG_DRIVER
e6a0d53
-DED_LIBS = -lutil -ldl -lm   
e6a0d53
+DED_CFLAGS = -Werror=undef -Werror=implicit -Werror=return-type  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement  -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS $(CFLAGS) -fno-tree-copyrename  -D_GNU_SOURCE -fPIC
e6a0d53
+DED_STATIC_CFLAGS = -Werror=undef -Werror=implicit -Werror=return-type  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement  -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS $(CFLAGS) -fno-tree-copyrename  -D_GNU_SOURCE -DSTATIC_ERLANG_NIF -DSTATIC_ERLANG_DRIVER
e6a0d53
+DED_LIBS = -lutil -ldl -lm
e6a0d53
 DED_EXT = so
e6a0d53
 ERLANG_OSTYPE = unix
e6a0d53
 PRIVDIR = ../priv
e6a0d53
 OBJDIR = $(PRIVDIR)/obj/$(TARGET)
e6a0d53
 LIBDIR = $(PRIVDIR)/lib/$(TARGET)
e6a0d53
-DED_SYS_INCLUDE = -I/home/petro/work/erlang/erts/emulator/beam -I/home/petro/work/erlang/erts/include -I/home/petro/work/erlang/erts/include/x86_64-unknown-linux-gnu -I/home/petro/work/erlang/erts/include/internal -I/home/petro/work/erlang/erts/include/internal/x86_64-unknown-linux-gnu -I/home/petro/work/erlang/erts/emulator/sys/unix -I/home/petro/work/erlang/erts/emulator/sys/common
e6a0d53
+DED_SYS_INCLUDE =
e6a0d53
 DED_INCLUDES = $(DED_SYS_INCLUDE)