@profoundlogic/codermake 2.0.3 → 2.0.4

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.
@@ -163,10 +163,14 @@ system "crtcblmod module($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') tgtccsid
163
163
  endef
164
164
 
165
165
  # Build ILE CL program (bound)
166
+ # tgtccsid(*job) is only supported on IBM i 7.5 and later.
166
167
  define BUILD_CLLE_PGM
167
168
  $(call SETUP_LOG,$(notdir $@))
168
169
  $(SET_LIBL)
169
- system "crtbndcl pgm($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') incdir('.') tgtccsid(*job) output(*print) dbgview(*all)"
170
+ $(DETECT_IBMI_RELEASE)
171
+ TGTCCSID_PARM=
172
+ 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)/$(basename $(@F))) srcstmf('$<') incdir('.') $$TGTCCSID_PARM output(*print) dbgview(*all)"
170
174
  endef
171
175
 
172
176
  # Build OPM CL program
@@ -178,10 +182,14 @@ system "crtclpgm pgm($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qcls
178
182
  endef
179
183
 
180
184
  # Build ILE CL module
185
+ # tgtccsid(*job) is only supported on IBM i 7.5 and later.
181
186
  define BUILD_CLLE_MODULE
182
187
  $(call SETUP_LOG,$(notdir $@))
183
188
  $(SET_LIBL)
184
- system "crtclmod module($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') incdir('.') tgtccsid(*job) output(*print) dbgview(*all)"
189
+ $(DETECT_IBMI_RELEASE)
190
+ TGTCCSID_PARM=
191
+ 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)/$(basename $(@F))) srcstmf('$<') incdir('.') $$TGTCCSID_PARM output(*print) dbgview(*all)"
185
193
  endef
186
194
 
187
195
  # Build program from modules
@@ -238,9 +238,15 @@ touch '$@'
238
238
  endef
239
239
 
240
240
  # Build ILE CL program (bound)
241
+ # tgtccsid(*job) is only supported on IBM i 7.5 and later, so detect the
242
+ # target's release inside the remote shell and gate the parameter on it.
241
243
  define BUILD_CLLE_PGM
242
244
  $(call SETUP_LOG,$(notdir $@))
243
- $(call REMOTE_BUILD,$(filter-out build/%,$^),system "crtbndcl pgm($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') incdir('.') tgtccsid(*job) output(*print) dbgview(*all)")
245
+ $(call REMOTE_BUILD,$(filter-out build/%,$^),\
246
+ $(DETECT_IBMI_RELEASE); \
247
+ TGTCCSID_PARM=; \
248
+ if [ "$$IBMI_VERSION" -gt 7 ] || { [ "$$IBMI_VERSION" -eq 7 ] && [ "$$IBMI_RELEASE" -ge 5 ]; }; then TGTCCSID_PARM="tgtccsid(*job)"; fi; \
249
+ system "crtbndcl pgm($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') incdir('.') $$TGTCCSID_PARM output(*print) dbgview(*all)")
244
250
  touch '$@'
245
251
  endef
246
252
 
@@ -256,9 +262,15 @@ touch '$@'
256
262
  endef
257
263
 
258
264
  # Build ILE CL module
265
+ # tgtccsid(*job) is only supported on IBM i 7.5 and later, so detect the
266
+ # target's release inside the remote shell and gate the parameter on it.
259
267
  define BUILD_CLLE_MODULE
260
268
  $(call SETUP_LOG,$(notdir $@))
261
- $(call REMOTE_BUILD,$(filter-out build/%,$^),system "crtclmod module($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') incdir('.') tgtccsid(*job) output(*print) dbgview(*all)")
269
+ $(call REMOTE_BUILD,$(filter-out build/%,$^),\
270
+ $(DETECT_IBMI_RELEASE); \
271
+ TGTCCSID_PARM=; \
272
+ if [ "$$IBMI_VERSION" -gt 7 ] || { [ "$$IBMI_VERSION" -eq 7 ] && [ "$$IBMI_RELEASE" -ge 5 ]; }; then TGTCCSID_PARM="tgtccsid(*job)"; fi; \
273
+ system "crtclmod module($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') incdir('.') $$TGTCCSID_PARM output(*print) dbgview(*all)")
262
274
  touch '$@'
263
275
  endef
264
276
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profoundlogic/codermake",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Make wrapper framework for IBM i development that simplifies build rules",
5
5
  "main": "dist/bin/index.js",
6
6
  "type": "module",