@profoundlogic/codermake 2.0.6 → 2.0.8

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.
@@ -20,6 +20,23 @@ MAKEFLAGS += --output-sync=target
20
20
  ######
21
21
  output_lib_of = $(patsubst %.lib,%,$(notdir $(patsubst %/,%,$(dir $(1)))))
22
22
 
23
+ ######
24
+ # Helpers for names containing literal dollar signs.
25
+ #
26
+ # Rules.mk must use GNU Make's standard escaping (`$$`) for file and object
27
+ # names containing `$`. Once Make expands automatic variables such as `$@` and
28
+ # `$<`, those values contain a literal `$`. Any value inserted into unquoted or
29
+ # double-quoted shell code must escape that dollar as `\$` so the shell does not
30
+ # treat it as an environment variable reference. Values inserted into
31
+ # single-quoted shell strings should use the raw form. Remote clean uses an
32
+ # unquoted local here-doc that is evaluated again by QShell, so it needs one
33
+ # additional backslash layer.
34
+ ######
35
+ ibmi_name = $(basename $(notdir $(1)))
36
+ shell_escape_dollars = $(subst $$,\$$,$(1))
37
+ remote_shell_escape_dollars = $(subst $$,\\\$$,$(1))
38
+ ibmi_name_sh = $(call shell_escape_dollars,$(call ibmi_name,$(1)))
39
+
23
40
  ######
24
41
  # Utility to set the IBM i library list. Three modes selected at parse time:
25
42
  #
@@ -84,7 +101,7 @@ endef
84
101
  # '.' if no preprocessing needed, or a generated temp dir path if any file was preprocessed
85
102
  ######
86
103
  define RPG_PREPROCESS_SOURCES
87
- RPG_SRC_ROOT=$$('$(CODERMAKE_NODE)' '$(CODERMAKE_PACKAGE_DIR)/bin/preprocess-rpg-copy.js' $(1) --temp-prefix tmp/rpg-pp)
104
+ RPG_SRC_ROOT=$$('$(CODERMAKE_NODE)' '$(CODERMAKE_PACKAGE_DIR)/bin/preprocess-rpg-copy.js' $(call shell_escape_dollars,$(1)) --temp-prefix tmp/rpg-pp)
88
105
  endef
89
106
 
90
107
  ######
@@ -105,8 +122,8 @@ endef
105
122
  # consumer programs. CODERMAKE_LIBRARY_LIST is the appropriate way to control
106
123
  # resolution when conflicts exist across mapped libraries.
107
124
  ######
108
- BNDSRVPGM_PARM = $(if $(filter %.srvpgm,$^ $|),bndsrvpgm($(foreach s,$(filter %.srvpgm,$^ $|),$(basename $(notdir $(s))))),)
109
- BNDDIR_PARM = $(if $(filter %.bnddir,$^ $|),bnddir($(foreach d,$(filter %.bnddir,$^ $|),$(basename $(notdir $(d))))),)
125
+ BNDSRVPGM_PARM = $(if $(filter %.srvpgm,$^ $|),bndsrvpgm($(foreach s,$(filter %.srvpgm,$^ $|),$(call ibmi_name_sh,$(s)))),)
126
+ BNDDIR_PARM = $(if $(filter %.bnddir,$^ $|),bnddir($(foreach d,$(filter %.bnddir,$^ $|),$(call ibmi_name_sh,$(d)))),)
110
127
 
111
128
  ######
112
129
  # MODULE() parameter for CRTPGM / CRTSRVPGM.
@@ -118,7 +135,7 @@ BNDDIR_PARM = $(if $(filter %.bnddir,$^ $|),bnddir($(foreach d,$(filter %.bnddir
118
135
  # In single-library mode we keep today's unqualified form.
119
136
  ######
120
137
  ifdef CODERMAKE_LIBRARY_MAP
121
- MODULE_PARM = module($(foreach m,$(filter %.module,$^),($(call output_lib_of,$m)/$(basename $(notdir $m)))))
138
+ MODULE_PARM = module($(foreach m,$(filter %.module,$^),($(call output_lib_of,$(m))/$(call ibmi_name_sh,$(m)))))
122
139
  else
123
- MODULE_PARM = module($(foreach m,$(filter %.module,$^),$(basename $(notdir $m))))
140
+ MODULE_PARM = module($(foreach m,$(filter %.module,$^),$(call ibmi_name_sh,$(m))))
124
141
  endif
@@ -42,9 +42,9 @@ MKDIR := /QOpenSys/usr/bin/mkdir
42
42
  # $(2) = source file name (e.g., qddssrc, qrpglesrc)
43
43
  ######
44
44
  define CREATE_SOURCE_MEMBER
45
- test -e $(TARGET_LIB_PATH)/$(2).file || system "crtsrcpf file($(TARGET_LIB)/$(2))"
46
- test -e $(TARGET_LIB_PATH)/$(2).file/$(basename $(notdir $(1))).mbr || system "addpfm file($(TARGET_LIB)/$(2)) mbr($(basename $(notdir $(1)))) srctype($(subst .,,$(suffix $(1))))"
47
- cat '$(1)' | Rfile -Qw '$(TARGET_LIB)/$(2)($(basename $(notdir $(1))))'
45
+ test -e '$(TARGET_LIB_PATH)/$(2).file' || system "crtsrcpf file($(TARGET_LIB)/$(2))"
46
+ test -e '$(TARGET_LIB_PATH)/$(2).file/$(call ibmi_name,$(1)).mbr' || system "addpfm file($(TARGET_LIB)/$(2)) mbr($(call ibmi_name_sh,$(1))) srctype($(subst .,,$(suffix $(1))))"
47
+ cat '$(1)' | Rfile -Qw '$(TARGET_LIB)/$(2)($(call ibmi_name,$(1)))'
48
48
  endef
49
49
 
50
50
  ######
@@ -55,7 +55,7 @@ endef
55
55
  define BUILD_FROM_CL_FILE
56
56
  rm -rf '$(1)'
57
57
  export LIBRARY=$(TARGET_LIB)
58
- export NAME=$(basename $(notdir $(1)))
58
+ export NAME='$(call ibmi_name,$(1))'
59
59
  (
60
60
  $(SET_LIBL)
61
61
  echo "$(file < $(2))" | while IFS= read -r line; do
@@ -71,7 +71,7 @@ endef
71
71
  ######
72
72
  LOG_DIR = tmp/logs$(if $(TARGET_LIBRARY),/$(TARGET_LIBRARY))
73
73
  define SETUP_LOG
74
- @echo "Creating $(1)"
74
+ @echo "Creating $(call shell_escape_dollars,$(1))"
75
75
  $(MKDIR) -p '$(LOG_DIR)'
76
76
  /usr/bin/touch -C 1208 '$(LOG_DIR)/$(1).log'
77
77
  exec > '$(LOG_DIR)/$(1).log' 2>&1
@@ -117,7 +117,7 @@ define BUILD_RPGLE_PGM
117
117
  $(call SETUP_LOG,$(notdir $@))
118
118
  $(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(TARGET_LIB_PATH)/%,$^))
119
119
  $(SET_LIBL)
120
- system "crtbndrpg pgm($(TARGET_LIB)/$(basename $(@F))) srcstmf('$$RPG_SRC_ROOT/$<') incdir('$$RPG_SRC_ROOT') tgtccsid(*job) output(*print) dbgview(*all)"
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) dbgview(*all)"
121
121
  $(call RPG_CLEANUP_SOURCES)
122
122
  endef
123
123
 
@@ -126,7 +126,7 @@ define BUILD_SQLRPGLE_PGM
126
126
  $(call SETUP_LOG,$(notdir $@))
127
127
  $(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(TARGET_LIB_PATH)/%,$^))
128
128
  $(SET_LIBL)
129
- system "crtsqlrpgi obj($(TARGET_LIB)/$(basename $(@F))) objtype(*pgm) srcstmf('$$RPG_SRC_ROOT/$<') cvtccsid(*job) output(*print) rpgppopt(*lvl2) compileopt('incdir(''$$RPG_SRC_ROOT'') tgtccsid(*job) output(*print)') dbgview(*source)"
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)') dbgview(*source)"
130
130
  $(call RPG_CLEANUP_SOURCES)
131
131
  endef
132
132
 
@@ -135,7 +135,7 @@ define BUILD_RPGLE_MODULE
135
135
  $(call SETUP_LOG,$(notdir $@))
136
136
  $(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(TARGET_LIB_PATH)/%,$^))
137
137
  $(SET_LIBL)
138
- system "crtrpgmod module($(TARGET_LIB)/$(basename $(@F))) srcstmf('$$RPG_SRC_ROOT/$<') incdir('$$RPG_SRC_ROOT') tgtccsid(*job) output(*print) dbgview(*all)"
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) dbgview(*all)"
139
139
  $(call RPG_CLEANUP_SOURCES)
140
140
  endef
141
141
 
@@ -144,7 +144,7 @@ define BUILD_SQLRPGLE_MODULE
144
144
  $(call SETUP_LOG,$(notdir $@))
145
145
  $(call RPG_PREPROCESS_SOURCES,$< $(filter-out $(TARGET_LIB_PATH)/%,$^))
146
146
  $(SET_LIBL)
147
- system "crtsqlrpgi obj($(TARGET_LIB)/$(basename $(@F))) objtype(*module) srcstmf('$$RPG_SRC_ROOT/$<') cvtccsid(*job) output(*print) rpgppopt(*lvl2) compileopt('incdir(''$$RPG_SRC_ROOT'') tgtccsid(*job) output(*print)') dbgview(*source)"
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)') dbgview(*source)"
148
148
  $(call RPG_CLEANUP_SOURCES)
149
149
  endef
150
150
 
@@ -152,14 +152,14 @@ endef
152
152
  define BUILD_CBLLE_PGM
153
153
  $(call SETUP_LOG,$(notdir $@))
154
154
  $(SET_LIBL)
155
- system "crtbndcbl pgm($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') tgtccsid(*job) output(*print) dbgview(*all)"
155
+ system "crtbndcbl pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') tgtccsid(*job) output(*print) dbgview(*all)"
156
156
  endef
157
157
 
158
158
  # Build ILE COBOL module
159
159
  define BUILD_CBLLE_MODULE
160
160
  $(call SETUP_LOG,$(notdir $@))
161
161
  $(SET_LIBL)
162
- system "crtcblmod module($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') tgtccsid(*job) output(*print) dbgview(*all)"
162
+ system "crtcblmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') tgtccsid(*job) output(*print) dbgview(*all)"
163
163
  endef
164
164
 
165
165
  # Build ILE CL program (bound)
@@ -170,7 +170,7 @@ $(SET_LIBL)
170
170
  $(DETECT_IBMI_RELEASE)
171
171
  TGTCCSID_PARM=
172
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)"
173
+ system "crtbndcl pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') incdir('.') $$TGTCCSID_PARM output(*print) dbgview(*all)"
174
174
  endef
175
175
 
176
176
  # Build OPM CL program
@@ -178,7 +178,7 @@ define BUILD_CLP_PGM
178
178
  $(call SETUP_LOG,$(notdir $@))
179
179
  $(call CREATE_SOURCE_MEMBER,$<,qclsrc)
180
180
  $(SET_LIBL)
181
- system "crtclpgm pgm($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qclsrc) output(*print)"
181
+ system "crtclpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qclsrc) output(*print)"
182
182
  endef
183
183
 
184
184
  # Build ILE CL module
@@ -189,28 +189,28 @@ $(SET_LIBL)
189
189
  $(DETECT_IBMI_RELEASE)
190
190
  TGTCCSID_PARM=
191
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)"
192
+ system "crtclmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') incdir('.') $$TGTCCSID_PARM output(*print) dbgview(*all)"
193
193
  endef
194
194
 
195
195
  # Build program from modules
196
196
  define BUILD_MODULE_TO_PGM
197
197
  $(call SETUP_LOG,$(notdir $@))
198
198
  $(SET_LIBL)
199
- system "crtpgm pgm($(TARGET_LIB)/$(basename $(@F))) $(MODULE_PARM) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
199
+ system "crtpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) $(MODULE_PARM) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
200
200
  endef
201
201
 
202
202
  # Build service program from modules
203
203
  define BUILD_MODULE_TO_SRVPGM
204
204
  $(call SETUP_LOG,$(notdir $@))
205
205
  $(SET_LIBL)
206
- system "crtsrvpgm srvpgm($(TARGET_LIB)/$(basename $(@F))) $(MODULE_PARM) export(*srcfile) srcstmf('$(filter %.exports %.bnd,$^)') $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
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)"
207
207
  endef
208
208
 
209
209
  # Build service program from modules (export all procedures)
210
210
  define BUILD_MODULE_TO_SRVPGM_ALL
211
211
  $(call SETUP_LOG,$(notdir $@))
212
212
  $(SET_LIBL)
213
- system "crtsrvpgm srvpgm($(TARGET_LIB)/$(basename $(@F))) $(MODULE_PARM) export(*all) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
213
+ system "crtsrvpgm srvpgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) $(MODULE_PARM) export(*all) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
214
214
  endef
215
215
 
216
216
  # Build display file
@@ -218,7 +218,7 @@ define BUILD_DSPF_TO_FILE
218
218
  $(call SETUP_LOG,$(notdir $@))
219
219
  $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
220
220
  $(SET_LIBL)
221
- system "crtdspf file($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(basename $(notdir $<)))"
221
+ system "crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
222
222
  endef
223
223
 
224
224
  # Build display file from RDF (Rich Display File) JSON
@@ -227,7 +227,7 @@ $(call SETUP_LOG,$(notdir $@))
227
227
  '$(CODERMAKE_NODE)' '$(CODERMAKE_PACKAGE_DIR)/bin/rdf-to-dds.js' '$<' 'tmp/$(basename $(@F)).dspf'
228
228
  $(call CREATE_SOURCE_MEMBER,tmp/$(basename $(@F)).dspf,qddssrc)
229
229
  $(SET_LIBL)
230
- system "crtdspf file($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qddssrc) enhdsp(*yes)"
230
+ system "crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) enhdsp(*yes)"
231
231
  rm -f 'tmp/$(basename $(@F)).dspf'
232
232
  endef
233
233
 
@@ -236,7 +236,7 @@ define BUILD_PF_TO_FILE
236
236
  $(call SETUP_LOG,$(notdir $@))
237
237
  $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
238
238
  $(SET_LIBL)
239
- system "crtpf file($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(basename $(notdir $<))) aut(*change)"
239
+ system "crtpf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<)) aut(*change)"
240
240
  endef
241
241
 
242
242
  # Build logical file
@@ -244,7 +244,7 @@ define BUILD_LF_TO_FILE
244
244
  $(call SETUP_LOG,$(notdir $@))
245
245
  $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
246
246
  $(SET_LIBL)
247
- system "crtlf file($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(basename $(notdir $<)))"
247
+ system "crtlf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
248
248
  endef
249
249
 
250
250
  # Build printer file
@@ -252,35 +252,67 @@ define BUILD_PRTF_TO_FILE
252
252
  $(call SETUP_LOG,$(notdir $@))
253
253
  $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
254
254
  $(SET_LIBL)
255
- system "crtprtf file($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(basename $(notdir $<)))"
255
+ system "crtprtf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
256
+ endef
257
+
258
+ # Build System/38 display file
259
+ define BUILD_DSPF38_TO_FILE
260
+ $(call SETUP_LOG,$(notdir $@))
261
+ $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
262
+ $(SET_LIBL)
263
+ system "qsys38/crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
264
+ endef
265
+
266
+ # Build System/38 physical file
267
+ define BUILD_PF38_TO_FILE
268
+ $(call SETUP_LOG,$(notdir $@))
269
+ $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
270
+ $(SET_LIBL)
271
+ system "qsys38/crtpf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
272
+ endef
273
+
274
+ # Build System/38 logical file
275
+ define BUILD_LF38_TO_FILE
276
+ $(call SETUP_LOG,$(notdir $@))
277
+ $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
278
+ $(SET_LIBL)
279
+ system "qsys38/crtlf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
280
+ endef
281
+
282
+ # Build System/38 printer file
283
+ define BUILD_PRTF38_TO_FILE
284
+ $(call SETUP_LOG,$(notdir $@))
285
+ $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
286
+ $(SET_LIBL)
287
+ system "qsys38/crtprtf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
256
288
  endef
257
289
 
258
290
  # Build SQL table
259
291
  define BUILD_SQLTABLE_TO_FILE
260
292
  $(call SETUP_LOG,$(notdir $@))
261
293
  $(SET_LIBL)
262
- system "runsqlstm srcstmf('$<') commit(*none) dftrdbcol($(TARGET_LIB))"
294
+ system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') commit(*none) dftrdbcol($(TARGET_LIB))"
263
295
  endef
264
296
 
265
297
  # Build SQL index
266
298
  define BUILD_SQLINDEX_TO_FILE
267
299
  $(call SETUP_LOG,$(notdir $@))
268
300
  $(SET_LIBL)
269
- system "runsqlstm srcstmf('$<') commit(*none) dftrdbcol($(TARGET_LIB))"
301
+ system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') commit(*none) dftrdbcol($(TARGET_LIB))"
270
302
  endef
271
303
 
272
304
  # Build SQL view
273
305
  define BUILD_SQLVIEW_TO_FILE
274
306
  $(call SETUP_LOG,$(notdir $@))
275
307
  $(SET_LIBL)
276
- system "runsqlstm srcstmf('$<') commit(*none) dftrdbcol($(TARGET_LIB))"
308
+ system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') commit(*none) dftrdbcol($(TARGET_LIB))"
277
309
  endef
278
310
 
279
311
  # Build SQL procedure
280
312
  define BUILD_SQLPROC_TO_PGM
281
313
  $(call SETUP_LOG,$(notdir $@))
282
314
  $(SET_LIBL)
283
- system "runsqlstm srcstmf('$<') commit(*none) dftrdbcol($(TARGET_LIB))"
315
+ system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') commit(*none) dftrdbcol($(TARGET_LIB))"
284
316
  endef
285
317
 
286
318
  # Build message file from CL commands
@@ -299,7 +331,7 @@ endef
299
331
  define BUILD_MENU
300
332
  $(call SETUP_LOG,$(notdir $@))
301
333
  $(SET_LIBL)
302
- system "crtmnu menu($(TARGET_LIB)/$(basename $(@F))) type(*dspf) dspf($(basename $(notdir $(filter %.file,$^)))) msgf($(basename $(notdir $(filter %.msgf,$^)))) cmdlin(*none) dspkey(*no)"
334
+ 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,$^))) cmdlin(*none) dspkey(*no)"
303
335
  endef
304
336
 
305
337
  ######
@@ -310,9 +342,9 @@ endef
310
342
  .PHONY: platform-clean
311
343
  platform-clean:
312
344
  @rm -rf tmp/rpg-pp-*
313
- if [ -n "$(TARGETS)" ]; then
345
+ if [ -n "$(call shell_escape_dollars,$(TARGETS))" ]; then
314
346
  for pass in 1 2; do
315
- for target in $(TARGETS); do
347
+ for target in $(call shell_escape_dollars,$(TARGETS)); do
316
348
  lib_part=$${target#/qsys.lib/}
317
349
  lib=$${lib_part%%/*}
318
350
  lib=$${lib%.lib}
@@ -72,11 +72,11 @@ $(SSH) $(QSHELL) <<'EOF'
72
72
  if [ ! -e '$(TARGET_LIB_PATH)/$(2).file' ]; then
73
73
  system "crtsrcpf file($(TARGET_LIB)/$(2))"
74
74
  fi
75
- if [ ! -e '$(TARGET_LIB_PATH)/$(2).file/$(basename $(notdir $(1))).mbr' ]; then
76
- system "addpfm file($(TARGET_LIB)/$(2)) mbr($(basename $(notdir $(1)))) srctype($(subst .,,$(suffix $(1))))"
75
+ if [ ! -e '$(TARGET_LIB_PATH)/$(2).file/$(call ibmi_name,$(1)).mbr' ]; then
76
+ system "addpfm file($(TARGET_LIB)/$(2)) mbr($(call ibmi_name_sh,$(1))) srctype($(subst .,,$(suffix $(1))))"
77
77
  fi
78
78
  EOF
79
- cat '$(1)' | $(SSH) "$(QSHELL) -c 'Rfile -Qw \"$(TARGET_LIB)/$(2)($(basename $(notdir $(1))))\"'"
79
+ cat '$(1)' | $(SSH) "$(QSHELL) -c 'Rfile -Qw \"$(TARGET_LIB)/$(2)($(call remote_shell_escape_dollars,$(call ibmi_name,$(1))))\"'"
80
80
  endef
81
81
 
82
82
  ######
@@ -88,7 +88,7 @@ define BUILD_FROM_CL_FILE
88
88
  $(call REMOTE_BUILD,$(2), \
89
89
  rm -rf '$(TARGET_LIB_PATH)/$(notdir $(1))' && \
90
90
  export LIBRARY=$(TARGET_LIB) && \
91
- export NAME=$(basename $(notdir $(1))) && \
91
+ export NAME='$(call ibmi_name,$(1))' && \
92
92
  ( \
93
93
  echo "$(file < $<)" | while IFS= read -r line; do \
94
94
  system "$$line"; \
@@ -103,7 +103,7 @@ endef
103
103
  ######
104
104
  LOG_DIR = tmp/logs$(if $(TARGET_LIBRARY),/$(TARGET_LIBRARY))
105
105
  define SETUP_LOG
106
- @echo "Creating $(1)"
106
+ @echo "Creating $(call shell_escape_dollars,$(1))"
107
107
  $(MKDIR) -p '$(LOG_DIR)'
108
108
  exec > '$(LOG_DIR)/$(1).log' 2>&1
109
109
  endef
@@ -127,7 +127,7 @@ endef
127
127
  ######
128
128
  define REMOTE_BUILD_FROM
129
129
  TAR_FILE=tmp/codermake_$$(uuidgen).tar
130
- tar -C "$(1)" -cf "$$TAR_FILE" $(2)
130
+ tar -C "$(1)" -cf "$$TAR_FILE" $(call shell_escape_dollars,$(2))
131
131
  REMOTE_DIR=/tmp/codermake_$$(uuidgen)
132
132
  $(SSH) "$(QSHELL) -c 'mkdir $$REMOTE_DIR'"
133
133
  EXIT_CODE=0
@@ -200,7 +200,7 @@ endif
200
200
  define BUILD_RPGLE_PGM
201
201
  $(call SETUP_LOG,$(notdir $@))
202
202
  $(call RPG_PREPROCESS_SOURCES,$(filter-out build/%,$^))
203
- $(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtbndrpg pgm($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') incdir('.') tgtccsid(*job) output(*print) dbgview(*all)")
203
+ $(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtbndrpg pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') incdir('.') tgtccsid(*job) output(*print) dbgview(*all)")
204
204
  $(call RPG_CLEANUP_SOURCES)
205
205
  touch '$@'
206
206
  endef
@@ -209,7 +209,7 @@ endef
209
209
  define BUILD_SQLRPGLE_PGM
210
210
  $(call SETUP_LOG,$(notdir $@))
211
211
  $(call RPG_PREPROCESS_SOURCES,$(filter-out build/%,$^))
212
- $(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtsqlrpgi obj($(TARGET_LIB)/$(basename $(@F))) objtype(*pgm) srcstmf('$<') cvtccsid(*job) output(*print) rpgppopt(*lvl2) compileopt('incdir(''.'') tgtccsid(*job) output(*print)') dbgview(*source)")
212
+ $(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtsqlrpgi obj($(TARGET_LIB)/$(call ibmi_name_sh,$@)) objtype(*pgm) srcstmf('$(call shell_escape_dollars,$<)') cvtccsid(*job) output(*print) rpgppopt(*lvl2) compileopt('incdir(''.'') tgtccsid(*job) output(*print)') dbgview(*source)")
213
213
  $(call RPG_CLEANUP_SOURCES)
214
214
  touch '$@'
215
215
  endef
@@ -218,7 +218,7 @@ endef
218
218
  define BUILD_RPGLE_MODULE
219
219
  $(call SETUP_LOG,$(notdir $@))
220
220
  $(call RPG_PREPROCESS_SOURCES,$(filter-out build/%,$^))
221
- $(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtrpgmod module($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') incdir('.') tgtccsid(*job) output(*print) dbgview(*all)")
221
+ $(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtrpgmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') incdir('.') tgtccsid(*job) output(*print) dbgview(*all)")
222
222
  $(call RPG_CLEANUP_SOURCES)
223
223
  touch '$@'
224
224
  endef
@@ -227,7 +227,7 @@ endef
227
227
  define BUILD_SQLRPGLE_MODULE
228
228
  $(call SETUP_LOG,$(notdir $@))
229
229
  $(call RPG_PREPROCESS_SOURCES,$(filter-out build/%,$^))
230
- $(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtsqlrpgi obj($(TARGET_LIB)/$(basename $(@F))) objtype(*module) srcstmf('$<') cvtccsid(*job) output(*print) rpgppopt(*lvl2) compileopt('incdir(''.'') tgtccsid(*job) output(*print)') dbgview(*source)")
230
+ $(call REMOTE_BUILD_FROM,$$RPG_SRC_ROOT,$(filter-out build/%,$^),system "crtsqlrpgi obj($(TARGET_LIB)/$(call ibmi_name_sh,$@)) objtype(*module) srcstmf('$(call shell_escape_dollars,$<)') cvtccsid(*job) output(*print) rpgppopt(*lvl2) compileopt('incdir(''.'') tgtccsid(*job) output(*print)') dbgview(*source)")
231
231
  $(call RPG_CLEANUP_SOURCES)
232
232
  touch '$@'
233
233
  endef
@@ -235,14 +235,14 @@ endef
235
235
  # Build ILE COBOL program (bound)
236
236
  define BUILD_CBLLE_PGM
237
237
  $(call SETUP_LOG,$(notdir $@))
238
- $(call REMOTE_BUILD,$(filter-out build/%,$^),system "crtbndcbl pgm($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') tgtccsid(*job) output(*print) dbgview(*all)")
238
+ $(call REMOTE_BUILD,$(filter-out build/%,$^),system "crtbndcbl pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') tgtccsid(*job) output(*print) dbgview(*all)")
239
239
  touch '$@'
240
240
  endef
241
241
 
242
242
  # Build ILE COBOL module
243
243
  define BUILD_CBLLE_MODULE
244
244
  $(call SETUP_LOG,$(notdir $@))
245
- $(call REMOTE_BUILD,$(filter-out build/%,$^),system "crtcblmod module($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') tgtccsid(*job) output(*print) dbgview(*all)")
245
+ $(call REMOTE_BUILD,$(filter-out build/%,$^),system "crtcblmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') tgtccsid(*job) output(*print) dbgview(*all)")
246
246
  touch '$@'
247
247
  endef
248
248
 
@@ -255,7 +255,7 @@ $(call REMOTE_BUILD,$(filter-out build/%,$^),\
255
255
  $(DETECT_IBMI_RELEASE); \
256
256
  TGTCCSID_PARM=; \
257
257
  if [ "$$IBMI_VERSION" -gt 7 ] || { [ "$$IBMI_VERSION" -eq 7 ] && [ "$$IBMI_RELEASE" -ge 5 ]; }; then TGTCCSID_PARM="tgtccsid(*job)"; fi; \
258
- system "crtbndcl pgm($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') incdir('.') $$TGTCCSID_PARM output(*print) dbgview(*all)")
258
+ system "crtbndcl pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') incdir('.') $$TGTCCSID_PARM output(*print) dbgview(*all)")
259
259
  touch '$@'
260
260
  endef
261
261
 
@@ -265,7 +265,7 @@ $(call SETUP_LOG,$(notdir $@))
265
265
  $(call CREATE_SOURCE_MEMBER,$<,qclsrc)
266
266
  $(SSH) $(QSHELL) <<'EOF'
267
267
  $(SET_LIBL)
268
- system "crtclpgm pgm($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qclsrc) output(*print)"
268
+ system "crtclpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qclsrc) output(*print)"
269
269
  EOF
270
270
  touch '$@'
271
271
  endef
@@ -279,7 +279,7 @@ $(call REMOTE_BUILD,$(filter-out build/%,$^),\
279
279
  $(DETECT_IBMI_RELEASE); \
280
280
  TGTCCSID_PARM=; \
281
281
  if [ "$$IBMI_VERSION" -gt 7 ] || { [ "$$IBMI_VERSION" -eq 7 ] && [ "$$IBMI_RELEASE" -ge 5 ]; }; then TGTCCSID_PARM="tgtccsid(*job)"; fi; \
282
- system "crtclmod module($(TARGET_LIB)/$(basename $(@F))) srcstmf('$<') incdir('.') $$TGTCCSID_PARM output(*print) dbgview(*all)")
282
+ system "crtclmod module($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcstmf('$(call shell_escape_dollars,$<)') incdir('.') $$TGTCCSID_PARM output(*print) dbgview(*all)")
283
283
  touch '$@'
284
284
  endef
285
285
 
@@ -288,7 +288,7 @@ define BUILD_MODULE_TO_PGM
288
288
  $(call SETUP_LOG,$(notdir $@))
289
289
  $(SSH) $(QSHELL) <<'EOF'
290
290
  $(SET_LIBL)
291
- system "crtpgm pgm($(TARGET_LIB)/$(basename $(@F))) $(MODULE_PARM) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
291
+ system "crtpgm pgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) $(MODULE_PARM) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
292
292
  EOF
293
293
  touch '$@'
294
294
  endef
@@ -296,7 +296,7 @@ endef
296
296
  # Build service program from modules
297
297
  define BUILD_MODULE_TO_SRVPGM
298
298
  $(call SETUP_LOG,$(notdir $@))
299
- $(call REMOTE_BUILD,$(filter-out build/%,$^),system "crtsrvpgm srvpgm($(TARGET_LIB)/$(basename $(@F))) $(MODULE_PARM) export(*srcfile) srcstmf('$(filter %.exports %.bnd,$^)') $(BNDSRVPGM_PARM) $(BNDDIR_PARM)")
299
+ $(call REMOTE_BUILD,$(filter-out build/%,$^),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)")
300
300
  touch '$@'
301
301
  endef
302
302
 
@@ -305,7 +305,7 @@ define BUILD_MODULE_TO_SRVPGM_ALL
305
305
  $(call SETUP_LOG,$(notdir $@))
306
306
  $(SSH) $(QSHELL) <<'EOF'
307
307
  $(SET_LIBL)
308
- system "crtsrvpgm srvpgm($(TARGET_LIB)/$(basename $(@F))) $(MODULE_PARM) export(*all) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
308
+ system "crtsrvpgm srvpgm($(TARGET_LIB)/$(call ibmi_name_sh,$@)) $(MODULE_PARM) export(*all) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
309
309
  EOF
310
310
  touch '$@'
311
311
  endef
@@ -316,7 +316,7 @@ $(call SETUP_LOG,$(notdir $@))
316
316
  $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
317
317
  $(SSH) $(QSHELL) <<'EOF'
318
318
  $(SET_LIBL)
319
- system "crtdspf file($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(basename $(notdir $<)))"
319
+ system "crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
320
320
  EOF
321
321
  touch '$@'
322
322
  endef
@@ -328,7 +328,7 @@ $(call SETUP_LOG,$(notdir $@))
328
328
  $(call CREATE_SOURCE_MEMBER,tmp/$(basename $(@F)).dspf,qddssrc)
329
329
  $(SSH) $(QSHELL) <<'EOF'
330
330
  $(SET_LIBL)
331
- system "crtdspf file($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qddssrc) enhdsp(*yes)"
331
+ system "crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) enhdsp(*yes)"
332
332
  EOF
333
333
  rm -f 'tmp/$(basename $(@F)).dspf'
334
334
  touch '$@'
@@ -340,7 +340,7 @@ $(call SETUP_LOG,$(notdir $@))
340
340
  $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
341
341
  $(SSH) $(QSHELL) <<'EOF'
342
342
  $(SET_LIBL)
343
- system "crtpf file($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(basename $(notdir $<)))"
343
+ system "crtpf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
344
344
  EOF
345
345
  touch '$@'
346
346
  endef
@@ -351,7 +351,7 @@ $(call SETUP_LOG,$(notdir $@))
351
351
  $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
352
352
  $(SSH) $(QSHELL) <<'EOF'
353
353
  $(SET_LIBL)
354
- system "crtlf file($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(basename $(notdir $<)))"
354
+ system "crtlf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
355
355
  EOF
356
356
  touch '$@'
357
357
  endef
@@ -362,7 +362,51 @@ $(call SETUP_LOG,$(notdir $@))
362
362
  $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
363
363
  $(SSH) $(QSHELL) <<'EOF'
364
364
  $(SET_LIBL)
365
- system "crtprtf file($(TARGET_LIB)/$(basename $(@F))) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(basename $(notdir $<)))"
365
+ system "crtprtf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
366
+ EOF
367
+ touch '$@'
368
+ endef
369
+
370
+ # Build System/38 display file
371
+ define BUILD_DSPF38_TO_FILE
372
+ $(call SETUP_LOG,$(notdir $@))
373
+ $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
374
+ $(SSH) $(QSHELL) <<'EOF'
375
+ $(SET_LIBL)
376
+ system "qsys38/crtdspf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
377
+ EOF
378
+ touch '$@'
379
+ endef
380
+
381
+ # Build System/38 physical file
382
+ define BUILD_PF38_TO_FILE
383
+ $(call SETUP_LOG,$(notdir $@))
384
+ $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
385
+ $(SSH) $(QSHELL) <<'EOF'
386
+ $(SET_LIBL)
387
+ system "qsys38/crtpf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
388
+ EOF
389
+ touch '$@'
390
+ endef
391
+
392
+ # Build System/38 logical file
393
+ define BUILD_LF38_TO_FILE
394
+ $(call SETUP_LOG,$(notdir $@))
395
+ $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
396
+ $(SSH) $(QSHELL) <<'EOF'
397
+ $(SET_LIBL)
398
+ system "qsys38/crtlf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
399
+ EOF
400
+ touch '$@'
401
+ endef
402
+
403
+ # Build System/38 printer file
404
+ define BUILD_PRTF38_TO_FILE
405
+ $(call SETUP_LOG,$(notdir $@))
406
+ $(call CREATE_SOURCE_MEMBER,$<,qddssrc)
407
+ $(SSH) $(QSHELL) <<'EOF'
408
+ $(SET_LIBL)
409
+ system "qsys38/crtprtf file($(TARGET_LIB)/$(call ibmi_name_sh,$@)) srcfile($(TARGET_LIB)/qddssrc) srcmbr($(call ibmi_name_sh,$<))"
366
410
  EOF
367
411
  touch '$@'
368
412
  endef
@@ -370,28 +414,28 @@ endef
370
414
  # Build SQL table
371
415
  define BUILD_SQLTABLE_TO_FILE
372
416
  $(call SETUP_LOG,$(notdir $@))
373
- $(call REMOTE_BUILD,$(filter-out build/%,$^),system "runsqlstm srcstmf('$<') commit(*none) dftrdbcol($(TARGET_LIB))")
417
+ $(call REMOTE_BUILD,$(filter-out build/%,$^),system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') commit(*none) dftrdbcol($(TARGET_LIB))")
374
418
  touch '$@'
375
419
  endef
376
420
 
377
421
  # Build SQL index
378
422
  define BUILD_SQLINDEX_TO_FILE
379
423
  $(call SETUP_LOG,$(notdir $@))
380
- $(call REMOTE_BUILD,$(filter-out build/%,$^),system "runsqlstm srcstmf('$<') commit(*none) dftrdbcol($(TARGET_LIB))")
424
+ $(call REMOTE_BUILD,$(filter-out build/%,$^),system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') commit(*none) dftrdbcol($(TARGET_LIB))")
381
425
  touch '$@'
382
426
  endef
383
427
 
384
428
  # Build SQL view
385
429
  define BUILD_SQLVIEW_TO_FILE
386
430
  $(call SETUP_LOG,$(notdir $@))
387
- $(call REMOTE_BUILD,$(filter-out build/%,$^),system "runsqlstm srcstmf('$<') commit(*none) dftrdbcol($(TARGET_LIB))")
431
+ $(call REMOTE_BUILD,$(filter-out build/%,$^),system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') commit(*none) dftrdbcol($(TARGET_LIB))")
388
432
  touch '$@'
389
433
  endef
390
434
 
391
435
  # Build SQL procedure
392
436
  define BUILD_SQLPROC_TO_PGM
393
437
  $(call SETUP_LOG,$(notdir $@))
394
- $(call REMOTE_BUILD,$(filter-out build/%,$^),system "runsqlstm srcstmf('$<') commit(*none) dftrdbcol($(TARGET_LIB))")
438
+ $(call REMOTE_BUILD,$(filter-out build/%,$^),system "runsqlstm srcstmf('$(call shell_escape_dollars,$<)') commit(*none) dftrdbcol($(TARGET_LIB))")
395
439
  touch '$@'
396
440
  endef
397
441
 
@@ -414,7 +458,7 @@ define BUILD_MENU
414
458
  $(call SETUP_LOG,$(notdir $@))
415
459
  $(SSH) $(QSHELL) <<'EOF'
416
460
  $(SET_LIBL)
417
- system "crtmnu menu($(TARGET_LIB)/$(basename $(@F))) type(*dspf) dspf($(basename $(notdir $(filter %.file,$^)))) msgf($(basename $(notdir $(filter %.msgf,$^)))) cmdlin(*none) dspkey(*no)"
461
+ 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,$^))) cmdlin(*none) dspkey(*no)"
418
462
  EOF
419
463
  touch '$@'
420
464
  endef
@@ -431,13 +475,13 @@ platform-clean:
431
475
  rm -rf tmp/logs
432
476
  rm -rf tmp/codermake_*.tar
433
477
  rm -rf tmp/rpg-pp-*
434
- @if [ -n "$(TARGETS)" ]; then
478
+ @if [ -n "$(call shell_escape_dollars,$(TARGETS))" ]; then
435
479
  $(SSH) $(QSHELL) <<EOF
436
480
  # Two passes over all targets so dependent objects (e.g. SQL views/indexes
437
481
  # over a table) get deleted in the first pass, freeing the underlying object
438
482
  # for deletion in the second pass.
439
483
  for pass in 1 2; do
440
- for target in $(TARGETS); do
484
+ for target in $(call remote_shell_escape_dollars,$(TARGETS)); do
441
485
  # Strip "build/" prefix to get the relative portion.
442
486
  rel="\$${target#build/}"
443
487
  if [ "\$$rel" = "\$$target" ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profoundlogic/codermake",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
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",
@@ -163,6 +163,10 @@ ENDPGMEXP
163
163
  | `.pf` | `.file` | Physical File (*FILE) | `CRTPF` |
164
164
  | `.lf` | `.file` | Logical File (*FILE) | `CRTLF` |
165
165
  | `.prtf` | `.file` | Printer File (*FILE) | `CRTPRTF` |
166
+ | `.dspf38` | `.file` | Display File (*FILE) | `QSYS38/CRTDSPF` (System/38, `DSPF38` member) |
167
+ | `.pf38` | `.file` | Physical File (*FILE) | `QSYS38/CRTPF` (System/38, `PF38` member) |
168
+ | `.lf38` | `.file` | Logical File (*FILE) | `QSYS38/CRTLF` (System/38, `LF38` member) |
169
+ | `.prtf38` | `.file` | Printer File (*FILE) | `QSYS38/CRTPRTF` (System/38, `PRTF38` member) |
166
170
  | `.table.sql` | `.file` | SQL Table (*FILE) | `RUNSQLSTM` |
167
171
  | `.index.sql` | `.file` | SQL Index (*FILE) | `RUNSQLSTM` |
168
172
  | `.view.sql` | `.file` | SQL View (*FILE) | `RUNSQLSTM` |
@@ -87,9 +87,9 @@ For ILE CL (`CRTBNDCL`, `CRTCLMOD`), the listing structure is similar to RPG --
87
87
 
88
88
  For OPM CL (`CRTCLPGM`), the output is typically shorter and errors reference source sequence numbers.
89
89
 
90
- ## DDS listings (.dspf, .pf, .lf, .prtf)
90
+ ## DDS listings (.dspf, .pf, .lf, .prtf, and their System/38 `.dspf38`/`.pf38`/`.lf38`/`.prtf38` variants)
91
91
 
92
- DDS compilation errors from `CRTDSPF`, `CRTPF`, `CRTLF`, or `CRTPRTF` produce `CPD` messages:
92
+ DDS compilation errors from `CRTDSPF`, `CRTPF`, `CRTLF`, or `CRTPRTF` produce `CPD` messages. The System/38 `.dspf38`, `.pf38`, `.lf38`, and `.prtf38` variants use the corresponding `QSYS38/...` commands.
93
93
 
94
94
  ```
95
95
  CPD7302 30 Record format SCREEN1 not found in file referenced.