Hi Jack,
On 3/29/2022 11:14 AM, Jack Woehr via WDSCI-L wrote:
Exactly. The only thing I haven't found is how to compile DDS from IFS.
We use GNU Make. (BOB is based on GNU Make as well) and we are able to
compile DDS from the IFS.. our Makefile works by copying the DDS to a
temporary source member, and then compiling it.
Here's a simple Makefile to demonstrate (there's a lot more going on in
our actual Makefile -- but this will give you the gist of it)
.SECONDEXPANSION:
.ONESHELL:
SHELL = /usr/bin/qsh
.SHELLFLAGS = -ec
LIBRARY ?= MYLIB
ILIBRARY := /qsys.lib/$(LIBRARY).lib
ISRCFILE := $(ILIBRARY)/$(TMPSRC).file
TMPSRC := tmpsrc
SRCFILE := srcfile($(LIBRARY)/$(TMPSRC)) srcmbr($(TMPSRC))
SRCFILE2 := $(LIBRARY)/$(TMPSRC)($(TMPSRC))
SRCFILE3 := file($(LIBRARY)/$(TMPSRC)) mbr($(TMPSRC))
OWNER := qpgmr
TARGETS := MYFILE.file
# Uncomment to make a reference file that's required for
# building the file
#MYFILE.file_deps := $(addprefix $(ILIBRARY)/, REFFILE.file)
# prefix all targets with the IFS location
TARGETS := $(addprefix $(ILIBRARY)/, $(TARGETS))
all: $(TARGETS)
# recipe to create a temporary source file. Used to build objects that can't
# normally be built from IFS source
$(ISRCFILE): | $(ILIBRARY)
-system 'crtsrcpf rcdlen(250) $(SRCFILE3)'
# recipe for building a display file from DDS
$(ILIBRARY)/%.file: %.dspf | $$($$*.file_deps) $(ISRCFILE)
rm -rf '$(@)'
cat '$(<)' | Rfile -wQ '$(SRCFILE2)'
liblist -fa $(LIBRARY) || true
system 'crtdspf file($(LIBRARY)/$(*F)) $(SRCFILE)'
system "chgobjown obj($(LIBRARY)/$(basename $(@F))) objtype(*$(subst
.,,$(suffix $(@F)))) newown($(OWNER)) curownaut(*revoke)"
system "grtobjaut obj($(LIBRARY)/$(basename $(@F))) objtype(*$(subst
.,,$(suffix $(@F)))) user(*public) aut(*use) replace(*yes)"
As an Amazon Associate we earn from qualifying purchases.