Skip to content

Commit 261a1f4

Browse files
committed
Move qsrvsrc.srcpf dependency to xmlstoredp.srvpgm
Creating the service program depends on the QSRVSRC file existing, while creating the modules themselves do not, so move the dependency to where it belongs. Unfortunately, we cannot use the implicit variable $^ for our list of modules anymore as it now contains the srcpf, so move the module list to a variable we can refer to.
1 parent cf5acd1 commit 261a1f4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Makefile.in

+6-4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ TEST_SRVPGMS=\
3838
zzsrv.srvpgm \
3939
zzsrv6.srvpgm
4040

41+
XMLSTOREDP_MODULES=xmlstoredp.module $(COMMON)
42+
4143
# Ensure that intermediate files created by rules chains don't get
4244
# automatically deleted
4345
.PRECIOUS: %.module %.srcpf %.lib
@@ -70,9 +72,9 @@ xmlver.pgm: xmlver.module
7072
xmlcgi.pgm: xmlcgi.module $(COMMON)
7173
system -q "CRTPGM PGM($(LIBRARY)/$(@:%.pgm=%)) MODULE($(^:%.module=$(LIBRARY)/%)) BNDSRVPGM(QHTTPSVR/QZSRCORE)" && touch $@
7274

73-
xmlstoredp.srvpgm: xmlstoredp.module $(COMMON)
75+
xmlstoredp.srvpgm: qsrvsrc.srcpf $(XMLSTOREDP_MODULES)
7476
system -q "CPYFRMSTMF FROMSTMF('src/$(@:%.srvpgm=%).bnd') TOMBR('/qsys.lib/$(LIBRARY).lib/qsrvsrc.file/$(@:%.srvpgm=%).mbr') MBROPT(*REPLACE)"
75-
system -q "CRTSRVPGM SRVPGM($(LIBRARY)/$(@:%.srvpgm=%)) MODULE($(^:%.module=$(LIBRARY)/%)) EXPORT(*SRCFILE) SRCFILE($(LIBRARY)/QSRVSRC) ACTGRP(*CALLER)" && touch $@
77+
system -q "CRTSRVPGM SRVPGM($(LIBRARY)/$(@:%.srvpgm=%)) MODULE($(XMLSTOREDP_MODULES:%.module=$(LIBRARY)/%)) EXPORT(*SRCFILE) SRCFILE($(LIBRARY)/QSRVSRC) ACTGRP(*CALLER)" && touch $@
7678

7779
%.pgm: src/%.clp qclsrc.srcpf
7880
system -q "CPYFRMSTMF FROMSTMF('$<') TOMBR('/qsys.lib/$(LIBRARY).lib/qclsrc.file/$*.mbr') MBROPT(*REPLACE)"
@@ -88,14 +90,14 @@ xmlstoredp.srvpgm: xmlstoredp.module $(COMMON)
8890
%.sqlinst: src/%.sql
8991
system -q "RUNSQLSTM SRCSTMF('$<')" && touch $@
9092

91-
%.module: src/%.rpgle qsrvsrc.srcpf
93+
%.module: src/%.rpgle
9294
system "CRTRPGMOD MODULE($(LIBRARY)/$*) SRCSTMF('$<') DBGVIEW($(DBGVIEW)) REPLACE(*YES) TGTCCSID(37)" > $*.log 2> $*.msg && rm $*.log $*.msg || touch $*.failed
9395
test ! -e $*.msg || cat $*.msg
9496
test ! -e $*.log || ./parse.sh $*.log
9597
if [ -e $*.failed ]; then rm $*.failed; exit 1; fi
9698
touch $@
9799

98-
%.module: src/%.rpglesql qsrvsrc.srcpf
100+
%.module: src/%.rpglesql
99101
system "CRTSQLRPGI OBJ($(LIBRARY)/$*) SRCSTMF('$<') OBJTYPE(*MODULE) REPLACE(*YES) RPGPPOPT(*LVL2) COMPILEOPT('INCDIR(''src/'') TGTCCSID(37)')" > $*.log 2> $*.msg && rm $*.log $*.msg || touch $*.failed
100102
test ! -e $*.msg || cat $*.msg
101103
test ! -e $*.log || ./parse.sh $*.log

0 commit comments

Comments
 (0)