From 0fc5b327e175e61b3b8d0041e3f4b422ba2f05a7 Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Sun, 4 Sep 2022 11:06:40 +0100 Subject: [PATCH 1/5] Added -quiet flag to popc compiler --- base/pop/src/syscomp/popc_main.p | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/base/pop/src/syscomp/popc_main.p b/base/pop/src/syscomp/popc_main.p index 62035182..4c302545 100644 --- a/base/pop/src/syscomp/popc_main.p +++ b/base/pop/src/syscomp/popc_main.p @@ -1516,6 +1516,7 @@ lconstant procedure poplink_nf_options = newassoc([ ]); +vars procedure cucharverbose; define $-Pop$-Main(); lvars c, arg, dev, n, @@ -1541,6 +1542,7 @@ define $-Pop$-Main(); pop_file_versions = use_file_versions(), cucharout = cucharerr, % file_create_control(dlocal_context) %, + cucharverbose = cucharerr, ; #_IF pop_debugging @@ -1698,6 +1700,10 @@ define $-Pop$-Main(); ;;; no system libraries false -> syslib + elseif c == "quiet" then + false -> popgctrace; + erase -> cucharverbose; + elseif c == "u" then ;;; use things pop11_compile(stringin(consstring(#| @@ -1810,7 +1816,7 @@ define $-Pop$-Main(); define lconstant pr_fname(fname); lvars fname; - dlocal cucharout = cucharerr; + dlocal cucharout = cucharverbose; returnunless(l_flag); printf(fname, if len == 1 then From 8e95dd286b878aae9f1ec54696be967b5e0eecee Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Sun, 4 Sep 2022 11:06:49 +0100 Subject: [PATCH 2/5] Use new -quiet flag --- mk_recipes/buildInplace.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mk_recipes/buildInplace.mk b/mk_recipes/buildInplace.mk index 58504789..24e56a72 100644 --- a/mk_recipes/buildInplace.mk +++ b/mk_recipes/buildInplace.mk @@ -112,7 +112,7 @@ SRC_WLB:=$(popobjlib)/src.wlb .proxy-wlb-objects: $(SRC_WLB_SRC) $(SRC_WLB_HEADERS) $(POPC) cd $(popsrc) rm -f $@ - $(RUN_POPC) -c -nosys $(POP_ARCH)/*.[ps] ./*.p + $(RUN_POPC) -quiet -c -nosys $(POP_ARCH)/*.[ps] ./*.p touch "$@" $(SRC_WLB): .proxy-wlb-objects $(POPLIBR) @@ -133,7 +133,7 @@ VED_WLB:=$(popobjlib)/vedsrc.wlb .proxy-ved-wlb-objects : $(VED_WLB_SRC) $(VED_WLB_HEADERS) $(POPC) cd $(usepop)/pop/ved/src rm -f $@ - $(RUN_POPC) -c -nosys -wlib \( ../../src/ \) ./*.p + $(RUN_POPC) -quiet -c -nosys -wlib \( ../../src/ \) ./*.p touch "$@" $(VED_WLB): $(popobjlib)/src.wlb .proxy-ved-wlb-objects $(POPLIBR) @@ -171,7 +171,7 @@ XSRC_WLB:=$(popobjlib)/xsrc.wlb .proxy-xsrc-wlb-objects: $(XSRC_WLB_SRC) $(XSRC_WLB_HEADERS) $(XPW_TARGET) $(POPC) cd $(usepop)/pop/x/src rm -f $@ - $(RUN_POPC) -c -nosys -wlib \( ../../src/ \) ./*.p + $(RUN_POPC) -quiet -c -nosys -wlib \( ../../src/ \) ./*.p touch "$@" $(XSRC_WLB): $(popobjlib)/src.wlb .proxy-xsrc-wlb-objects $(POPLIBR) From 8bafb880a384b3e44f32e57ea50561897982e069 Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Sun, 4 Sep 2022 11:12:27 +0100 Subject: [PATCH 3/5] Add documentation of the new -quiet flag --- base/pop/help/popc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/pop/help/popc b/base/pop/help/popc index 44c8b642..1b8b014f 100644 --- a/base/pop/help/popc +++ b/base/pop/help/popc @@ -254,6 +254,10 @@ searched, i.e. disables the use of popsyslist. Produce output files in directory (can occur anywhere, and affects all following source files). + -quiet + Suppresses the popgctrace messages and inhibits the printing + of multiple file names when compiling multiple files. + -u arg-list Use Pop-11 source libraries: for each arg in arg-list, compiles From 1d0f3a36a5f17ea087c66ea16a47b19c10ba7a37 Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Mon, 19 Sep 2022 12:27:30 +0100 Subject: [PATCH 4/5] Incorporating Waldek Heibsch's comments --- base/pop/src/syscomp/popc_main.p | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/base/pop/src/syscomp/popc_main.p b/base/pop/src/syscomp/popc_main.p index 4c302545..5d9882a2 100644 --- a/base/pop/src/syscomp/popc_main.p +++ b/base/pop/src/syscomp/popc_main.p @@ -1516,13 +1516,13 @@ lconstant procedure poplink_nf_options = newassoc([ ]); -vars procedure cucharverbose; define $-Pop$-Main(); lvars c, arg, dev, n, asm_only = false, comp_only = false, l_flag = false, + q_flag = false, out_dir = false, link_args = [], wlib_create = false, @@ -1541,8 +1541,7 @@ define $-Pop$-Main(); dlocal pop_arglist, pop_file_versions = use_file_versions(), cucharout = cucharerr, - % file_create_control(dlocal_context) %, - cucharverbose = cucharerr, + % file_create_control(dlocal_context) % ; #_IF pop_debugging @@ -1671,8 +1670,10 @@ define $-Pop$-Main(); elseif c == "l" then ;;; list names of files compiled (now done - ;;; automatically for more than 1 file) - true -> l_flag + ;;; automatically for more than 1 file). Explicitly + ;;; removes -q if previously set. + true -> l_flag; + false -> q_flag; elseif c == "m" then ;;; define macro(s) @@ -1701,8 +1702,9 @@ define $-Pop$-Main(); false -> syslib elseif c == "quiet" then - false -> popgctrace; - erase -> cucharverbose; + ;;; Explicitly quiet, will take precedence over l_flag. + true -> q_flag; + false -> l_flag; elseif c == "u" then ;;; use things @@ -1763,8 +1765,16 @@ define $-Pop$-Main(); endif; %] -> inter_args; - if n_compile > 1 then true -> l_flag endif; + ;;; Reconsider the l_flag (list files) based on whether q_flag (quiet) was explicitly set. + if q_flag then + ;;; Explicit quiet takes precedence. + false -> l_flag; + false -> popgctrace; + elseif n_compile > 1 then + ;;; If -q not set l_flag allowed to stand. And apply this default rule. + true -> l_flag; + endif; define lconstant compile_file(source); lvars nam, a_name, o_name, w_name, source, asm_extn; @@ -1816,7 +1826,7 @@ define $-Pop$-Main(); define lconstant pr_fname(fname); lvars fname; - dlocal cucharout = cucharverbose; + dlocal cucharout = cucharerr; returnunless(l_flag); printf(fname, if len == 1 then From 82521ac13a9e79195446ddf5222c2fe8c4c1094f Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Mon, 19 Sep 2022 12:46:04 +0100 Subject: [PATCH 5/5] Minor correction to comments --- base/pop/src/syscomp/popc_main.p | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/pop/src/syscomp/popc_main.p b/base/pop/src/syscomp/popc_main.p index 5d9882a2..22b4c566 100644 --- a/base/pop/src/syscomp/popc_main.p +++ b/base/pop/src/syscomp/popc_main.p @@ -1671,7 +1671,7 @@ define $-Pop$-Main(); elseif c == "l" then ;;; list names of files compiled (now done ;;; automatically for more than 1 file). Explicitly - ;;; removes -q if previously set. + ;;; clears -q_flag- if previously set. true -> l_flag; false -> q_flag; @@ -1772,7 +1772,7 @@ define $-Pop$-Main(); false -> l_flag; false -> popgctrace; elseif n_compile > 1 then - ;;; If -q not set l_flag allowed to stand. And apply this default rule. + ;;; If q_flag not set l_flag allowed to stand. And apply this default rule. true -> l_flag; endif;