From bd165f31b60c343ef1481280d47a9b5341cb5589 Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Fri, 7 Oct 2022 00:34:40 -0400 Subject: [PATCH 01/14] Using INCDIR for RPGMOD, BNDCL, SQLRPGIMOD Signed-off-by: edmundreinhardt --- mk/def_rules.mk | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/mk/def_rules.mk b/mk/def_rules.mk index 5c7587a..5927e21 100644 --- a/mk/def_rules.mk +++ b/mk/def_rules.mk @@ -128,6 +128,7 @@ BNDCL_ACTGRP := $(ACTGRP) BNDCL_AUT := $(AUT) BNDCL_DBGVIEW := $(DBGVIEW) BNDCL_DFTACTGRP := $(DFTACTGRP) +BNDCL_INCDIR := $(INCDIR) BNDCL_OPTION := $(OPTION) BNDCL_TGTRLS := $(TGTRLS) @@ -135,9 +136,10 @@ BNDRPG_ACTGRP := $(ACTGRP) BNDRPG_AUT := $(AUT) BNDRPG_DBGVIEW := $(DBGVIEW) BNDRPG_DFTACTGRP := $(DFTACTGRP) +BNDRPG_INCDIR := $(INCDIR) BNDRPG_OPTION := $(OPTION) BNDRPG_TGTRLS := $(TGTRLS) -BNDRPG_INCDIR := $(INCDIR) + CMD_AUT := $(AUT) CMD_HLPID = $(basename $@) @@ -250,10 +252,10 @@ SRVPGM_TGTRLS := $(TGTRLS) WSCST_AUT := $(AUT) # Creation command parameters with variables (the ones listed at the top) for the most common ones. -CRTCLMODFLAGS = AUT($(AUT)) DBGVIEW($(DBGVIEW)) OPTION($(OPTION)) TEXT('$(TEXT)') TGTRLS($(TGTRLS)) INCDIR('$(INCDIR)') +CRTCLMODFLAGS = AUT($(AUT)) DBGVIEW($(DBGVIEW)) OPTION($(OPTION)) TEXT('$(TEXT)') TGTRLS($(TGTRLS)) INCDIR($(INCDIR)) CRTCMDFLAGS = PGM($(PGM)) VLDCKR($(VLDCKR)) PMTFILE($(PMTFILE)) HLPPNLGRP($(HLPPNLGRP)) HLPID($(HLPID)) AUT($(AUT)) TEXT('$(TEXT)') CRTCMODFLAGS = TERASPACE($(TERASPACE)) STGMDL($(STGMDL)) OUTPUT(*PRINT) OPTION($(OPTION)) DBGVIEW($(DBGVIEW)) \ - SYSIFCOPT($(SYSIFCOPT)) AUT($(AUT)) TEXT('$(TEXT)') TGTCCSID($(TGTCCSID)) TGTRLS($(TGTRLS)) INCDIR('$(INCDIR)') + SYSIFCOPT($(SYSIFCOPT)) AUT($(AUT)) TEXT('$(TEXT)') TGTCCSID($(TGTCCSID)) TGTRLS($(TGTRLS)) INCDIR($(INCDIR)) CRTDSPFFLAGS = ENHDSP(*YES) RSTDSP($(RSTDSP)) DFRWRT(*YES) AUT($(AUT)) OPTION($(OPTION)) TEXT('$(TEXT)') CRTLFFLAGS = AUT($(AUT)) OPTION($(OPTION)) TEXT('$(TEXT)') CRTMNUFLAGS = AUT($(AUT)) OPTION($(OPTION)) CURLIB($(CURLIB)) PRDLIB($(PRDLIB)) TEXT('$(TEXT)') TYPE($(TYPE)) @@ -263,18 +265,18 @@ CRTPNLGRPFLAGS = AUT($(AUT)) OPTION($(OPTION)) TEXT('$(TEXT)') CRTCBLPGMFLAGS = OPTION($(OPTION)) TEXT('$(TEXT)') CRTPRTFFLAGS = AUT($(AUT)) OPTION($(OPTION)) PAGESIZE($(PAGESIZE)) TEXT('$(TEXT)') CRTRPGMODFLAGS = AUT($(AUT)) DBGVIEW($(DBGVIEW)) OPTION($(OPTION)) OUTPUT(*PRINT) TEXT('$(TEXT)') \ - TGTCCSID($(TGTCCSID)) TGTRLS($(TGTRLS)) INCDIR('$(INCDIR)') + TGTCCSID($(TGTCCSID)) TGTRLS($(TGTRLS)) INCDIR($(INCDIR)) CRTQMQRYFLAGS = AUT($(AUT)) TEXT('$(TEXT)') CRTSQLCIFLAGS = COMMIT($(COMMIT)) OBJTYPE($(OBJTYPE)) OUTPUT(*PRINT) TEXT('$(TEXT)') TGTRLS($(TGTRLS)) DBGVIEW($(DBGVIEW)) \ - COMPILEOPT('INCDIR(''$(INCDIR)'') OPTION($(OPTION)) STGMDL($(STGMDL)) SYSIFCOPT($(SYSIFCOPT)) \ + COMPILEOPT('INCDIR($(INCDIR)) OPTION($(OPTION)) STGMDL($(STGMDL)) SYSIFCOPT($(SYSIFCOPT)) \ TGTCCSID($(TGTCCSID)) TERASPACE($(TERASPACE)) CRTSQLRPGIFLAGS = COMMIT($(COMMIT)) OBJTYPE($(OBJTYPE)) OPTION($(OPTION)) OUTPUT(*PRINT) TEXT('$(TEXT)') \ TGTRLS($(TGTRLS)) DBGVIEW($(DBGVIEW)) RPGPPOPT($(RPGPPOPT)) \ - COMPILEOPT('TGTCCSID($(TGTCCSID)) INCDIR(''$(INCDIR)'')') + COMPILEOPT('TGTCCSID($(TGTCCSID)) INCDIR($(INCDIR))') CRTSRVPGMFLAGS = ACTGRP($(ACTGRP)) TEXT('$(TEXT)') TGTRLS($(TGTRLS)) AUT($(AUT)) DETAIL($(DETAIL)) STGMDL($(STGMDL)) CRTWSCSTFLAGS = AUT($(AUT)) TEXT('$(TEXT)') -CRTBNDRPGFLAGS:= DBGVIEW($(DBGVIEW)) TGTCCSID($(TGTCCSID)) OPTION($(OPTION)) TEXT('$(TEXT)') INCDIR('$(INCDIR)') -CRTBNDCFLAGS:=TGTCCSID($(TGTCCSID)) OPTION($(OPTION)) TEXT('$(TEXT)') INCDIR('$(INCDIR)') +CRTBNDRPGFLAGS:= DBGVIEW($(DBGVIEW)) TGTCCSID($(TGTCCSID)) OPTION($(OPTION)) TEXT('$(TEXT)') INCDIR($(INCDIR)) +CRTBNDCFLAGS:=TGTCCSID($(TGTCCSID)) OPTION($(OPTION)) TEXT('$(TEXT)') INCDIR($(INCDIR)) RUNSQLFLAGS:= DBGVIEW(*SOURCE) TGTRLS($(TGTRLS)) OUTPUT(*PRINT) MARGINS(1024) # Extra command string for adhoc addition of extra parameters to a creation command. @@ -478,6 +480,10 @@ moduleINCDIR = $(strip \ $(if $(filter %.c,$<),$(CMOD_INCDIR), \ $(if $(filter %.CLLE,$<),$(CLMOD_INCDIR), \ $(if $(filter %.clle,$<),$(CLMOD_INCDIR), \ + $(if $(filter %.RPGLE,$<),$(RPGMOD_INCDIR), \ + $(if $(filter %.rpgle,$<),$(RPGMOD_INCDIR), \ + $(if $(filter %.SQLRPGLE,$<),$(SQLRPGIMOD_INCDIR), \ + $(if $(filter %.sqlrpgle,$<),$(SQLRPGIMOD_INCDIR), \ $(if $(filter %.CBLLE,$<),$(CBLMOD_INCDIR), \ $(if $(filter %.cblle,$<),$(CBLMOD_INCDIR), \ $(if $(filter %.SQLC,$<),$(SQLCIMOD_INCDIR), \ @@ -792,7 +798,6 @@ endef # |_| |_|\___/|____/ \___/|_____|_____| |_| \_\___|\___|_| .__/ \___||___/ # |_| - define MODULE_VARIABLES $(eval AUT = $(moduleAUT))\ $(eval DBGVIEW = $(moduleDBGVIEW))\ From 409dbf42ddce69d7e941b0957dae861d7add84b7 Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Fri, 7 Oct 2022 11:34:19 -0400 Subject: [PATCH 02/14] fix closing paren on moduleINCDIR Signed-off-by: edmundreinhardt --- makei/build.py | 6 +++++- mk/def_rules.mk | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/makei/build.py b/makei/build.py index d429683..a8833f2 100644 --- a/makei/build.py +++ b/makei/build.py @@ -100,6 +100,10 @@ def map_ibmi_json_var(path): list(map(map_ibmi_json_var, subdirs)) + incdir ='*NONE'; + if (self.iproj_json.include_path.length < 1): + incdir=self.iproj_json.include_path + print('INCDIR='.join(incdir)) with target_file_path.open("w", encoding="utf8") as file: file.write('\n'.join(["# This file is generated by makei, DO NOT EDIT.", "# Modify .ibmi.json to override values", @@ -107,7 +111,7 @@ def map_ibmi_json_var(path): f"curlib := {self.iproj_json.curlib}", f"preUsrlibl := {' '.join(self.iproj_json.pre_usr_libl)}", f"postUsrlibl := {' '.join(self.iproj_json.post_usr_libl)}", - f"INCDIR := {' '.join(self.iproj_json.include_path)}", + f"INCDIR := {' '.join(incdir)}", f"IBMiEnvCmd := {self.ibmi_env_cmds}", f"COLOR_TTY := {'true' if self.color else 'false'}", "", diff --git a/mk/def_rules.mk b/mk/def_rules.mk index 5927e21..4f4f5db 100644 --- a/mk/def_rules.mk +++ b/mk/def_rules.mk @@ -488,7 +488,7 @@ moduleINCDIR = $(strip \ $(if $(filter %.cblle,$<),$(CBLMOD_INCDIR), \ $(if $(filter %.SQLC,$<),$(SQLCIMOD_INCDIR), \ $(if $(filter %.sqlc,$<),$(SQLCIMOD_INCDIR), \ - UNKNOWN_FILE_TYPE))))))))) + UNKNOWN_FILE_TYPE))))))))))))) moduleRPGPPOPT = $(strip \ $(if $(filter %.SQLRPGLE,$<),$(SQLRPGIMOD_RPGPPOPT), \ $(if $(filter %.sqlrpgle,$<),$(SQLRPGIMOD_RPGPPOPT), \ From 8bd5589478450f61227a32f93a31e0a4473c04de Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Fri, 7 Oct 2022 23:44:28 -0400 Subject: [PATCH 03/14] Improve calculating INCDIR Signed-off-by: edmundreinhardt --- makei/build.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/makei/build.py b/makei/build.py index a8833f2..50ea430 100644 --- a/makei/build.py +++ b/makei/build.py @@ -100,10 +100,13 @@ def map_ibmi_json_var(path): list(map(map_ibmi_json_var, subdirs)) - incdir ='*NONE'; - if (self.iproj_json.include_path.length < 1): - incdir=self.iproj_json.include_path - print('INCDIR='.join(incdir)) + # set build env variables based on iproj.json + # if not include_path specified just use INCDIR(*NONE) + # otherwise use INCDIR('dir1' 'dir2') + incdir ='*NONE'; + includePath = self.iproj_json.include_path; + if len(includePath): + incdir='\''+'\' \''.join(includePath)+'\'' with target_file_path.open("w", encoding="utf8") as file: file.write('\n'.join(["# This file is generated by makei, DO NOT EDIT.", "# Modify .ibmi.json to override values", @@ -111,13 +114,12 @@ def map_ibmi_json_var(path): f"curlib := {self.iproj_json.curlib}", f"preUsrlibl := {' '.join(self.iproj_json.pre_usr_libl)}", f"postUsrlibl := {' '.join(self.iproj_json.post_usr_libl)}", - f"INCDIR := {' '.join(incdir)}", + f"INCDIR := {incdir}", f"IBMiEnvCmd := {self.ibmi_env_cmds}", f"COLOR_TTY := {'true' if self.color else 'false'}", "", "", ])) - for subdir in subdirs: # print(dir_var_map[subdir].build) file.write( From c8e5f2de1779d28e1d5636579709a7505da51791 Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Tue, 11 Oct 2022 16:42:57 -0400 Subject: [PATCH 04/14] Double up ' for CRTSQLxI preprocessors INCDIR is included in a COMPILEOPTS parameter that is quoted string so its quotes need to be escaped Signed-off-by: edmundreinhardt --- .vscode/actions.json | 15 +++++++++++++++ mk/def_rules.mk | 9 ++++++--- scripts/makei | 1 - 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 .vscode/actions.json diff --git a/.vscode/actions.json b/.vscode/actions.json new file mode 100644 index 0000000..0ed427b --- /dev/null +++ b/.vscode/actions.json @@ -0,0 +1,15 @@ +[ + { + "name": "Build and deploy with bob 🔨", + "command": "/home/REINHARD/bob/makei build -e verlibcsy=&CURLIB", + "environment": "pase", + "deployFirst": true, + "extensions": [ + "GLOBAL" + ], + "postDownload": [ + ".logs/joblog.json", + ".logs/output.log" + ] + } +] \ No newline at end of file diff --git a/mk/def_rules.mk b/mk/def_rules.mk index 4f4f5db..551d993 100644 --- a/mk/def_rules.mk +++ b/mk/def_rules.mk @@ -268,11 +268,11 @@ CRTRPGMODFLAGS = AUT($(AUT)) DBGVIEW($(DBGVIEW)) OPTION($(OPTION)) OUTPUT(*PRINT TGTCCSID($(TGTCCSID)) TGTRLS($(TGTRLS)) INCDIR($(INCDIR)) CRTQMQRYFLAGS = AUT($(AUT)) TEXT('$(TEXT)') CRTSQLCIFLAGS = COMMIT($(COMMIT)) OBJTYPE($(OBJTYPE)) OUTPUT(*PRINT) TEXT('$(TEXT)') TGTRLS($(TGTRLS)) DBGVIEW($(DBGVIEW)) \ - COMPILEOPT('INCDIR($(INCDIR)) OPTION($(OPTION)) STGMDL($(STGMDL)) SYSIFCOPT($(SYSIFCOPT)) \ + COMPILEOPT('INCDIR($(addprefix ',$(addsuffix ',$(INCDIR)))) OPTION($(OPTION)) STGMDL($(STGMDL)) SYSIFCOPT($(SYSIFCOPT)) \ TGTCCSID($(TGTCCSID)) TERASPACE($(TERASPACE)) CRTSQLRPGIFLAGS = COMMIT($(COMMIT)) OBJTYPE($(OBJTYPE)) OPTION($(OPTION)) OUTPUT(*PRINT) TEXT('$(TEXT)') \ TGTRLS($(TGTRLS)) DBGVIEW($(DBGVIEW)) RPGPPOPT($(RPGPPOPT)) \ - COMPILEOPT('TGTCCSID($(TGTCCSID)) INCDIR($(INCDIR))') + COMPILEOPT('TGTCCSID($(TGTCCSID)) INCDIR($(addprefix ',$(addsuffix ',$(INCDIR))))') CRTSRVPGMFLAGS = ACTGRP($(ACTGRP)) TEXT('$(TEXT)') TGTRLS($(TGTRLS)) AUT($(AUT)) DETAIL($(DETAIL)) STGMDL($(STGMDL)) CRTWSCSTFLAGS = AUT($(AUT)) TEXT('$(TEXT)') CRTBNDRPGFLAGS:= DBGVIEW($(DBGVIEW)) TGTCCSID($(TGTCCSID)) OPTION($(OPTION)) TEXT('$(TEXT)') INCDIR($(INCDIR)) @@ -313,9 +313,12 @@ PREUSRLIBLPATH = $(call getLibPath,$(preUsrlibl)) POSTUSRLIBLPATH = $(call getLibPath,$(postUsrlibl)) CURLIBPATH = $(call getLibPath,$(curlib)) -VPATH = $(subst $(space),:,$(strip $(call uniq,$(INCDIR) $(PREUSRLIBLPATH) $(CURLIBPATH) $(POSTUSRLIBLPATH) $(OBJPATH) $(SRCPATH)))) +VPATH = $(subst $(space),:,$(strip $(call uniq,$(includePath) $(PREUSRLIBLPATH) $(CURLIBPATH) $(POSTUSRLIBLPATH) $(OBJPATH) $(SRCPATH)))) + + define PRESETUP = echo -e "$(crtcmd)"; \ +echo -e "VPATH=$(VPATH)"; \ curlib="$(curlib)" \ preUsrlibl="$(preUsrlibl)" \ postUsrlibl="$(postUsrlibl)" \ diff --git a/scripts/makei b/scripts/makei index e869409..d35fe3a 100755 --- a/scripts/makei +++ b/scripts/makei @@ -6,7 +6,6 @@ """ The CLI entry for BOB""" import argparse -from email.policy import default import json import os from pathlib import Path From 76abe6cbf56c3933f490e001bd43cbfda50f3c95 Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Thu, 13 Oct 2022 12:36:42 -0400 Subject: [PATCH 05/14] use lowercase file ext for compare Call crtfrmstmf directly for PGM.CLLE don't use launch unnecessarily Signed-off-by: edmundreinhardt --- mk/def_rules.mk | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mk/def_rules.mk b/mk/def_rules.mk index 551d993..f5697c4 100644 --- a/mk/def_rules.mk +++ b/mk/def_rules.mk @@ -46,10 +46,8 @@ endif empty := space :=$(empty) $(empty) uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) - -# The extractName and extractTextDescriptor are used to decompose the long filename into module name and -# the text descriptor. -# e.g. CUSTOME1-Customer_file.LF has `CUSTOME1` as the module name and `Customer file` as the text descriptor +#map input string to lowercase (only handles A-Z) +lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) # The following logs to stdout is parsed and used by the makei program. Check makei.BuildEnv.make before making changes! @@ -60,6 +58,9 @@ define logFail = $(call echo_error_cmd,"Failed to create $1!") endef +# The extractName and extractTextDescriptor are used to decompose the long filename into module name and +# the text descriptor. +# e.g. CUSTOME1-Customer_file.LF has `CUSTOME1` as the module name and `Customer file` as the text descriptor define extractName = echo '$(notdir $<)' | awk -F- '{ print $$1 }' endef @@ -277,6 +278,7 @@ CRTSRVPGMFLAGS = ACTGRP($(ACTGRP)) TEXT('$(TEXT)') TGTRLS($(TGTRLS)) AUT($(AUT)) CRTWSCSTFLAGS = AUT($(AUT)) TEXT('$(TEXT)') CRTBNDRPGFLAGS:= DBGVIEW($(DBGVIEW)) TGTCCSID($(TGTCCSID)) OPTION($(OPTION)) TEXT('$(TEXT)') INCDIR($(INCDIR)) CRTBNDCFLAGS:=TGTCCSID($(TGTCCSID)) OPTION($(OPTION)) TEXT('$(TEXT)') INCDIR($(INCDIR)) +CRTBNDCLFLAGS = AUT($(AUT)) DBGVIEW($(DBGVIEW)) OPTION($(OPTION)) TEXT('$(TEXT)') TGTRLS($(TGTRLS)) INCDIR($(INCDIR)) RUNSQLFLAGS:= DBGVIEW(*SOURCE) TGTRLS($(TGTRLS)) OUTPUT(*PRINT) MARGINS(1024) # Extra command string for adhoc addition of extra parameters to a creation command. @@ -443,11 +445,9 @@ fileSIZE = $(strip \ moduleAUT = $(strip \ $(if $(filter %.C,$<),$(CMOD_AUT), \ $(if $(filter %.c,$<),$(CMOD_AUT), \ - $(if $(filter %.CLLE,$<),$(CLMOD_AUT), \ - $(if $(filter %.clle,$<),$(CLMOD_AUT), \ - $(if $(filter %.RPGLE,$<),$(RPGMOD_AUT), \ - $(if $(filter %.rpgle,$<),$(RPGMOD_AUT), \ - UNKNOWN_FILE_TYPE))))))) + $(if $(filter %.clle,$(lc,$<)),$(CLMOD_AUT), \ + $(if $(filter %.rpgle,$(lc,$<)),$(RPGMOD_AUT), \ + UNKNOWN_FILE_TYPE))))) moduleDBGVIEW = $(strip \ $(if $(filter %.C,$<),$(CMOD_DBGVIEW), \ $(if $(filter %.c,$<),$(CMOD_DBGVIEW), \ @@ -844,7 +844,7 @@ define CLLE_TO_MODULE_RECIPE = @$(set_STMF_CCSID) $(eval crtcmd := "$(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTCLMOD" -p '"$(CRTCLMODFLAGS)"'") @$(PRESETUP) \ - $(SCRIPTSPATH)/launch "$(JOBLOGFILE)" "$(crtcmd)" >> $(LOGFILE) 2>&1 && $(call logSuccess,$@) || $(call logFail,$@) + $(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTCLMOD" -p '"$(CRTCLMODFLAGS)"' --save-joblog "$(JOBLOGFILE)" >> $(LOGFILE) 2>&1 && $(call logSuccess,$@) || $(call logFail,$@) @$(call EVFEVENT_DOWNLOAD,$*.evfevent) endef @@ -959,9 +959,9 @@ define PGM.CLLE_TO_PGM_RECIPE = $(PGM_VARIABLES) $(eval d = $($@_d)) @$(call echo_cmd,"=== Create ILE CL Program [$(basename $@)]") - $(eval crtcmd := CRTBNDCL srcstmf('$<') PGM($(OBJLIB)/$(basename $(@F))) $(CRTCLMODFLAGS)) + $(eval crtcmd := "$(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTBNDCL" -p '"$(CRTBNDCLFLAGS)"'") @$(PRESETUP) \ - $(SCRIPTSPATH)/launch "$(JOBLOGFILE)" "$(crtcmd)" >> $(LOGFILE) 2>&1 && $(call logSuccess,$@) || $(call logFail,$@) + $(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTBNDCL" -p "$(CRTBNDCLFLAGS)" --save-joblog "$(JOBLOGFILE)" >> $(LOGFILE) 2>&1 && $(call logSuccess,$@) || $(call logFail,$@) @$(call EVFEVENT_DOWNLOAD,$*.evfevent) endef From 2ee6d777033c337572b2879984f2555ff2fe1fa6 Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Thu, 13 Oct 2022 12:51:49 -0400 Subject: [PATCH 06/14] pytests for makeIncludeAbsolutePath Signed-off-by: edmundreinhardt --- .env | 1 + .vscode/settings.json | 7 +++++++ makei/tests/test_utils.py | 43 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 .env create mode 100644 .vscode/settings.json create mode 100644 makei/tests/test_utils.py diff --git a/.env b/.env new file mode 100644 index 0000000..f1d02ff --- /dev/null +++ b/.env @@ -0,0 +1 @@ +PYTHONPATH=makei \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..bf40b47 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "python.testing.pytestArgs": [ + "makei/tests" + ], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true +} \ No newline at end of file diff --git a/makei/tests/test_utils.py b/makei/tests/test_utils.py new file mode 100644 index 0000000..0e20cfb --- /dev/null +++ b/makei/tests/test_utils.py @@ -0,0 +1,43 @@ +from utils import makeIncludeDirsAbsolute + +def test_sanity(): + path = '/a/b/.logs/joblog.json' + parameters = " some stuff at the begginning aINCDIR ('PARAM1' 'PARAM2' ''PARAM3'' 'PARAM4' )and some stuff after " + expected = " some stuff at the begginning aINCDIR ('/a/b/PARAM1' '/a/b/PARAM2' ''/a/b/PARAM3'' '/a/b/PARAM4')and some stuff after " + assert makeIncludeDirsAbsolute(path, parameters) == expected + +def test_empty_params(): + path = '/a/b/.logs/joblog.json' + parameters = " INCDIR ('' '''')" + expected = " INCDIR ('/a/b/' ''/a/b/'')" + assert makeIncludeDirsAbsolute(path, parameters) == expected + +def test_longer_job_log_path(): + path = '/a/b/cd/efg/hijklmnop/.logs/joblog.json' + parameters = " INCDIR( 'dir1' ''dir2'')" + expected = " INCDIR('/a/b/cd/efg/hijklmnop/dir1' ''/a/b/cd/efg/hijklmnop/dir2'')" + assert makeIncludeDirsAbsolute(path, parameters) == expected + +def test_doesnt_modify_absolute_path(): + path = '/a/b/cd/efg/hijklmnop/.logs/joblog.json' + parameters = " INCDIR( '/a/b/dir1' ''dir2'')" + expected = " INCDIR('/a/b/dir1' ''/a/b/cd/efg/hijklmnop/dir2'')" + assert makeIncludeDirsAbsolute(path, parameters) == expected + +def test_doesnt_modify_absolute_path_with_double_quotes(): + path = '/a/b/cd/efg/hijklmnop/.logs/joblog.json' + parameters = " INCDIR( ''/a/b/dir1'' ''dir2'')" + expected = " INCDIR(''/a/b/dir1'' ''/a/b/cd/efg/hijklmnop/dir2'')" + assert makeIncludeDirsAbsolute(path, parameters) == expected + +def test_no_preceding_path_before_logs(): + path = '/.logs/joblog.json' + parameters = " INCDIR('dir2')" + expected = " INCDIR('/dir2')" + assert makeIncludeDirsAbsolute(path, parameters) == expected + +def test_joblob_not_found(): + path = '/a/b/cd/efg/hijklmnop/.logs/joblogs.json' + parameters = " INCDIR( ''/a/b/dir1'' ''dir2'')" + expected = " INCDIR(''/a/b/dir1'' ''dir2'')" + assert makeIncludeDirsAbsolute(path, parameters) == expected \ No newline at end of file From 98853f86b09f0174eb1f3e27201637bda170646f Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Thu, 13 Oct 2022 12:53:16 -0400 Subject: [PATCH 07/14] code for makeIncludeDirsAbsolute needed for CLLE because crtfrmstmf doesn't have current directory set So by qualifying each include dir, we can still find the includes in them Signed-off-by: edmundreinhardt --- makei/crtfrmstmf.py | 7 ++++++- makei/utils.py | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/makei/crtfrmstmf.py b/makei/crtfrmstmf.py index 7d99ea5..45364dd 100755 --- a/makei/crtfrmstmf.py +++ b/makei/crtfrmstmf.py @@ -9,7 +9,7 @@ from datetime import datetime sys.path.append(str(Path(__file__).resolve().parent.parent)) # nopep8 from makei.ibm_job import IBMJob, save_joblog_json # nopep8 -from makei.utils import format_datetime, objlib_to_path, validate_ccsid # nopep8 +from makei.utils import format_datetime, objlib_to_path, validate_ccsid, makeIncludeDirsAbsolute # nopep8 COMMAND_MAP = {'CRTCMD': 'CMD', @@ -76,6 +76,11 @@ def __init__(self, srcstmf: str, obj: str, lib: str, cmd: str, tgtCcsid: Optiona self.back_up_obj_list = [(self.obj, self.lib, self.obj_type)] else: self.back_up_obj_list = [] + # Need project path for include resolution + # prepend project path to every directory in INCDIR in compile parameters + if (joblog_path and parameters): + parameters = makeIncludeDirsAbsolute(joblog_path, parameters) + self.parameters = parameters def run(self): success = False diff --git a/makei/utils.py b/makei/utils.py index af0a4b8..a870948 100644 --- a/makei/utils.py +++ b/makei/utils.py @@ -300,6 +300,46 @@ def replace_file_content(file_path: Path, replace: Callable[[str], str]): #Move new file move(abs_path, file_path) +def makeIncludeDirsAbsolute(jobLogPath: str, parameters: str ): + """ + Return modified parameters if it includes INCDIR + joblog_path is the full qualified path to the joblog.json. + it is assumed that the joblog.json path is of the form + '/.logs/joblog.json' + parameters is the string containing all parameters to the compile command + it may contain a substring of the form INCDIR('dir' 'dir2') + if so we want to return the same parameters string with the INCDIR + of INCDIR('/dir' '/dir2') + Note it is possible to have INCDIR(''dir1'' ''dir2'') + """ + try: + indexOfJobLogSubstr = jobLogPath.index('.logs/joblog.json') + curDir = jobLogPath[0:indexOfJobLogSubstr] + except: + curDir = None + + includePath = [] + incDirKeyWordIndex = parameters.index('INCDIR') + startOfIncDir = parameters.index('(', incDirKeyWordIndex) + endOfIncDir = parameters.index(')', startOfIncDir) + includePathStr = parameters[startOfIncDir + 1: endOfIncDir] + includePath = includePathStr.split() + + for i in range(len(includePath)): + relativePath = includePath[i][1] != '/' and not (len(includePath[i]) > 3 and includePath[i][1] == "'" and includePath[i][2] == "/") + enclosedByQuotes = includePath[i][1] == "'" and len(includePath[i]) > 2 + + if relativePath and curDir: + if enclosedByQuotes: + includePathDir = includePath[i][2:-2] + includePath[i] = "''" + curDir + includePathDir + "''" + else: + includePathDir = includePath[i][1:-1] + includePath[i] = "'" + curDir + includePathDir + "'" + + startOfParamString = parameters[0:startOfIncDir + 1] + endOfParamString = parameters[endOfIncDir:] + return startOfParamString + " ".join(includePath) + endOfParamString if __name__ == "__main__": import doctest From ddf508a9faacc6619741f677e8e79149784248bb Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Thu, 13 Oct 2022 16:14:18 -0400 Subject: [PATCH 08/14] ignore pytest_cache make actions.js generic Signed-off-by: edmundreinhardt --- .gitignore | 1 + .vscode/actions.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f129474..3d0d2ee 100644 --- a/.gitignore +++ b/.gitignore @@ -49,5 +49,6 @@ Temporary Items # python # Byte-compiled / optimized / DLL files __pycache__/ +.pytest_cache/ *.py[cod] *$py.class diff --git a/.vscode/actions.json b/.vscode/actions.json index 0ed427b..ad544f1 100644 --- a/.vscode/actions.json +++ b/.vscode/actions.json @@ -1,7 +1,7 @@ [ { "name": "Build and deploy with bob 🔨", - "command": "/home/REINHARD/bob/makei build -e verlibcsy=&CURLIB", + "command": "/QOpenSys/pkgs/bin/makei build -e verlibcsy=&CURLIB", "environment": "pase", "deployFirst": true, "extensions": [ From 75e7c962ae1716306c097a45eb9981bcf059cf04 Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Fri, 14 Oct 2022 11:26:18 -0400 Subject: [PATCH 09/14] support compiling of lowercase filenames Signed-off-by: edmundreinhardt --- makei/utils.py | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/makei/utils.py b/makei/utils.py index a870948..22b9817 100644 --- a/makei/utils.py +++ b/makei/utils.py @@ -262,17 +262,21 @@ def get_target_from_filename(filename: str) -> str: """Returns the target from the filename """ name, _, ext, _ = decompose_filename(filename) - return f'{name}.{FILE_TARGET_MAPPING[ext]}' + return f'{name.upper()}.{FILE_TARGET_MAPPING[ext]}' def get_compile_targets_from_filenames(filenames: List[str]) -> List[str]: """ Returns the possible target name for the given filename >>> get_compile_targets_from_filenames(["test.PGM.RPGLE"]) - ['test.PGM'] + ['TEST.PGM'] + >>> get_compile_targets_from_filenames(["test.pgm.rpgle"]) + ['TEST.PGM'] >>> get_compile_targets_from_filenames(["test.RPGLE"]) - ['test.MODULE'] + ['TEST.MODULE'] + >>> get_compile_targets_from_filenames(["vat300.rpgle"]) + ['VAT300.MODULE'] >>> get_compile_targets_from_filenames(["functionsVAT/VAT300.RPGLE", "test.RPGLE"]) - ['VAT300.MODULE', 'test.MODULE'] + ['VAT300.MODULE', 'TEST.MODULE'] >>> get_compile_targets_from_filenames(["ART200-Work_with_article.PGM.SQLRPGLE", "SGSMSGF.MSGF"]) ['ART200.PGM', 'SGSMSGF.MSGF'] """ @@ -302,15 +306,31 @@ def replace_file_content(file_path: Path, replace: Callable[[str], str]): def makeIncludeDirsAbsolute(jobLogPath: str, parameters: str ): """ - Return modified parameters if it includes INCDIR + Return modified parameters with absolute dirs if it includes INCDIR joblog_path is the full qualified path to the joblog.json. - it is assumed that the joblog.json path is of the form - '/.logs/joblog.json' - parameters is the string containing all parameters to the compile command - it may contain a substring of the form INCDIR('dir' 'dir2') - if so we want to return the same parameters string with the INCDIR - of INCDIR('/dir' '/dir2') + Assumed that the joblog.json path is of the form + '/.logs/joblog.json' + parameters is a string containing all parameters to the compile command + may contain a substring of the form INCDIR('dir' 'dir2') + return: the same parameters string with the INCDIR replaced + to INCDIR('/dir' '/dir2') Note it is possible to have INCDIR(''dir1'' ''dir2'') + + >>> makeIncludeDirsAbsolute('/a/b/.logs/joblog.json', " PARM1( beginning)INCDIR ('PARAM1' 'PARAM2' ''PARAM3'' 'PARAM4' )parm2( after ) ") + " PARM1( beginning)INCDIR ('/a/b/PARAM1' '/a/b/PARAM2' ''/a/b/PARAM3'' '/a/b/PARAM4')parm2( after ) " + >>> makeIncludeDirsAbsolute('/a/b/.logs/joblog.json', "INCDIR ('' '''')") + "INCDIR ('/a/b/' ''/a/b/'')" + >>> makeIncludeDirsAbsolute('/a/b/cd/efg/hijklmnop/.logs/joblog.json', " INCDIR( 'dir1' ''dir2'')") + " INCDIR('/a/b/cd/efg/hijklmnop/dir1' ''/a/b/cd/efg/hijklmnop/dir2'')" + >>> makeIncludeDirsAbsolute('/a/b/cd/efg/hijklmnop/.logs/joblog.json', " INCDIR( '/a/b/dir1' ''dir2'')") + " INCDIR('/a/b/dir1' ''/a/b/cd/efg/hijklmnop/dir2'')" + >>> makeIncludeDirsAbsolute('/a/b/cd/efg/hijklmnop/.logs/joblog.json', " INCDIR( ''/a/b/dir1'' ''dir2'')") + " INCDIR(''/a/b/dir1'' ''/a/b/cd/efg/hijklmnop/dir2'')" + >>> makeIncludeDirsAbsolute('/.logs/joblog.json', " INCDIR('dir2')") + " INCDIR('/dir2')" + >>> makeIncludeDirsAbsolute('/a/b/cd/efg/hijklmnop/.logs/joblogs.json', " INCDIR( ''/a/b/dir1'' ''dir2'')") + " INCDIR(''/a/b/dir1'' ''dir2'')" + """ try: indexOfJobLogSubstr = jobLogPath.index('.logs/joblog.json') From a29486f3998b1b7bbaf2838fd117268aae0b193d Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Fri, 14 Oct 2022 11:27:18 -0400 Subject: [PATCH 10/14] add INCDIR to VPATH to resolve includes Signed-off-by: edmundreinhardt --- makei/build.py | 1 + mk/def_rules.mk | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/makei/build.py b/makei/build.py index 50ea430..1ab1b69 100644 --- a/makei/build.py +++ b/makei/build.py @@ -115,6 +115,7 @@ def map_ibmi_json_var(path): f"preUsrlibl := {' '.join(self.iproj_json.pre_usr_libl)}", f"postUsrlibl := {' '.join(self.iproj_json.post_usr_libl)}", f"INCDIR := {incdir}", + f"unquotedINCDIR := {' '.join(includePath)}", f"IBMiEnvCmd := {self.ibmi_env_cmds}", f"COLOR_TTY := {'true' if self.color else 'false'}", "", diff --git a/mk/def_rules.mk b/mk/def_rules.mk index f5697c4..0e08de4 100644 --- a/mk/def_rules.mk +++ b/mk/def_rules.mk @@ -91,8 +91,8 @@ endef # instead of a constant so that all settings are defined in one place, at the top.) # tl;dr: If you want to customize a compile setting for an object, change these variables # in your TARGET (not here). -ACTGRP := -AUT := +ACTGRP := +AUT := BNDDIR := COMMIT := *NONE CURLIB := @@ -315,7 +315,7 @@ PREUSRLIBLPATH = $(call getLibPath,$(preUsrlibl)) POSTUSRLIBLPATH = $(call getLibPath,$(postUsrlibl)) CURLIBPATH = $(call getLibPath,$(curlib)) -VPATH = $(subst $(space),:,$(strip $(call uniq,$(includePath) $(PREUSRLIBLPATH) $(CURLIBPATH) $(POSTUSRLIBLPATH) $(OBJPATH) $(SRCPATH)))) +VPATH = $(subst $(space),:,$(strip $(call uniq,$(strip $(unquotedINCDIR)) $(PREUSRLIBLPATH) $(CURLIBPATH) $(POSTUSRLIBLPATH) $(OBJPATH) $(SRCPATH)))) define PRESETUP = @@ -959,6 +959,8 @@ define PGM.CLLE_TO_PGM_RECIPE = $(PGM_VARIABLES) $(eval d = $($@_d)) @$(call echo_cmd,"=== Create ILE CL Program [$(basename $@)]") + @$(call echo_cmd,"VPATH=$(VPATH) INCDIR=$(INCDIR)") + $(eval crtcmd := "$(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTBNDCL" -p '"$(CRTBNDCLFLAGS)"'") @$(PRESETUP) \ $(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTBNDCL" -p "$(CRTBNDCLFLAGS)" --save-joblog "$(JOBLOGFILE)" >> $(LOGFILE) 2>&1 && $(call logSuccess,$@) || $(call logFail,$@) From 820584b73372ac6fac48a8bcca0f58ba757124db Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Fri, 14 Oct 2022 15:37:40 -0400 Subject: [PATCH 11/14] makeAbsPathInc now handles no INCDIR Signed-off-by: edmundreinhardt --- makei/utils.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/makei/utils.py b/makei/utils.py index 22b9817..3ff6488 100644 --- a/makei/utils.py +++ b/makei/utils.py @@ -329,19 +329,30 @@ def makeIncludeDirsAbsolute(jobLogPath: str, parameters: str ): >>> makeIncludeDirsAbsolute('/.logs/joblog.json', " INCDIR('dir2')") " INCDIR('/dir2')" >>> makeIncludeDirsAbsolute('/a/b/cd/efg/hijklmnop/.logs/joblogs.json', " INCDIR( ''/a/b/dir1'' ''dir2'')") - " INCDIR(''/a/b/dir1'' ''dir2'')" - + " INCDIR( ''/a/b/dir1'' ''dir2'')" + >>> makeIncludeDirsAbsolute('/a/b/.logs/joblogs.json', "no include path here") + 'no include path here' + >>> makeIncludeDirsAbsolute('/joblogs.json', "no .logs") + 'no .logs' + >>> makeIncludeDirsAbsolute('/.logs/joblogs.json', "INCDIR but no paren") + 'INCDIR but no paren' + >>> makeIncludeDirsAbsolute('/.logs/joblogs.json', "INCDIR( but no close paren") + 'INCDIR( but no close paren' """ try: indexOfJobLogSubstr = jobLogPath.index('.logs/joblog.json') curDir = jobLogPath[0:indexOfJobLogSubstr] except: - curDir = None + return parameters + + try: + incDirKeyWordIndex = parameters.index('INCDIR') + startOfIncDir = parameters.index('(', incDirKeyWordIndex) + endOfIncDir = parameters.index(')', startOfIncDir) + except: + return parameters includePath = [] - incDirKeyWordIndex = parameters.index('INCDIR') - startOfIncDir = parameters.index('(', incDirKeyWordIndex) - endOfIncDir = parameters.index(')', startOfIncDir) includePathStr = parameters[startOfIncDir + 1: endOfIncDir] includePath = includePathStr.split() From 1a36bbfd76dd37ef0fd0e3df35589867edb69c61 Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Fri, 14 Oct 2022 16:31:17 -0400 Subject: [PATCH 12/14] CLMOD remove single quote Remove echo of VPATH Signed-off-by: edmundreinhardt --- mk/def_rules.mk | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mk/def_rules.mk b/mk/def_rules.mk index 0e08de4..b74594f 100644 --- a/mk/def_rules.mk +++ b/mk/def_rules.mk @@ -320,7 +320,6 @@ VPATH = $(subst $(space),:,$(strip $(call uniq,$(strip $(unquotedINCDIR)) $(PREU define PRESETUP = echo -e "$(crtcmd)"; \ -echo -e "VPATH=$(VPATH)"; \ curlib="$(curlib)" \ preUsrlibl="$(preUsrlibl)" \ postUsrlibl="$(postUsrlibl)" \ @@ -443,11 +442,12 @@ fileSIZE = $(strip \ # Determine default settings for the various source types that can make a module object. moduleAUT = $(strip \ - $(if $(filter %.C,$<),$(CMOD_AUT), \ - $(if $(filter %.c,$<),$(CMOD_AUT), \ - $(if $(filter %.clle,$(lc,$<)),$(CLMOD_AUT), \ + $(if $(filter %.C,$<), $(CMOD_AUT), \ + $(if $(filter %.c,$<), $(CMOD_AUT), \ + $(if $(filter %.CLLE,$<),$(CLMOD_AUT), \ + $(if $(filter %.clle,$<),$(CLMOD_AUT), \ $(if $(filter %.rpgle,$(lc,$<)),$(RPGMOD_AUT), \ - UNKNOWN_FILE_TYPE))))) + UNKNOWN_FILE_TYPE)))))) moduleDBGVIEW = $(strip \ $(if $(filter %.C,$<),$(CMOD_DBGVIEW), \ $(if $(filter %.c,$<),$(CMOD_DBGVIEW), \ @@ -844,7 +844,7 @@ define CLLE_TO_MODULE_RECIPE = @$(set_STMF_CCSID) $(eval crtcmd := "$(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTCLMOD" -p '"$(CRTCLMODFLAGS)"'") @$(PRESETUP) \ - $(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTCLMOD" -p '"$(CRTCLMODFLAGS)"' --save-joblog "$(JOBLOGFILE)" >> $(LOGFILE) 2>&1 && $(call logSuccess,$@) || $(call logFail,$@) + $(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTCLMOD" -p "$(CRTCLMODFLAGS)" --save-joblog "$(JOBLOGFILE)" >> $(LOGFILE) 2>&1 && $(call logSuccess,$@) || $(call logFail,$@) @$(call EVFEVENT_DOWNLOAD,$*.evfevent) endef @@ -959,8 +959,7 @@ define PGM.CLLE_TO_PGM_RECIPE = $(PGM_VARIABLES) $(eval d = $($@_d)) @$(call echo_cmd,"=== Create ILE CL Program [$(basename $@)]") - @$(call echo_cmd,"VPATH=$(VPATH) INCDIR=$(INCDIR)") - + @$(set_STMF_CCSID) $(eval crtcmd := "$(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTBNDCL" -p '"$(CRTBNDCLFLAGS)"'") @$(PRESETUP) \ $(SCRIPTSPATH)/crtfrmstmf --ccsid $(TGTCCSID) -f $< -o $(basename $(@F)) -l $(OBJLIB) -c "CRTBNDCL" -p "$(CRTBNDCLFLAGS)" --save-joblog "$(JOBLOGFILE)" >> $(LOGFILE) 2>&1 && $(call logSuccess,$@) || $(call logFail,$@) From 6b516ebcbd59f758f2449ce41215525343f3e969 Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Fri, 14 Oct 2022 16:46:54 -0400 Subject: [PATCH 13/14] The lc trick does not work Signed-off-by: edmundreinhardt --- mk/def_rules.mk | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mk/def_rules.mk b/mk/def_rules.mk index b74594f..495a03c 100644 --- a/mk/def_rules.mk +++ b/mk/def_rules.mk @@ -46,8 +46,6 @@ endif empty := space :=$(empty) $(empty) uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) -#map input string to lowercase (only handles A-Z) -lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) # The following logs to stdout is parsed and used by the makei program. Check makei.BuildEnv.make before making changes! @@ -442,12 +440,13 @@ fileSIZE = $(strip \ # Determine default settings for the various source types that can make a module object. moduleAUT = $(strip \ - $(if $(filter %.C,$<), $(CMOD_AUT), \ - $(if $(filter %.c,$<), $(CMOD_AUT), \ - $(if $(filter %.CLLE,$<),$(CLMOD_AUT), \ - $(if $(filter %.clle,$<),$(CLMOD_AUT), \ - $(if $(filter %.rpgle,$(lc,$<)),$(RPGMOD_AUT), \ - UNKNOWN_FILE_TYPE)))))) + $(if $(filter %.C,$<), $(CMOD_AUT), \ + $(if $(filter %.c,$<), $(CMOD_AUT), \ + $(if $(filter %.CLLE,$<), $(CLMOD_AUT), \ + $(if $(filter %.clle,$<), $(CLMOD_AUT), \ + $(if $(filter %.RPGLE,$<),$(RPGMOD_AUT), \ + $(if $(filter %.rpgle,$<),$(RPGMOD_AUT), \ + UNKNOWN_FILE_TYPE))))))) moduleDBGVIEW = $(strip \ $(if $(filter %.C,$<),$(CMOD_DBGVIEW), \ $(if $(filter %.c,$<),$(CMOD_DBGVIEW), \ From d6b5632a019b6eff7556c95db237022272d1c961 Mon Sep 17 00:00:00 2001 From: Edmund Reinhardt Date: Fri, 14 Oct 2022 16:55:30 -0400 Subject: [PATCH 14/14] remove settings files not needed Signed-off-by: edmundreinhardt --- .vscode/actions.json | 15 --------------- .vscode/settings.json | 7 ------- 2 files changed, 22 deletions(-) delete mode 100644 .vscode/actions.json delete mode 100644 .vscode/settings.json diff --git a/.vscode/actions.json b/.vscode/actions.json deleted file mode 100644 index ad544f1..0000000 --- a/.vscode/actions.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "name": "Build and deploy with bob 🔨", - "command": "/QOpenSys/pkgs/bin/makei build -e verlibcsy=&CURLIB", - "environment": "pase", - "deployFirst": true, - "extensions": [ - "GLOBAL" - ], - "postDownload": [ - ".logs/joblog.json", - ".logs/output.log" - ] - } -] \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index bf40b47..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "python.testing.pytestArgs": [ - "makei/tests" - ], - "python.testing.unittestEnabled": false, - "python.testing.pytestEnabled": true -} \ No newline at end of file