@profoundlogic/codermake 2.1.0 → 3.0.0
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 +72 -1
- package/dist/bin/index.js +1 -1
- package/dist/bin/preprocess-rpg-copy.js +1 -1
- package/dist/bin/rdf-to-dds.js +1 -1
- package/dist/lib/config.js +1 -0
- package/dist/lib/discovery.js +1 -1
- package/dist/lib/ejs-to-dds.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 -1
- package/dist/lib/ssh.js +1 -1
- package/dist/lib/writer.js +1 -1
- package/dist/makefiles/Makefile +5 -0
- package/dist/makefiles/base.mk +49 -0
- package/dist/makefiles/ibmi.mk +86 -30
- package/dist/makefiles/unix.mk +103 -28
- package/package.json +1 -1
- package/skills/codermake/SKILL.md +39 -0
- package/skills/codermake/references/compile-listings.md +2 -2
- package/skills/codermake/references/file-types.md +53 -0
package/dist/makefiles/base.mk
CHANGED
|
@@ -139,3 +139,52 @@ ifdef CODERMAKE_LIBRARY_MAP
|
|
|
139
139
|
else
|
|
140
140
|
MODULE_PARM = module($(foreach m,$(filter %.module,$^),$(call ibmi_name_sh,$(m))))
|
|
141
141
|
endif
|
|
142
|
+
|
|
143
|
+
######
|
|
144
|
+
# RPG III (.rpg / .rpg38) /COPY member support.
|
|
145
|
+
#
|
|
146
|
+
# RPG III cannot compile directly from IFS stream files, so /COPY directives
|
|
147
|
+
# always reference source members. codermake creates a source member for every
|
|
148
|
+
# RPG III /COPY prerequisite (in addition to the main program source) before
|
|
149
|
+
# running the compile. Each /COPY prerequisite is listed in the rule so its
|
|
150
|
+
# location in the source tree encodes where the member must be created:
|
|
151
|
+
#
|
|
152
|
+
# <libraryDir>/<sourceFile>/<member>.<ext> (multi-library output)
|
|
153
|
+
# <sourceFile>/<member>.<ext> (single-library output)
|
|
154
|
+
#
|
|
155
|
+
# The member name comes from the file's base name, the source physical file
|
|
156
|
+
# from the immediate parent directory, and the target library from the leading
|
|
157
|
+
# library-directory segment (multi-library) or the program's own library
|
|
158
|
+
# (single-library). This lets the same /COPY member name resolve to different
|
|
159
|
+
# members in different libraries.
|
|
160
|
+
######
|
|
161
|
+
|
|
162
|
+
# A literal newline, so a $(foreach ...) can emit one recipe line per member.
|
|
163
|
+
define NL
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
endef
|
|
167
|
+
|
|
168
|
+
# The RPG III /COPY prerequisites of the current rule: every .rpg/.rpg38
|
|
169
|
+
# prerequisite except the main program source ($<).
|
|
170
|
+
RPG3_COPY_MEMBERS = $(filter-out $<,$(filter %.rpg %.rpg38,$^))
|
|
171
|
+
|
|
172
|
+
# Source physical file name for a /COPY prerequisite = its immediate parent dir.
|
|
173
|
+
copy_src_file = $(notdir $(patsubst %/,%,$(dir $(1))))
|
|
174
|
+
|
|
175
|
+
ifdef CODERMAKE_LIBRARY_MAP
|
|
176
|
+
# Parse CODERMAKE_RESOLVED_LIBRARY_MAP ("LIBA=APPLIBA LIBB=APPLIBB") into
|
|
177
|
+
# per-directory lookup variables CODERMAKE_LIBMAP_<dir> so a /COPY prereq's
|
|
178
|
+
# leading library-directory segment can be mapped to its IBM i library.
|
|
179
|
+
define _CODERMAKE_LIBMAP_ENTRY
|
|
180
|
+
CODERMAKE_LIBMAP_$(word 1,$(subst =, ,$(1))) := $(word 2,$(subst =, ,$(1)))
|
|
181
|
+
endef
|
|
182
|
+
$(foreach _p,$(CODERMAKE_RESOLVED_LIBRARY_MAP),$(eval $(call _CODERMAKE_LIBMAP_ENTRY,$(_p))))
|
|
183
|
+
|
|
184
|
+
# Target library for a /COPY prerequisite = its leading library-dir segment
|
|
185
|
+
# mapped through the resolved library map.
|
|
186
|
+
copy_src_lib = $(CODERMAKE_LIBMAP_$(firstword $(subst /, ,$(1))))
|
|
187
|
+
else
|
|
188
|
+
# Single-library output: every member goes to the program's own library.
|
|
189
|
+
copy_src_lib = $(TARGET_LIB)
|
|
190
|
+
endif
|
package/dist/makefiles/ibmi.mk
CHANGED
|
@@ -47,6 +47,20 @@ test -e '$(TARGET_LIB_PATH)/$(2).file/$(call ibmi_name,$(1)).mbr' || system "add
|
|
|
47
47
|
cat '$(1)' | Rfile -Qw '$(TARGET_LIB)/$(2)($(call ibmi_name,$(1)))'
|
|
48
48
|
endef
|
|
49
49
|
|
|
50
|
+
######
|
|
51
|
+
# Utility to create a source member in an explicitly named library. Used for
|
|
52
|
+
# RPG III /COPY members, whose target library is derived from the prerequisite
|
|
53
|
+
# path (see base.mk) and may differ from the program's own library.
|
|
54
|
+
# $(1) = IFS file path (source type is derived from file extension)
|
|
55
|
+
# $(2) = source file name (e.g., qcpysrc)
|
|
56
|
+
# $(3) = target IBM i library
|
|
57
|
+
######
|
|
58
|
+
define CREATE_COPY_MEMBER
|
|
59
|
+
test -e '/qsys.lib/$(3).lib/$(2).file' || system "crtsrcpf file($(3)/$(2))"
|
|
60
|
+
test -e '/qsys.lib/$(3).lib/$(2).file/$(call ibmi_name,$(1)).mbr' || system "addpfm file($(3)/$(2)) mbr($(call ibmi_name_sh,$(1))) srctype($(subst .,,$(suffix $(1))))"
|
|
61
|
+
cat '$(1)' | Rfile -Qw '$(3)/$(2)($(call ibmi_name,$(1)))'
|
|
62
|
+
endef
|
|
63
|
+
|
|
50
64
|
######
|
|
51
65
|
# Utility to build an object via CL commands in a separate file.
|
|
52
66
|
# $(1) = Object path
|
|
@@ -101,11 +115,11 @@ $(info ===)
|
|
|
101
115
|
ifndef CODERMAKE_LIBRARY_MAP
|
|
102
116
|
$(LIBRARY_PATH):
|
|
103
117
|
$(call SETUP_LOG,$(notdir $@))
|
|
104
|
-
system "crtlib $(LIBRARY) *test aut(*use) crtaut(*use)"
|
|
118
|
+
test -e '$(LIBRARY_PATH)' || system "crtlib $(LIBRARY) *test aut(*use) crtaut(*use)"
|
|
105
119
|
else
|
|
106
120
|
/qsys.lib/%.lib:
|
|
107
121
|
$(call SETUP_LOG,$(notdir $@))
|
|
108
|
-
system "crtlib $* *test aut(*use) crtaut(*use)"
|
|
122
|
+
test -e '/qsys.lib/$*.lib' || system "crtlib $* *test aut(*use) crtaut(*use)"
|
|
109
123
|
endif
|
|
110
124
|
|
|
111
125
|
######
|
|
@@ -117,7 +131,7 @@ define BUILD_RPGLE_PGM
|
|
|
117
131
|
$(call SETUP_LOG,$(notdir $@))
|
|
118
132
|
$(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(TARGET_LIB_PATH)/%,$^))
|
|
119
133
|
$(SET_LIBL)
|
|
120
|
-
system "crtbndrpg pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$$RPG_SRC_ROOT/$(call shell_escape_dollars,$<)') incdir('$$RPG_SRC_ROOT') tgtccsid(*job) output(*print)
|
|
134
|
+
system "crtbndrpg pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$$RPG_SRC_ROOT/$(call shell_escape_dollars,$<)') incdir('$$RPG_SRC_ROOT') tgtccsid(*job) output(*print)$(CODERMAKE_OPTS_crtbndrpg)"
|
|
121
135
|
$(call RPG_CLEANUP_SOURCES)
|
|
122
136
|
endef
|
|
123
137
|
|
|
@@ -126,7 +140,7 @@ define BUILD_SQLRPGLE_PGM
|
|
|
126
140
|
$(call SETUP_LOG,$(notdir $@))
|
|
127
141
|
$(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(TARGET_LIB_PATH)/%,$^))
|
|
128
142
|
$(SET_LIBL)
|
|
129
|
-
system "crtsqlrpgi obj($(TARGET_LIB)/$(call ibmi_name_sh,$@)) objtype(*pgm) srcstmf('$$RPG_SRC_ROOT/$(call shell_escape_dollars,$<)') cvtccsid(*job) output(*print) rpgppopt(*lvl2) compileopt('incdir(''$$RPG_SRC_ROOT'') tgtccsid(*job) output(*print)')
|
|
143
|
+
system "crtsqlrpgi obj($(TARGET_LIB)/$(call ibmi_name_sh,$@)) objtype(*pgm) srcstmf('$$RPG_SRC_ROOT/$(call shell_escape_dollars,$<)') cvtccsid(*job) output(*print) rpgppopt(*lvl2) compileopt('incdir(''$$RPG_SRC_ROOT'') tgtccsid(*job) output(*print)$(CODERMAKE_COMPILEOPT_crtsqlrpgi)')$(CODERMAKE_OPTS_crtsqlrpgi)"
|
|
130
144
|
$(call RPG_CLEANUP_SOURCES)
|
|
131
145
|
endef
|
|
132
146
|
|
|
@@ -135,7 +149,7 @@ define BUILD_RPGLE_MODULE
|
|
|
135
149
|
$(call SETUP_LOG,$(notdir $@))
|
|
136
150
|
$(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(TARGET_LIB_PATH)/%,$^))
|
|
137
151
|
$(SET_LIBL)
|
|
138
|
-
system "crtrpgmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$$RPG_SRC_ROOT/$(call shell_escape_dollars,$<)') incdir('$$RPG_SRC_ROOT') tgtccsid(*job) output(*print)
|
|
152
|
+
system "crtrpgmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$$RPG_SRC_ROOT/$(call shell_escape_dollars,$<)') incdir('$$RPG_SRC_ROOT') tgtccsid(*job) output(*print)$(CODERMAKE_OPTS_crtrpgmod)"
|
|
139
153
|
$(call RPG_CLEANUP_SOURCES)
|
|
140
154
|
endef
|
|
141
155
|
|
|
@@ -144,7 +158,7 @@ define BUILD_SQLRPGLE_MODULE
|
|
|
144
158
|
$(call SETUP_LOG,$(notdir $@))
|
|
145
159
|
$(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(TARGET_LIB_PATH)/%,$^))
|
|
146
160
|
$(SET_LIBL)
|
|
147
|
-
system "crtsqlrpgi obj($(TARGET_LIB)/$(call ibmi_name_sh,$@)) objtype(*module) srcstmf('$$RPG_SRC_ROOT/$(call shell_escape_dollars,$<)') cvtccsid(*job) output(*print) rpgppopt(*lvl2) compileopt('incdir(''$$RPG_SRC_ROOT'') tgtccsid(*job) output(*print)')
|
|
161
|
+
system "crtsqlrpgi obj($(TARGET_LIB)/$(call ibmi_name_sh,$@)) objtype(*module) srcstmf('$$RPG_SRC_ROOT/$(call shell_escape_dollars,$<)') cvtccsid(*job) output(*print) rpgppopt(*lvl2) compileopt('incdir(''$$RPG_SRC_ROOT'') tgtccsid(*job) output(*print)$(CODERMAKE_COMPILEOPT_crtsqlrpgi)')$(CODERMAKE_OPTS_crtsqlrpgi)"
|
|
148
162
|
$(call RPG_CLEANUP_SOURCES)
|
|
149
163
|
endef
|
|
150
164
|
|
|
@@ -152,14 +166,14 @@ endef
|
|
|
152
166
|
define BUILD_CBLLE_PGM
|
|
153
167
|
$(call SETUP_LOG,$(notdir $@))
|
|
154
168
|
$(SET_LIBL)
|
|
155
|
-
system "crtbndcbl pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') tgtccsid(*job) output(*print)
|
|
169
|
+
system "crtbndcbl pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') tgtccsid(*job) output(*print)$(CODERMAKE_OPTS_crtbndcbl)"
|
|
156
170
|
endef
|
|
157
171
|
|
|
158
172
|
# Build ILE COBOL module
|
|
159
173
|
define BUILD_CBLLE_MODULE
|
|
160
174
|
$(call SETUP_LOG,$(notdir $@))
|
|
161
175
|
$(SET_LIBL)
|
|
162
|
-
system "crtcblmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') tgtccsid(*job) output(*print)
|
|
176
|
+
system "crtcblmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') tgtccsid(*job) output(*print)$(CODERMAKE_OPTS_crtcblmod)"
|
|
163
177
|
endef
|
|
164
178
|
|
|
165
179
|
# Build ILE CL program (bound)
|
|
@@ -170,7 +184,7 @@ $(SET_LIBL)
|
|
|
170
184
|
$(DETECT_IBMI_RELEASE)
|
|
171
185
|
TGTCCSID_PARM=
|
|
172
186
|
if [ "$$IBMI_VERSION" -gt 7 ] || { [ "$$IBMI_VERSION" -eq 7 ] && [ "$$IBMI_RELEASE" -ge 5 ]; }; then TGTCCSID_PARM="tgtccsid(*job)"; fi
|
|
173
|
-
system "crtbndcl pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') incdir('.') $$TGTCCSID_PARM output(*print)
|
|
187
|
+
system "crtbndcl pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') incdir('.') $$TGTCCSID_PARM output(*print)$(CODERMAKE_OPTS_crtbndcl)"
|
|
174
188
|
endef
|
|
175
189
|
|
|
176
190
|
# Build OPM CL program
|
|
@@ -178,7 +192,40 @@ define BUILD_CLP_PGM
|
|
|
178
192
|
$(call SETUP_LOG,$(notdir $@))
|
|
179
193
|
$(call CREATE_SOURCE_MEMBER,$<,qclsrc)
|
|
180
194
|
$(SET_LIBL)
|
|
181
|
-
system "crtclpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qclsrc) output(*print)"
|
|
195
|
+
system "crtclpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qclsrc) output(*print)$(CODERMAKE_OPTS_crtclpgm)"
|
|
196
|
+
endef
|
|
197
|
+
|
|
198
|
+
# Build System/38 compatible OPM CL program (QSYS38/CRTCLPGM).
|
|
199
|
+
# QSYS38/CRTCLPGM has no REPLACE parameter and fails if the program exists, so
|
|
200
|
+
# delete any existing program object first.
|
|
201
|
+
define BUILD_CLP38_PGM
|
|
202
|
+
$(call SETUP_LOG,$(notdir $@))
|
|
203
|
+
$(call CREATE_SOURCE_MEMBER,$<,qclsrc)
|
|
204
|
+
$(SET_LIBL)
|
|
205
|
+
if test -e '$(TARGET_LIB_PATH)/$(call ibmi_name,$@).pgm'; then system "dltpgm $(TARGET_LIB)/$(call ibmi_name_sh,$@)"; fi
|
|
206
|
+
system "qsys38/crtclpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qclsrc) srcmbr($(call ibmi_name_sh,$<)) option(*source$(CODERMAKE_OPTVALS_qsys38_crtclpgm))$(CODERMAKE_OPTS_qsys38_crtclpgm)"
|
|
207
|
+
endef
|
|
208
|
+
|
|
209
|
+
# Build RPG/400 (RPG III) program (CRTRPGPGM). Creates the program source
|
|
210
|
+
# member plus a source member for every /COPY prerequisite before compiling.
|
|
211
|
+
define BUILD_RPG_PGM
|
|
212
|
+
$(call SETUP_LOG,$(notdir $@))
|
|
213
|
+
$(call CREATE_SOURCE_MEMBER,$<,qrpgsrc)
|
|
214
|
+
$(foreach c,$(RPG3_COPY_MEMBERS),$(call CREATE_COPY_MEMBER,$(c),$(call copy_src_file,$(c)),$(call copy_src_lib,$(c)))$(NL))
|
|
215
|
+
$(SET_LIBL)
|
|
216
|
+
system "crtrpgpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qrpgsrc) srcmbr($(call ibmi_name_sh,$<)) option(*source$(CODERMAKE_OPTVALS_crtrpgpgm)) replace(*yes)$(CODERMAKE_OPTS_crtrpgpgm)"
|
|
217
|
+
endef
|
|
218
|
+
|
|
219
|
+
# Build System/38 compatible RPG III program (QSYS38/CRTRPGPGM).
|
|
220
|
+
# QSYS38/CRTRPGPGM has no REPLACE parameter and fails if the program exists, so
|
|
221
|
+
# delete any existing program object first. Also creates /COPY source members.
|
|
222
|
+
define BUILD_RPG38_PGM
|
|
223
|
+
$(call SETUP_LOG,$(notdir $@))
|
|
224
|
+
$(call CREATE_SOURCE_MEMBER,$<,qrpgsrc)
|
|
225
|
+
$(foreach c,$(RPG3_COPY_MEMBERS),$(call CREATE_COPY_MEMBER,$(c),$(call copy_src_file,$(c)),$(call copy_src_lib,$(c)))$(NL))
|
|
226
|
+
$(SET_LIBL)
|
|
227
|
+
if test -e '$(TARGET_LIB_PATH)/$(call ibmi_name,$@).pgm'; then system "dltpgm $(TARGET_LIB)/$(call ibmi_name_sh,$@)"; fi
|
|
228
|
+
system "qsys38/crtrpgpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qrpgsrc) srcmbr($(call ibmi_name_sh,$<)) option(*source$(CODERMAKE_OPTVALS_qsys38_crtrpgpgm))$(CODERMAKE_OPTS_qsys38_crtrpgpgm)"
|
|
182
229
|
endef
|
|
183
230
|
|
|
184
231
|
# Build ILE CL module
|
|
@@ -189,28 +236,28 @@ $(SET_LIBL)
|
|
|
189
236
|
$(DETECT_IBMI_RELEASE)
|
|
190
237
|
TGTCCSID_PARM=
|
|
191
238
|
if [ "$$IBMI_VERSION" -gt 7 ] || { [ "$$IBMI_VERSION" -eq 7 ] && [ "$$IBMI_RELEASE" -ge 5 ]; }; then TGTCCSID_PARM="tgtccsid(*job)"; fi
|
|
192
|
-
system "crtclmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') incdir('.') $$TGTCCSID_PARM output(*print)
|
|
239
|
+
system "crtclmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') incdir('.') $$TGTCCSID_PARM output(*print)$(CODERMAKE_OPTS_crtclmod)"
|
|
193
240
|
endef
|
|
194
241
|
|
|
195
242
|
# Build program from modules
|
|
196
243
|
define BUILD_MODULE_TO_PGM
|
|
197
244
|
$(call SETUP_LOG,$(notdir $@))
|
|
198
245
|
$(SET_LIBL)
|
|
199
|
-
system "crtpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) $(MODULE_PARM) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
|
|
246
|
+
system "crtpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) $(MODULE_PARM) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)$(CODERMAKE_OPTS_crtpgm)"
|
|
200
247
|
endef
|
|
201
248
|
|
|
202
249
|
# Build service program from modules
|
|
203
250
|
define BUILD_MODULE_TO_SRVPGM
|
|
204
251
|
$(call SETUP_LOG,$(notdir $@))
|
|
205
252
|
$(SET_LIBL)
|
|
206
|
-
system "crtsrvpgm srvpgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) $(MODULE_PARM) export(*srcfile) srcstmf('$(call shell_escape_dollars,$(filter %.exports %.bnd,$^))') $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
|
|
253
|
+
system "crtsrvpgm srvpgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) $(MODULE_PARM) export(*srcfile) srcstmf('$(call shell_escape_dollars,$(filter %.exports %.bnd,$^))') $(BNDSRVPGM_PARM) $(BNDDIR_PARM)$(CODERMAKE_OPTS_crtsrvpgm)"
|
|
207
254
|
endef
|
|
208
255
|
|
|
209
256
|
# Build service program from modules (export all procedures)
|
|
210
257
|
define BUILD_MODULE_TO_SRVPGM_ALL
|
|
211
258
|
$(call SETUP_LOG,$(notdir $@))
|
|
212
259
|
$(SET_LIBL)
|
|
213
|
-
system "crtsrvpgm srvpgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) $(MODULE_PARM) export(*all) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
|
|
260
|
+
system "crtsrvpgm srvpgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) $(MODULE_PARM) export(*all) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)$(CODERMAKE_OPTS_crtsrvpgm)"
|
|
214
261
|
endef
|
|
215
262
|
|
|
216
263
|
# Build display file
|
|
@@ -218,7 +265,7 @@ define BUILD_DSPF_TO_FILE
|
|
|
218
265
|
$(call SETUP_LOG,$(notdir $@))
|
|
219
266
|
$(call CREATE_SOURCE_MEMBER,$<,qddssrc)
|
|
220
267
|
$(SET_LIBL)
|
|
221
|
-
system "crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
|
|
268
|
+
system "crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))$(CODERMAKE_OPTS_crtdspf)"
|
|
222
269
|
endef
|
|
223
270
|
|
|
224
271
|
# Build display file from RDF (Rich Display File) JSON
|
|
@@ -227,7 +274,7 @@ $(call SETUP_LOG,$(notdir $@))
|
|
|
227
274
|
'$(CODERMAKE_NODE)' '$(CODERMAKE_PACKAGE_DIR)/bin/rdf-to-dds.js' '$<' 'tmp/$(basename $(@F)).dspf'
|
|
228
275
|
$(call CREATE_SOURCE_MEMBER,tmp/$(basename $(@F)).dspf,qddssrc)
|
|
229
276
|
$(SET_LIBL)
|
|
230
|
-
system "crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc)
|
|
277
|
+
system "crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc)$(CODERMAKE_OPTS_crtdspf)"
|
|
231
278
|
rm -f 'tmp/$(basename $(@F)).dspf'
|
|
232
279
|
endef
|
|
233
280
|
|
|
@@ -236,7 +283,7 @@ define BUILD_PF_TO_FILE
|
|
|
236
283
|
$(call SETUP_LOG,$(notdir $@))
|
|
237
284
|
$(call CREATE_SOURCE_MEMBER,$<,qddssrc)
|
|
238
285
|
$(SET_LIBL)
|
|
239
|
-
system "crtpf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))
|
|
286
|
+
system "crtpf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))$(CODERMAKE_OPTS_crtpf)"
|
|
240
287
|
endef
|
|
241
288
|
|
|
242
289
|
# Build logical file
|
|
@@ -244,7 +291,7 @@ define BUILD_LF_TO_FILE
|
|
|
244
291
|
$(call SETUP_LOG,$(notdir $@))
|
|
245
292
|
$(call CREATE_SOURCE_MEMBER,$<,qddssrc)
|
|
246
293
|
$(SET_LIBL)
|
|
247
|
-
system "crtlf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
|
|
294
|
+
system "crtlf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))$(CODERMAKE_OPTS_crtlf)"
|
|
248
295
|
endef
|
|
249
296
|
|
|
250
297
|
# Build printer file
|
|
@@ -252,7 +299,7 @@ define BUILD_PRTF_TO_FILE
|
|
|
252
299
|
$(call SETUP_LOG,$(notdir $@))
|
|
253
300
|
$(call CREATE_SOURCE_MEMBER,$<,qddssrc)
|
|
254
301
|
$(SET_LIBL)
|
|
255
|
-
system "crtprtf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
|
|
302
|
+
system "crtprtf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))$(CODERMAKE_OPTS_crtprtf)"
|
|
256
303
|
endef
|
|
257
304
|
|
|
258
305
|
# Build System/38 display file
|
|
@@ -260,7 +307,7 @@ define BUILD_DSPF38_TO_FILE
|
|
|
260
307
|
$(call SETUP_LOG,$(notdir $@))
|
|
261
308
|
$(call CREATE_SOURCE_MEMBER,$<,qddssrc)
|
|
262
309
|
$(SET_LIBL)
|
|
263
|
-
system "qsys38/crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
|
|
310
|
+
system "qsys38/crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))$(CODERMAKE_OPTS_qsys38_crtdspf)"
|
|
264
311
|
endef
|
|
265
312
|
|
|
266
313
|
# Build System/38 physical file
|
|
@@ -268,7 +315,7 @@ define BUILD_PF38_TO_FILE
|
|
|
268
315
|
$(call SETUP_LOG,$(notdir $@))
|
|
269
316
|
$(call CREATE_SOURCE_MEMBER,$<,qddssrc)
|
|
270
317
|
$(SET_LIBL)
|
|
271
|
-
system "qsys38/crtpf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
|
|
318
|
+
system "qsys38/crtpf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))$(CODERMAKE_OPTS_qsys38_crtpf)"
|
|
272
319
|
endef
|
|
273
320
|
|
|
274
321
|
# Build System/38 logical file
|
|
@@ -276,7 +323,7 @@ define BUILD_LF38_TO_FILE
|
|
|
276
323
|
$(call SETUP_LOG,$(notdir $@))
|
|
277
324
|
$(call CREATE_SOURCE_MEMBER,$<,qddssrc)
|
|
278
325
|
$(SET_LIBL)
|
|
279
|
-
system "qsys38/crtlf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
|
|
326
|
+
system "qsys38/crtlf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))$(CODERMAKE_OPTS_qsys38_crtlf)"
|
|
280
327
|
endef
|
|
281
328
|
|
|
282
329
|
# Build System/38 printer file
|
|
@@ -284,35 +331,44 @@ define BUILD_PRTF38_TO_FILE
|
|
|
284
331
|
$(call SETUP_LOG,$(notdir $@))
|
|
285
332
|
$(call CREATE_SOURCE_MEMBER,$<,qddssrc)
|
|
286
333
|
$(SET_LIBL)
|
|
287
|
-
system "qsys38/crtprtf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
|
|
334
|
+
system "qsys38/crtprtf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))$(CODERMAKE_OPTS_qsys38_crtprtf)"
|
|
288
335
|
endef
|
|
289
336
|
|
|
290
337
|
# Build SQL table
|
|
291
338
|
define BUILD_SQLTABLE_TO_FILE
|
|
292
339
|
$(call SETUP_LOG,$(notdir $@))
|
|
293
340
|
$(SET_LIBL)
|
|
294
|
-
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)')
|
|
341
|
+
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') dftrdbcol($(TARGET_LIB))$(CODERMAKE_OPTS_runsqlstm)"
|
|
295
342
|
endef
|
|
296
343
|
|
|
297
344
|
# Build SQL index
|
|
298
345
|
define BUILD_SQLINDEX_TO_FILE
|
|
299
346
|
$(call SETUP_LOG,$(notdir $@))
|
|
300
347
|
$(SET_LIBL)
|
|
301
|
-
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)')
|
|
348
|
+
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') dftrdbcol($(TARGET_LIB))$(CODERMAKE_OPTS_runsqlstm)"
|
|
302
349
|
endef
|
|
303
350
|
|
|
304
351
|
# Build SQL view
|
|
305
352
|
define BUILD_SQLVIEW_TO_FILE
|
|
306
353
|
$(call SETUP_LOG,$(notdir $@))
|
|
307
354
|
$(SET_LIBL)
|
|
308
|
-
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)')
|
|
355
|
+
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') dftrdbcol($(TARGET_LIB))$(CODERMAKE_OPTS_runsqlstm)"
|
|
309
356
|
endef
|
|
310
357
|
|
|
311
358
|
# Build SQL procedure
|
|
312
359
|
define BUILD_SQLPROC_TO_PGM
|
|
313
360
|
$(call SETUP_LOG,$(notdir $@))
|
|
314
361
|
$(SET_LIBL)
|
|
315
|
-
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)')
|
|
362
|
+
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') dftrdbcol($(TARGET_LIB))$(CODERMAKE_OPTS_runsqlstm)"
|
|
363
|
+
endef
|
|
364
|
+
|
|
365
|
+
# Build SQL trigger program.
|
|
366
|
+
# CREATE TRIGGER creates the *PGM; use PROGRAM NAME in the source when the
|
|
367
|
+
# trigger name should map exactly to the build target object.
|
|
368
|
+
define BUILD_SQLTRIGGER_TO_PGM
|
|
369
|
+
$(call SETUP_LOG,$(notdir $@))
|
|
370
|
+
$(SET_LIBL)
|
|
371
|
+
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') dftrdbcol($(TARGET_LIB))$(CODERMAKE_OPTS_runsqlstm)"
|
|
316
372
|
endef
|
|
317
373
|
|
|
318
374
|
# Build SQL procedure as a service program.
|
|
@@ -322,7 +378,7 @@ endef
|
|
|
322
378
|
define BUILD_SQLPROC_TO_SRVPGM
|
|
323
379
|
$(call SETUP_LOG,$(notdir $@))
|
|
324
380
|
$(SET_LIBL)
|
|
325
|
-
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)')
|
|
381
|
+
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') dftrdbcol($(TARGET_LIB))$(CODERMAKE_OPTS_runsqlstm)"
|
|
326
382
|
endef
|
|
327
383
|
|
|
328
384
|
# Build SQL UDF (CREATE FUNCTION ... LANGUAGE SQL) as a service program.
|
|
@@ -332,7 +388,7 @@ endef
|
|
|
332
388
|
define BUILD_SQLUDF_TO_SRVPGM
|
|
333
389
|
$(call SETUP_LOG,$(notdir $@))
|
|
334
390
|
$(SET_LIBL)
|
|
335
|
-
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)')
|
|
391
|
+
system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') dftrdbcol($(TARGET_LIB))$(CODERMAKE_OPTS_runsqlstm)"
|
|
336
392
|
endef
|
|
337
393
|
|
|
338
394
|
# Build message file from CL commands
|
|
@@ -351,7 +407,7 @@ endef
|
|
|
351
407
|
define BUILD_MENU
|
|
352
408
|
$(call SETUP_LOG,$(notdir $@))
|
|
353
409
|
$(SET_LIBL)
|
|
354
|
-
system "crtmnu menu($(TARGET_LIB)/$(call ibmi_name_sh,$@)) type(*dspf) dspf($(call ibmi_name_sh,$(filter %.file,$^))) msgf($(call ibmi_name_sh,$(filter %.msgf,$^)))
|
|
410
|
+
system "crtmnu menu($(TARGET_LIB)/$(call ibmi_name_sh,$@)) type(*dspf) dspf($(call ibmi_name_sh,$(filter %.file,$^))) msgf($(call ibmi_name_sh,$(filter %.msgf,$^)))$(CODERMAKE_OPTS_crtmnu)"
|
|
355
411
|
endef
|
|
356
412
|
|
|
357
413
|
######
|