@profoundlogic/codermake 1.0.2 → 1.2.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 +32 -0
- package/dist/bin/index.js +1 -1
- 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/ssh.js +1 -1
- package/dist/lib/writer.js +1 -1
- package/dist/makefiles/ibmi.mk +63 -6
- package/dist/makefiles/unix.mk +65 -2
- package/package.json +2 -1
- package/skills/codermake/SKILL.md +201 -0
- package/skills/codermake/references/compile-listings.md +141 -0
- package/skills/codermake/references/file-types.md +243 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# File Types Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for all source and object types supported by codermake. Each entry shows the Rules.mk syntax and the IBM i CL command used to compile it.
|
|
4
|
+
|
|
5
|
+
## Programs (.pgm)
|
|
6
|
+
|
|
7
|
+
### RPG program from .rpgle
|
|
8
|
+
|
|
9
|
+
Compiles an ILE RPG source file into a bound program.
|
|
10
|
+
|
|
11
|
+
```makefile
|
|
12
|
+
mypgm.pgm: mypgm.rpgle
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**CL command:** `CRTBNDRPG PGM(LIB/MYPGM) SRCSTMF('src/mypgm.rpgle')`
|
|
16
|
+
|
|
17
|
+
### SQL RPG program from .sqlrpgle
|
|
18
|
+
|
|
19
|
+
Compiles an RPG source file with embedded SQL into a bound program. Two-phase compilation: SQL precompile, then RPG compile.
|
|
20
|
+
|
|
21
|
+
```makefile
|
|
22
|
+
mypgm.pgm: mypgm.sqlrpgle
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**CL command:** `CRTSQLRPGI OBJ(LIB/MYPGM) OBJTYPE(*PGM) SRCSTMF('src/mypgm.sqlrpgle')`
|
|
26
|
+
|
|
27
|
+
### ILE CL program from .clle
|
|
28
|
+
|
|
29
|
+
Compiles an ILE CL source file into a bound program.
|
|
30
|
+
|
|
31
|
+
```makefile
|
|
32
|
+
mypgm.pgm: mypgm.clle
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**CL command:** `CRTBNDCL PGM(LIB/MYPGM) SRCSTMF('src/mypgm.clle')`
|
|
36
|
+
|
|
37
|
+
### OPM CL program from .clp or .cl
|
|
38
|
+
|
|
39
|
+
Compiles an OPM CL source file into a program. Uses source members (not stream files). OPM CL cannot be compiled to modules.
|
|
40
|
+
|
|
41
|
+
```makefile
|
|
42
|
+
mypgm.pgm: mypgm.clp
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**CL command:** `CRTCLPGM PGM(LIB/MYPGM) SRCFILE(LIB/QCLSRC)`
|
|
46
|
+
|
|
47
|
+
### SQL procedure from .proc.sql
|
|
48
|
+
|
|
49
|
+
Runs a SQL DDL script that creates a stored procedure. The resulting object appears as a program.
|
|
50
|
+
|
|
51
|
+
```makefile
|
|
52
|
+
getcount.pgm: getcount.proc.sql
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**CL command:** `RUNSQLSTM SRCSTMF('src/getcount.proc.sql') COMMIT(*NONE) DFTRDBCOL(LIB)`
|
|
56
|
+
|
|
57
|
+
### Program from modules
|
|
58
|
+
|
|
59
|
+
Links one or more compiled modules into a program. All prerequisites must be `.module` targets.
|
|
60
|
+
|
|
61
|
+
```makefile
|
|
62
|
+
mypgm.pgm: mod1.module mod2.module
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**CL command:** `CRTPGM PGM(LIB/MYPGM) MODULE(LIB/MOD1 LIB/MOD2)`
|
|
66
|
+
|
|
67
|
+
## Modules (.module)
|
|
68
|
+
|
|
69
|
+
Modules are intermediate compile units that are linked into programs or service programs.
|
|
70
|
+
|
|
71
|
+
### RPG module from .rpgle
|
|
72
|
+
|
|
73
|
+
```makefile
|
|
74
|
+
mymod.module: mymod.rpgle
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**CL command:** `CRTRPGMOD MODULE(LIB/MYMOD) SRCSTMF('src/mymod.rpgle')`
|
|
78
|
+
|
|
79
|
+
### SQL RPG module from .sqlrpgle
|
|
80
|
+
|
|
81
|
+
```makefile
|
|
82
|
+
mymod.module: mymod.sqlrpgle
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**CL command:** `CRTSQLRPGI OBJ(LIB/MYMOD) OBJTYPE(*MODULE) SRCSTMF('src/mymod.sqlrpgle')`
|
|
86
|
+
|
|
87
|
+
### ILE CL module from .clle
|
|
88
|
+
|
|
89
|
+
```makefile
|
|
90
|
+
mymod.module: mymod.clle
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**CL command:** `CRTCLMOD MODULE(LIB/MYMOD) SRCSTMF('src/mymod.clle')`
|
|
94
|
+
|
|
95
|
+
## Service programs (.srvpgm)
|
|
96
|
+
|
|
97
|
+
A service program is created from one or more modules plus an export list (`.exports` file). The export list defines which procedures are visible to callers.
|
|
98
|
+
|
|
99
|
+
```makefile
|
|
100
|
+
mymod.module: mymod.rpgle
|
|
101
|
+
mysrvpgm.srvpgm: mymod.module mysrvpgm.exports
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**CL command:** `CRTSRVPGM SRVPGM(LIB/MYSRVPGM) MODULE(LIB/MYMOD) EXPORT(*SRCFILE) SRCSTMF('src/mysrvpgm.exports')`
|
|
105
|
+
|
|
106
|
+
### .exports file format
|
|
107
|
+
|
|
108
|
+
The exports file is a plain text file with the following structure:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
STRPGMEXP PGMLVL(*CURRENT) SIGNATURE(*GEN)
|
|
112
|
+
EXPORT SYMBOL("procedureName")
|
|
113
|
+
EXPORT SYMBOL("anotherProc")
|
|
114
|
+
ENDPGMEXP
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
List every procedure that callers should be able to invoke. Procedure names are case-sensitive and must match the RPG prototype names exactly.
|
|
118
|
+
|
|
119
|
+
## Files (.file)
|
|
120
|
+
|
|
121
|
+
The `.file` target extension covers several distinct IBM i object types, differentiated by the source extension.
|
|
122
|
+
|
|
123
|
+
### Display file from .dspf
|
|
124
|
+
|
|
125
|
+
Creates a display file from DDS source.
|
|
126
|
+
|
|
127
|
+
```makefile
|
|
128
|
+
myscreen.file: myscreen.dspf
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**CL command:** `CRTDSPF FILE(LIB/MYSCREEN) SRCFILE(LIB/QDDSSRC)`
|
|
132
|
+
|
|
133
|
+
### Rich Display File from .json
|
|
134
|
+
|
|
135
|
+
Creates a display file from Profound UI Rich Display File JSON. The JSON is converted to DDS before compilation.
|
|
136
|
+
|
|
137
|
+
```makefile
|
|
138
|
+
myscreen.file: myscreen.json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**CL command:** `CRTDSPF FILE(LIB/MYSCREEN) SRCFILE(LIB/QDDSSRC) ENHDSP(*YES)`
|
|
142
|
+
|
|
143
|
+
### Physical file from .pf
|
|
144
|
+
|
|
145
|
+
Creates a physical file from DDS source.
|
|
146
|
+
|
|
147
|
+
```makefile
|
|
148
|
+
custdata.file: custdata.pf
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**CL command:** `CRTPF FILE(LIB/CUSTDATA) SRCFILE(LIB/QDDSSRC)`
|
|
152
|
+
|
|
153
|
+
### Logical file from .lf
|
|
154
|
+
|
|
155
|
+
Creates a logical file (view/index over a physical file) from DDS source. Typically depends on the physical file it references.
|
|
156
|
+
|
|
157
|
+
```makefile
|
|
158
|
+
custview.file: custview.lf custdata.file
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**CL command:** `CRTLF FILE(LIB/CUSTVIEW) SRCFILE(LIB/QDDSSRC)`
|
|
162
|
+
|
|
163
|
+
### Printer file from .prtf
|
|
164
|
+
|
|
165
|
+
Creates a printer file from DDS source.
|
|
166
|
+
|
|
167
|
+
```makefile
|
|
168
|
+
report.file: report.prtf
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**CL command:** `CRTPRTF FILE(LIB/REPORT) SRCFILE(LIB/QDDSSRC)`
|
|
172
|
+
|
|
173
|
+
### SQL table from .table.sql
|
|
174
|
+
|
|
175
|
+
Creates a SQL table by running a DDL script.
|
|
176
|
+
|
|
177
|
+
```makefile
|
|
178
|
+
employee.file: employee.table.sql
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**CL command:** `RUNSQLSTM SRCSTMF('src/employee.table.sql') COMMIT(*NONE) DFTRDBCOL(LIB)`
|
|
182
|
+
|
|
183
|
+
### SQL index from .index.sql
|
|
184
|
+
|
|
185
|
+
Creates a SQL index by running a DDL script. Typically depends on the table it indexes.
|
|
186
|
+
|
|
187
|
+
```makefile
|
|
188
|
+
empname.file: empname.index.sql employee.file
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**CL command:** `RUNSQLSTM SRCSTMF('src/empname.index.sql') COMMIT(*NONE) DFTRDBCOL(LIB)`
|
|
192
|
+
|
|
193
|
+
## Menus (.menu)
|
|
194
|
+
|
|
195
|
+
A menu object requires both a display file and a message file.
|
|
196
|
+
|
|
197
|
+
```makefile
|
|
198
|
+
mymenu.menu: mymenu.file mymenu.msgf
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**CL command:** `CRTMNU MENU(LIB/MYMENU) TYPE(*DSPF) DSPF(LIB/MYMENU) MSGF(LIB/MYMENU)`
|
|
202
|
+
|
|
203
|
+
## Message files (.msgf)
|
|
204
|
+
|
|
205
|
+
Message files use the dual-purpose pattern: the `.msgf` extension is both the source and the target. The source file contains CL commands that create and populate the message file.
|
|
206
|
+
|
|
207
|
+
```makefile
|
|
208
|
+
# Build the message file
|
|
209
|
+
appmsg.msgf: appmsg.msgf
|
|
210
|
+
|
|
211
|
+
# Use as a dependency (treated as a built object)
|
|
212
|
+
mymenu.menu: mymenu.file appmsg.msgf
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Typical source content (src/appmsg.msgf):**
|
|
216
|
+
|
|
217
|
+
```cl
|
|
218
|
+
CRTMSGF MSGF($LIBRARY/$NAME)
|
|
219
|
+
ADDMSGD MSGID(MSG0001) MSGF($LIBRARY/$NAME) MSG('First message') SECLVL('Detail text')
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
The `$LIBRARY` and `$NAME` variables are set automatically by codermake at build time.
|
|
223
|
+
|
|
224
|
+
## Binding directories (.bnddir)
|
|
225
|
+
|
|
226
|
+
Binding directories also use the dual-purpose pattern. The source file contains CL commands that create the binding directory and add entries to it.
|
|
227
|
+
|
|
228
|
+
```makefile
|
|
229
|
+
# Build the binding directory (order-only dep ensures srvpgm exists first)
|
|
230
|
+
mybnddir.bnddir: mybnddir.bnddir | mysrvpgm.srvpgm
|
|
231
|
+
|
|
232
|
+
# Use as order-only dependency
|
|
233
|
+
mypgm.pgm: mypgm.rpgle mysrvpgm.srvpgm | mybnddir.bnddir
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Typical source content (src/mybnddir.bnddir):**
|
|
237
|
+
|
|
238
|
+
```cl
|
|
239
|
+
CRTBNDDIR BNDDIR($LIBRARY/$NAME)
|
|
240
|
+
ADDBNDDIRE BNDDIR($LIBRARY/$NAME) OBJ(($LIBRARY/MYSRVPGM *SRVPGM))
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Binding directories are almost always used as order-only prerequisites (`|`) because they must exist at compile time but should not trigger rebuilds when their content changes.
|