@profoundlogic/codermake 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/bin/index.js +1 -1
- package/dist/bin/preprocess-rpg-copy.js +2 -0
- package/dist/bin/rdf-to-dds.js +1 -1
- package/dist/lib/discovery.js +1 -1
- package/dist/lib/executor.js +1 -1
- package/dist/lib/generate-rdf-dds.js +1 -1
- package/dist/lib/license.js +1 -1
- package/dist/lib/makefile-generator.js +1 -1
- package/dist/lib/platform.js +1 -1
- package/dist/lib/preprocessor.js +1 -1
- package/dist/lib/rdf-to-post-data.js +1 -1
- package/dist/lib/rpg-copy-preprocessor.js +1 -0
- package/dist/lib/ssh.js +1 -1
- package/dist/lib/writer.js +1 -1
- package/dist/makefiles/base.mk +17 -0
- package/dist/makefiles/ibmi.mk +15 -6
- package/dist/makefiles/unix.mk +31 -8
- package/package.json +1 -1
package/dist/lib/ssh.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x554af6,_0x681f0e){const _0x41c7d2=_0x59f4,_0x203a3d=_0x554af6();while(!![]){try{const _0x11436e=parseInt(_0x41c7d2(0x14d))/0x1*(parseInt(_0x41c7d2(0x167))/0x2)+-parseInt(_0x41c7d2(0x158))/0x3*(parseInt(_0x41c7d2(0x155))/0x4)+-parseInt(_0x41c7d2(0x14e))/0x5*(parseInt(_0x41c7d2(0x15b))/0x6)+parseInt(_0x41c7d2(0x168))/0x7*(parseInt(_0x41c7d2(0x15f))/0x8)+parseInt(_0x41c7d2(0x149))/0x9*(-parseInt(_0x41c7d2(0x161))/0xa)+parseInt(_0x41c7d2(0x16c))/0xb+parseInt(_0x41c7d2(0x16e))/0xc;if(_0x11436e===_0x681f0e)break;else _0x203a3d['push'](_0x203a3d['shift']());}catch(_0x4cfa05){_0x203a3d['push'](_0x203a3d['shift']());}}}(_0x18f7,0x9210f));import{spawn}from'child_process';import{readdirSync}from'fs';function _0x59f4(_0x3b3007,_0x34847f){_0x3b3007=_0x3b3007-0x147;const _0x18f7fd=_0x18f7();let _0x59f451=_0x18f7fd[_0x3b3007];if(_0x59f4['IMCQSJ']===undefined){var _0x141923=function(_0x33db49){const _0x4bb99d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x29dee3='',_0x396d73='';for(let _0x49329e=0x0,_0x385c69,_0x2560f6,_0xf06680=0x0;_0x2560f6=_0x33db49['charAt'](_0xf06680++);~_0x2560f6&&(_0x385c69=_0x49329e%0x4?_0x385c69*0x40+_0x2560f6:_0x2560f6,_0x49329e++%0x4)?_0x29dee3+=String['fromCharCode'](0xff&_0x385c69>>(-0x2*_0x49329e&0x6)):0x0){_0x2560f6=_0x4bb99d['indexOf'](_0x2560f6);}for(let _0x1448b2=0x0,_0x20959b=_0x29dee3['length'];_0x1448b2<_0x20959b;_0x1448b2++){_0x396d73+='%'+('00'+_0x29dee3['charCodeAt'](_0x1448b2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x396d73);};_0x59f4['RSGhFB']=_0x141923,_0x59f4['GODxYG']={},_0x59f4['IMCQSJ']=!![];}const _0x433eaa=_0x18f7fd[0x0],_0x185318=_0x3b3007+_0x433eaa,_0x148afa=_0x59f4['GODxYG'][_0x185318];return!_0x148afa?(_0x59f451=_0x59f4['RSGhFB'](_0x59f451),_0x59f4['GODxYG'][_0x185318]=_0x59f451):_0x59f451=_0x148afa,_0x59f451;}async function waitForSSHSocket(_0x29ea0e,_0x486928,_0x1968e5=0x3a98){const _0x1f4e7e={'qdJDE':function(_0x225001,_0x53718e){return _0x225001(_0x53718e);},'LCqTP':function(_0x4126b2){return _0x4126b2();}};return new Promise((_0x1fac7d,_0x40821f)=>{const _0x1b1d5e=_0x59f4;let _0xb5cd87=![],_0xe2e3b6=null;_0x486928['on'](_0x1b1d5e(0x150),_0x136c9d=>{const _0x28ca96=_0x1b1d5e;_0xe2e3b6=_0x136c9d,!_0xb5cd87&&_0x136c9d!==0x0&&(_0xb5cd87=!![],_0x40821f(new Error(_0x28ca96(0x157)+_0x136c9d)));});const _0x1c5eb7=Date[_0x1b1d5e(0x15d)](),_0x41dc68=()=>{const _0x1a5699=_0x1b1d5e;if(_0xb5cd87)return;const _0xb418fe=_0x1f4e7e['qdJDE'](readdirSync,_0x29ea0e);if(_0xb418fe[_0x1a5699(0x156)](_0x1f5660=>_0x1f5660[_0x1a5699(0x16a)](_0x1a5699(0x14f)))){_0xb5cd87=!![],_0x1f4e7e['LCqTP'](_0x1fac7d);return;}if(Date[_0x1a5699(0x15d)]()-_0x1c5eb7>=_0x1968e5){_0xb5cd87=!![];const _0x739d54=_0xe2e3b6!==null?_0x1a5699(0x15c)+_0xe2e3b6+')':'';_0x40821f(new Error(_0x1a5699(0x15e)+_0x1968e5+'ms'+_0x739d54));return;}setTimeout(_0x41dc68,0x64);};_0x1f4e7e[_0x1b1d5e(0x14a)](_0x41dc68);});}function _0x18f7(){const _0x557e8f=['C3rKAw8','C3nO','mtuZuNnhBuHM','tenXvfa','u3rYAwn0sg9ZDeTLEunOzwnRAw5Npw5V','u2vYDMvYqwXPDMvdB3vUDe1HEd0Z','mJzdwefeu2G','oda0odv1wuLPtue','C3nOlq','zxHPDa','q29UDhjVBfbHDgG9','u2vYDMvYqwXPDMvjBNrLCNzHBd02ma','s3jdu3K','q29UDhjVBe1HC3rLCJ15zxm','ndGZodHpuM9KuuO','C29Tzq','u1niig1HC3rLCIbLEgL0zwqGD2L0AcbJB2rLia','nK9wAMLIza','rKrJCLi','Bg9N','mZbYugT0Cxa','icHWCM9JzxnZigv4AxrLzcb3AxrOignVzguG','BM93','u1niig1HC3rLCIbKAwqGBM90ihn0yxj0ihDPDgHPBIa','oer3DfP3tW','ifntscbTyxn0zxiGywXYzwfKEsbLEgLZDhmSihjLDxnPBMC','ntyWmZyWAMH2tKr0','ifntscbTyxn0zxiGzxn0ywjSAxnOzwq','ugfZC3DVCMrbDxrOzw50AwnHDgLVBJ1UBW','AwDUB3jL','ChvZAa','ifbYzs1LC3rHyMXPC2HPBMCGu1niig1HC3rLCIbJB25Uzwn0Aw9UlI4U','mtyZndjsvvjHCeq','mti0nta0murLqwf1qq','w3nZAf0','C3rHCNrZv2L0Aa','l3nZAc0LqW','mZm3otiZm2vws0vrsa','q29UDhjVBfbLCNnPC3q9mtbT','mte0oty3otjUBLjjvLO'];_0x18f7=function(){return _0x557e8f;};return _0x18f7();}export async function establishSSHMaster(_0x4456d7,_0x114d3a={}){const _0xead10c=_0x59f4,_0x4ef443={'KrCSy':_0xead10c(0x163),'FAVpn':_0xead10c(0x152),'UKBnd':_0xead10c(0x14c),'FDcrR':function(_0x2a3013,_0x4be544,_0x294e39,_0x4c185b){return _0x2a3013(_0x4be544,_0x294e39,_0x4c185b);}},{host:_0x765cf3,user:_0x571f57,sshKey:_0x21064a,debug:debug=![],debugPrefix:debugPrefix=_0xead10c(0x169)}=_0x114d3a;if(!_0x765cf3||!_0x571f57)return;const _0x29d895=readdirSync(_0x4456d7);if(_0x29d895[_0xead10c(0x156)](_0x4d7f05=>_0x4d7f05[_0xead10c(0x16a)](_0xead10c(0x14f)))){if(debug)console[_0xead10c(0x15a)](debugPrefix+_0xead10c(0x160));return;}if(debug)console[_0xead10c(0x15a)](debugPrefix+_0xead10c(0x166));const _0x206a6a=['-o',_0xead10c(0x154),'-o',_0xead10c(0x151)+_0x4456d7+_0xead10c(0x16b),'-o',_0xead10c(0x16d),'-o',_0xead10c(0x14b),'-o',_0x4ef443[_0xead10c(0x153)],'-o',_0x4ef443['FAVpn'],'-o',_0x4ef443['UKBnd'],'-N','-f'];_0x21064a&&_0x206a6a[_0xead10c(0x165)]('-i',_0x21064a);_0x206a6a[_0xead10c(0x165)](_0x571f57+'@'+_0x765cf3);const _0x83260={};_0x83260['detached']=!![],_0x83260[_0xead10c(0x147)]=_0xead10c(0x164);const _0x5de70a=_0x4ef443[_0xead10c(0x159)](spawn,_0xead10c(0x148),_0x206a6a,_0x83260);_0x5de70a['unref'](),await _0x4ef443['FDcrR'](waitForSSHSocket,_0x4456d7,_0x5de70a,0x3a98);if(debug)console[_0xead10c(0x15a)](debugPrefix+_0xead10c(0x162));}
|
package/dist/lib/writer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4e1e58,_0x3063d7){const _0x3103a9=_0x6dca,_0x520d8b=_0x4e1e58();while(!![]){try{const _0x19a18c=-parseInt(_0x3103a9(0x1a9))/0x1+parseInt(_0x3103a9(0x1aa))/0x2*(parseInt(_0x3103a9(0x19d))/0x3)+parseInt(_0x3103a9(0x197))/0x4+parseInt(_0x3103a9(0x19f))/0x5*(parseInt(_0x3103a9(0x1ad))/0x6)+-parseInt(_0x3103a9(0x198))/0x7+-parseInt(_0x3103a9(0x1a4))/0x8+-parseInt(_0x3103a9(0x1a3))/0x9*(parseInt(_0x3103a9(0x1a6))/0xa);if(_0x19a18c===_0x3063d7)break;else _0x520d8b['push'](_0x520d8b['shift']());}catch(_0x2f9494){_0x520d8b['push'](_0x520d8b['shift']());}}}(_0x410b,0x206c0));function _0x6dca(_0x103294,_0x366078){_0x103294=_0x103294-0x195;const _0x410b50=_0x410b();let _0x6dca92=_0x410b50[_0x103294];if(_0x6dca['BkJHss']===undefined){var _0x2c8a83=function(_0x2d4e0e){const _0x286611='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1627b6='',_0x3a2643='';for(let _0x51ce71=0x0,_0x4d222c,_0x418981,_0x19567a=0x0;_0x418981=_0x2d4e0e['charAt'](_0x19567a++);~_0x418981&&(_0x4d222c=_0x51ce71%0x4?_0x4d222c*0x40+_0x418981:_0x418981,_0x51ce71++%0x4)?_0x1627b6+=String['fromCharCode'](0xff&_0x4d222c>>(-0x2*_0x51ce71&0x6)):0x0){_0x418981=_0x286611['indexOf'](_0x418981);}for(let _0x358389=0x0,_0x31d0fc=_0x1627b6['length'];_0x358389<_0x31d0fc;_0x358389++){_0x3a2643+='%'+('00'+_0x1627b6['charCodeAt'](_0x358389)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3a2643);};_0x6dca['JUgdYn']=_0x2c8a83,_0x6dca['grZGtk']={},_0x6dca['BkJHss']=!![];}const _0x4220b8=_0x410b50[0x0],_0x4e8bdf=_0x103294+_0x4220b8,_0x27b8d3=_0x6dca['grZGtk'][_0x4e8bdf];return!_0x27b8d3?(_0x6dca92=_0x6dca['JUgdYn'](_0x6dca92),_0x6dca['grZGtk'][_0x4e8bdf]=_0x6dca92):_0x6dca92=_0x27b8d3,_0x6dca92;}import{writeFileSync,mkdirSync,existsSync}from'fs';import{join}from'path';import{randomUUID}from'crypto';import{tmpdir}from'os';function ensureDir(_0x50d15c){const _0x4fd45f=_0x6dca,_0x433dc5={'BKwSN':function(_0x19f9b6,_0x4e9680){return _0x19f9b6(_0x4e9680);}};if(!_0x433dc5['BKwSN'](existsSync,_0x50d15c)){const _0x5799ef={};_0x5799ef[_0x4fd45f(0x1ab)]=!![],mkdirSync(_0x50d15c,_0x5799ef);}}export function writeRules(_0x2ef399,_0x27abc4,_0x61fd30={},_0x432852=null){const _0x5c5a69=_0x6dca,_0x1b7f94={'kjAsx':function(_0x212b86){return _0x212b86();},'jcnnW':function(_0x500a43,_0x4a7bda){return _0x500a43(_0x4a7bda);},'FWTzG':_0x5c5a69(0x1ae),'AiEiA':_0x5c5a69(0x1a2),'bOxxe':function(_0xf55d08,_0x507fe9){return _0xf55d08+_0x507fe9;},'oozpx':'utf8','MlsyQ':function(_0x487e29,_0x48e3c4,_0x44fe68,_0x56ce17){return _0x487e29(_0x48e3c4,_0x44fe68,_0x56ce17);},'CIfRf':function(_0x51f5c7,_0x897aa0,_0x58bba1,_0x2e0ce0){return _0x51f5c7(_0x897aa0,_0x58bba1,_0x2e0ce0);}};if(!_0x432852){const _0x32d01=_0x1b7f94['kjAsx'](randomUUID)[_0x5c5a69(0x199)](/-/g,'');_0x432852=join(tmpdir(),'cm-'+_0x32d01);}_0x1b7f94[_0x5c5a69(0x19b)](ensureDir,_0x432852);const _0xe3ee=join(_0x432852,_0x5c5a69(0x1a0)),_0x9d25ea=join(_0x432852,_0x1b7f94['FWTzG']),_0x177ec3=join(_0x432852,_0x1b7f94[_0x5c5a69(0x19c)]),_0x24d8f9=_0x1b7f94['bOxxe'](_0x2ef399[_0x5c5a69(0x1a1)]('\x0a'),'\x0a');writeFileSync(_0xe3ee,_0x24d8f9,_0x1b7f94[_0x5c5a69(0x1a5)]);const _0x23b67b=_0x5c5a69(0x195)+_0x27abc4[_0x5c5a69(0x1a1)]('\x20')+'\x0a';_0x1b7f94[_0x5c5a69(0x19e)](writeFileSync,_0x9d25ea,_0x23b67b,_0x1b7f94[_0x5c5a69(0x1a5)]);const _0x12186b=JSON[_0x5c5a69(0x19a)](_0x61fd30,null,0x2);_0x1b7f94[_0x5c5a69(0x1a8)](writeFileSync,_0x177ec3,_0x12186b,_0x5c5a69(0x1a7));const _0x4dc4ca={};return _0x4dc4ca['rulesFile']=_0xe3ee,_0x4dc4ca[_0x5c5a69(0x1ac)]=_0x9d25ea,_0x4dc4ca[_0x5c5a69(0x196)]=_0x177ec3,_0x4dc4ca['tmpDir']=_0x432852,_0x4dc4ca;}function _0x410b(){const _0x1e9127=['nJuWmtiWvLDiBgrL','ode5mda3zeHlugDM','CMvWBgfJzq','C3rYAw5NAwz5','AMnUBLC','qwLfAue','ou5Yyvj4EG','twXZEve','mZe5mdm1yKTrt3bT','CNvSzxmUBwS','AM9PBG','DgfYz2v0lw1HChbPBMCUANnVBG','owj6zufWrG','ote1ota0rvjts1nK','B296ChG','mtiXnZbIuvvJCvq','DxrMoa','q0LMuMy','mtu3ndy4yMDOt1HQ','mteYnJGYELHhtxLR','CMvJDxjZAxzL','DgfYz2v0C0zPBgu','mtHABNvNA2G','DgfYz2v0CY5TAW','vefsr0vuuYa6psa','BwfWCgLUz0zPBgu'];_0x410b=function(){return _0x1e9127;};return _0x410b();}
|
package/dist/makefiles/base.mk
CHANGED
|
@@ -22,3 +22,20 @@ if liblist | grep -Eiq '^$(LIBRARY)[[:space:]]+'; then
|
|
|
22
22
|
fi
|
|
23
23
|
liblist -af $(LIBRARY)
|
|
24
24
|
endef
|
|
25
|
+
|
|
26
|
+
######
|
|
27
|
+
# RPG /COPY preprocessor - converts source member style directives to IFS paths
|
|
28
|
+
# $(1) = space-separated list of source files involved in the recipe
|
|
29
|
+
# Sets shell variable RPG_SRC_ROOT to the effective source root:
|
|
30
|
+
# '.' if no preprocessing needed, or a generated temp dir path if any file was preprocessed
|
|
31
|
+
######
|
|
32
|
+
define RPG_PREPROCESS_SOURCES
|
|
33
|
+
RPG_SRC_ROOT=$$('$(CODERMAKE_NODE)' '$(CODERMAKE_PACKAGE_DIR)/bin/preprocess-rpg-copy.js' $(1) --temp-prefix tmp/rpg-pp)
|
|
34
|
+
endef
|
|
35
|
+
|
|
36
|
+
######
|
|
37
|
+
# Cleanup RPG preprocessor temp dir (only if preprocessing created one)
|
|
38
|
+
######
|
|
39
|
+
define RPG_CLEANUP_SOURCES
|
|
40
|
+
if [ "$$RPG_SRC_ROOT" != "." ]; then rm -rf "$$RPG_SRC_ROOT"; fi
|
|
41
|
+
endef
|
package/dist/makefiles/ibmi.mk
CHANGED
|
@@ -84,29 +84,37 @@ $(LIBRARY_PATH):
|
|
|
84
84
|
# Build RPGLE program (bound)
|
|
85
85
|
define BUILD_RPGLE_PGM
|
|
86
86
|
$(call SETUP_LOG,$(notdir $@))
|
|
87
|
+
$(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(LIBRARY_PATH)/%,$^))
|
|
87
88
|
$(SET_LIBL)
|
|
88
|
-
system "crtbndrpg pgm($(LIBRARY)/$(basename $(@F))) srcstmf('
|
|
89
|
+
system "crtbndrpg pgm($(LIBRARY)/$(basename $(@F))) srcstmf('$$RPG_SRC_ROOT/$<') incdir('$$RPG_SRC_ROOT') tgtccsid(*job) output(*print) dbgview(*all)"
|
|
90
|
+
$(call RPG_CLEANUP_SOURCES)
|
|
89
91
|
endef
|
|
90
92
|
|
|
91
93
|
# Build SQL RPGLE program
|
|
92
94
|
define BUILD_SQLRPGLE_PGM
|
|
93
95
|
$(call SETUP_LOG,$(notdir $@))
|
|
96
|
+
$(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(LIBRARY_PATH)/%,$^))
|
|
94
97
|
$(SET_LIBL)
|
|
95
|
-
system "crtsqlrpgi obj($(LIBRARY)/$(basename $(@F))) objtype(*pgm) srcstmf('
|
|
98
|
+
system "crtsqlrpgi obj($(LIBRARY)/$(basename $(@F))) objtype(*pgm) srcstmf('$$RPG_SRC_ROOT/$<') cvtccsid(*job) output(*print) rpgppopt(*lvl1) compileopt('incdir(''$$RPG_SRC_ROOT'') tgtccsid(*job) output(*print)') dbgview(*source)"
|
|
99
|
+
$(call RPG_CLEANUP_SOURCES)
|
|
96
100
|
endef
|
|
97
101
|
|
|
98
102
|
# Build RPGLE module
|
|
99
103
|
define BUILD_RPGLE_MODULE
|
|
100
104
|
$(call SETUP_LOG,$(notdir $@))
|
|
105
|
+
$(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(LIBRARY_PATH)/%,$^))
|
|
101
106
|
$(SET_LIBL)
|
|
102
|
-
system "crtrpgmod module($(LIBRARY)/$(basename $(@F))) srcstmf('
|
|
107
|
+
system "crtrpgmod module($(LIBRARY)/$(basename $(@F))) srcstmf('$$RPG_SRC_ROOT/$<') incdir('$$RPG_SRC_ROOT') tgtccsid(*job) output(*print) dbgview(*all)"
|
|
108
|
+
$(call RPG_CLEANUP_SOURCES)
|
|
103
109
|
endef
|
|
104
110
|
|
|
105
111
|
# Build SQL RPGLE module
|
|
106
112
|
define BUILD_SQLRPGLE_MODULE
|
|
107
113
|
$(call SETUP_LOG,$(notdir $@))
|
|
114
|
+
$(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(LIBRARY_PATH)/%,$^))
|
|
108
115
|
$(SET_LIBL)
|
|
109
|
-
system "crtsqlrpgi obj($(LIBRARY)/$(basename $(@F))) objtype(*module) srcstmf('
|
|
116
|
+
system "crtsqlrpgi obj($(LIBRARY)/$(basename $(@F))) objtype(*module) srcstmf('$$RPG_SRC_ROOT/$<') cvtccsid(*job) output(*print) rpgppopt(*lvl1) compileopt('incdir(''$$RPG_SRC_ROOT'') tgtccsid(*job) output(*print)') dbgview(*source)"
|
|
117
|
+
$(call RPG_CLEANUP_SOURCES)
|
|
110
118
|
endef
|
|
111
119
|
|
|
112
120
|
# Build ILE CL program (bound)
|
|
@@ -156,7 +164,7 @@ endef
|
|
|
156
164
|
# Build display file from RDF (Rich Display File) JSON
|
|
157
165
|
define BUILD_RDF_TO_FILE
|
|
158
166
|
$(call SETUP_LOG,$(notdir $@))
|
|
159
|
-
|
|
167
|
+
'$(CODERMAKE_NODE)' '$(CODERMAKE_PACKAGE_DIR)/bin/rdf-to-dds.js' '$<' 'tmp/$(basename $(@F)).dspf'
|
|
160
168
|
$(call CREATE_SOURCE_MEMBER,tmp/$(basename $(@F)).dspf,qddssrc)
|
|
161
169
|
$(SET_LIBL)
|
|
162
170
|
system "crtdspf file($(LIBRARY)/$(basename $(@F))) srcfile($(LIBRARY)/qddssrc) enhdsp(*yes)"
|
|
@@ -232,7 +240,8 @@ endef
|
|
|
232
240
|
######
|
|
233
241
|
.PHONY: platform-clean
|
|
234
242
|
platform-clean:
|
|
235
|
-
@
|
|
243
|
+
@rm -rf tmp/rpg-pp-*
|
|
244
|
+
if [ -n "$(TARGETS)" ] && [ -d $(LIBRARY_PATH) ]; then
|
|
236
245
|
for pass in 1 2; do
|
|
237
246
|
for target in $(TARGETS); do
|
|
238
247
|
if [ "$${target%.file}" != "$$target" ]; then
|
package/dist/makefiles/unix.mk
CHANGED
|
@@ -110,9 +110,14 @@ endef
|
|
|
110
110
|
#
|
|
111
111
|
# Build command runs with current directory set to the remote temp directory.
|
|
112
112
|
######
|
|
113
|
-
|
|
113
|
+
######
|
|
114
|
+
# $(1) = source root directory to tar from (use '.' for current directory)
|
|
115
|
+
# $(2) = space-separated list of files (relative to source root)
|
|
116
|
+
# $(3) = build command to execute
|
|
117
|
+
######
|
|
118
|
+
define REMOTE_BUILD_FROM
|
|
114
119
|
TAR_FILE=tmp/codermake_$$(uuidgen).tar
|
|
115
|
-
tar -cf "$$TAR_FILE" $(
|
|
120
|
+
tar -C "$(1)" -cf "$$TAR_FILE" $(2)
|
|
116
121
|
REMOTE_DIR=/tmp/codermake_$$(uuidgen)
|
|
117
122
|
$(SSH) "$(QSHELL) -c 'mkdir $$REMOTE_DIR'"
|
|
118
123
|
EXIT_CODE=0
|
|
@@ -123,7 +128,7 @@ EXIT_CODE=0
|
|
|
123
128
|
tar -xf sources.tar
|
|
124
129
|
cd $$REMOTE_DIR
|
|
125
130
|
$(SET_LIBL)
|
|
126
|
-
$(
|
|
131
|
+
$(3)
|
|
127
132
|
EOF
|
|
128
133
|
) || EXIT_CODE=$$?
|
|
129
134
|
rm -f "$$TAR_FILE"
|
|
@@ -133,6 +138,15 @@ if [ $$EXIT_CODE -ne 0 ]; then
|
|
|
133
138
|
fi
|
|
134
139
|
endef
|
|
135
140
|
|
|
141
|
+
######
|
|
142
|
+
# Original REMOTE_BUILD is now a convenience wrapper (source root = '.')
|
|
143
|
+
# $(1) = space-separated list of local files to upload
|
|
144
|
+
# $(2) = build command to execute
|
|
145
|
+
######
|
|
146
|
+
define REMOTE_BUILD
|
|
147
|
+
$(call REMOTE_BUILD_FROM,.,$(1),$(2))
|
|
148
|
+
endef
|
|
149
|
+
|
|
136
150
|
######
|
|
137
151
|
# Prerun actions.
|
|
138
152
|
######
|
|
@@ -158,28 +172,36 @@ build/$(LIBRARY).lib:
|
|
|
158
172
|
# Build RPGLE program (bound)
|
|
159
173
|
define BUILD_RPGLE_PGM
|
|
160
174
|
$(call SETUP_LOG,$(notdir $@))
|
|
161
|
-
$(call
|
|
175
|
+
$(call RPG_PREPROCESS_SOURCES,$(filter-out build/%,$^))
|
|
176
|
+
$(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtbndrpg pgm($(LIBRARY)/$(basename $(@F))) srcstmf('$<') incdir('.') tgtccsid(*job) output(*print) dbgview(*all)")
|
|
177
|
+
$(call RPG_CLEANUP_SOURCES)
|
|
162
178
|
touch '$@'
|
|
163
179
|
endef
|
|
164
180
|
|
|
165
181
|
# Build SQL RPGLE program
|
|
166
182
|
define BUILD_SQLRPGLE_PGM
|
|
167
183
|
$(call SETUP_LOG,$(notdir $@))
|
|
168
|
-
$(call
|
|
184
|
+
$(call RPG_PREPROCESS_SOURCES,$(filter-out build/%,$^))
|
|
185
|
+
$(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtsqlrpgi obj($(LIBRARY)/$(basename $(@F))) objtype(*pgm) srcstmf('$<') cvtccsid(*job) output(*print) rpgppopt(*lvl1) compileopt('incdir(''.'') tgtccsid(*job) output(*print)') dbgview(*source)")
|
|
186
|
+
$(call RPG_CLEANUP_SOURCES)
|
|
169
187
|
touch '$@'
|
|
170
188
|
endef
|
|
171
189
|
|
|
172
190
|
# Build RPGLE module
|
|
173
191
|
define BUILD_RPGLE_MODULE
|
|
174
192
|
$(call SETUP_LOG,$(notdir $@))
|
|
175
|
-
$(call
|
|
193
|
+
$(call RPG_PREPROCESS_SOURCES,$(filter-out build/%,$^))
|
|
194
|
+
$(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtrpgmod module($(LIBRARY)/$(basename $(@F))) srcstmf('$<') incdir('.') tgtccsid(*job) output(*print) dbgview(*all)")
|
|
195
|
+
$(call RPG_CLEANUP_SOURCES)
|
|
176
196
|
touch '$@'
|
|
177
197
|
endef
|
|
178
198
|
|
|
179
199
|
# Build SQL RPGLE module
|
|
180
200
|
define BUILD_SQLRPGLE_MODULE
|
|
181
201
|
$(call SETUP_LOG,$(notdir $@))
|
|
182
|
-
$(call
|
|
202
|
+
$(call RPG_PREPROCESS_SOURCES,$(filter-out build/%,$^))
|
|
203
|
+
$(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtsqlrpgi obj($(LIBRARY)/$(basename $(@F))) objtype(*module) srcstmf('$<') cvtccsid(*job) output(*print) rpgppopt(*lvl1) compileopt('incdir(''.'') tgtccsid(*job) output(*print)') dbgview(*source)")
|
|
204
|
+
$(call RPG_CLEANUP_SOURCES)
|
|
183
205
|
touch '$@'
|
|
184
206
|
endef
|
|
185
207
|
|
|
@@ -239,7 +261,7 @@ endef
|
|
|
239
261
|
# Build display file from RDF (Rich Display File) JSON
|
|
240
262
|
define BUILD_RDF_TO_FILE
|
|
241
263
|
$(call SETUP_LOG,$(notdir $@))
|
|
242
|
-
|
|
264
|
+
'$(CODERMAKE_NODE)' '$(CODERMAKE_PACKAGE_DIR)/bin/rdf-to-dds.js' '$<' 'tmp/$(basename $(@F)).dspf'
|
|
243
265
|
$(call CREATE_SOURCE_MEMBER,tmp/$(basename $(@F)).dspf,qddssrc)
|
|
244
266
|
$(SSH) $(QSHELL) <<'EOF'
|
|
245
267
|
$(SET_LIBL)
|
|
@@ -335,6 +357,7 @@ platform-clean:
|
|
|
335
357
|
@rm -rf build/*
|
|
336
358
|
rm -rf tmp/logs
|
|
337
359
|
rm -rf tmp/codermake_*.tar
|
|
360
|
+
rm -rf tmp/rpg-pp-*
|
|
338
361
|
@CLEAN_TARGETS="$(notdir $(TARGETS))"
|
|
339
362
|
if [ -n "$$CLEAN_TARGETS" ]; then
|
|
340
363
|
$(SSH) $(QSHELL) <<EOF
|