From 0fc5b327e175e61b3b8d0041e3f4b422ba2f05a7 Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Sun, 4 Sep 2022 11:06:40 +0100 Subject: [PATCH 01/12] 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 02/12] 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 03/12] 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 04/12] 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 05/12] 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; From 37205b0065f41142c51188d6567bf6952943ddad Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Sun, 4 Sep 2022 11:06:49 +0100 Subject: [PATCH 06/12] Use new -quiet flag --- mk_recipes/buildInplace.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk_recipes/buildInplace.mk b/mk_recipes/buildInplace.mk index 24e56a72..89d7037d 100644 --- a/mk_recipes/buildInplace.mk +++ b/mk_recipes/buildInplace.mk @@ -84,7 +84,7 @@ POP_COMPILER_TOOLS:=$(POPC) $(POPLIBR) $(POPLINK) export POP__as cd $(popsrc) rm -f ./{popc,poplibr,poplink}.psv* - $(MK_CROSS) -d -a=$(POP_ARCH) popc poplibr poplink + $(MK_CROSS) -a=$(POP_ARCH) popc poplibr poplink touch "$@" $(POPLINK): .proxy-pop-compiler-tool-images $(COREPOP) From 08e990d40fa203b0a1ae65deca7b1a198a86323e Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Sun, 4 Sep 2022 11:44:41 +0100 Subject: [PATCH 07/12] Add -quiet flag to mkimage --- base/pop/lib/lib/mkimage.p | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base/pop/lib/lib/mkimage.p b/base/pop/lib/lib/mkimage.p index 0ccc0f37..970d8fb6 100644 --- a/base/pop/lib/lib/mkimage.p +++ b/base/pop/lib/lib/mkimage.p @@ -110,7 +110,9 @@ enddefine; define lconstant mkimage(args); lvars arg, args, image, ss = false, initialisers = [], share = undef, nonwrit = false, vedmode = false, entry_p = false; - dlocal pop_debugging = "undef"; + dlocal pop_debugging = "undef", + loadwarning, + libwarning; ;;; process any leading options (prefixed with '-') while args /== [] and isstartstring('-', hd(args)) do @@ -157,6 +159,9 @@ define lconstant mkimage(args); false -> pop_debugging; elseif arg = '-debug' then true -> pop_debugging; + elseif arg = '-quiet' then + erase -> loadwarning; + erase -> libwarning; elseif arg = '-entrymain' or arg = '-entry' then if arg = '-entrymain' then '$-Pop$-Main' From 8637d5f3c55a4295b903847b2f9473d37335fb73 Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Sun, 4 Sep 2022 11:45:05 +0100 Subject: [PATCH 08/12] Use -quiet flag throughout --- mk_recipes/buildInplace.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mk_recipes/buildInplace.mk b/mk_recipes/buildInplace.mk index 89d7037d..ab7dec94 100644 --- a/mk_recipes/buildInplace.mk +++ b/mk_recipes/buildInplace.mk @@ -224,25 +224,25 @@ BASEPOPS:=$(addprefix $(popsys)/,pop11 basepop11 basepop11.stb basepop11.map) $(popsavelib)/startup.psv: .proxy-basepops source $(popcom)/popinit.sh cd $(popsys) - ./basepop11 %nort %noinit ../lib/lib/mkimage.p -nodebug -nonwriteable -install $@ startup + ./basepop11 %nort %noinit ../lib/lib/mkimage.p -quiet -nodebug -nonwriteable -install $@ startup $(popsavelib)/clisp.psv: .proxy-basepops $(popsavelib)/startup.psv $(popsys)/popenv.sh @rm -f $@ cd $(popsys) ln -f basepop11 clisp - $(RUN_MKIMAGE) -install -subsystem lisp $@ ../lisp/src/clisp.p + $(RUN_MKIMAGE) -quiet -install -subsystem lisp $@ ../lisp/src/clisp.p $(popsavelib)/prolog.psv: .proxy-basepops $(popsavelib)/startup.psv $(popsys)/popenv.sh @rm -f $@ cd $(popsys) ln -f basepop11 prolog - $(RUN_MKIMAGE) -nodebug -install -flags prolog \( \) $@ ../plog/src/prolog.p + $(RUN_MKIMAGE) -quiet -nodebug -install -flags prolog \( \) $@ ../plog/src/prolog.p $(popsavelib)/pml.psv: .proxy-basepops $(popsavelib)/startup.psv $(popsys)/popenv.sh @rm -f $@ cd $(popsys) ln -f basepop11 pml - $(RUN_MKIMAGE) -nodebug -install -flags ml \( \) $@ ../pml/src/ml.p + $(RUN_MKIMAGE) -quiet -nodebug -install -flags ml \( \) $@ ../pml/src/ml.p .PHONY: images images: $(addsuffix .psv,$(addprefix $(popsavelib)/,startup clisp prolog pml)) @@ -252,7 +252,7 @@ $(popsavelib)/xved.psv: .proxy-basepops $(popsavelib)/startup.psv $(popsys)/pope @rm -f $@ cd $(popsys) ln -f basepop11 xved - $(RUN_MKIMAGE) -nodebug -nonwriteable -install -entry xved_standalone_setup $@ mkxved + $(RUN_MKIMAGE) -quiet -nodebug -nonwriteable -install -entry xved_standalone_setup $@ mkxved images: $(popsavelib)/xved.psv endif From e0786f48d91f47ffc81f1363d2c11bc9e9a125b5 Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Sun, 4 Sep 2022 11:45:51 +0100 Subject: [PATCH 09/12] Make prolog build less noisy --- base/pop/plog/src/prolog.p | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/pop/plog/src/prolog.p b/base/pop/plog/src/prolog.p index 184688d4..074b6f22 100644 --- a/base/pop/plog/src/prolog.p +++ b/base/pop/plog/src/prolog.p @@ -202,7 +202,7 @@ define lconstant loadfile(file); prolog_no_clauses = not(prolog_debugging), prolog_tags = prolog_debugging, pop_debugging = prolog_debugging, - popgctrace = true, + popgctrace = prolog_debugging and 1, ;;; Make backslash an alphabeticiser % item_chartype(`\\`) % = 12 From 0384ab68ce89ed093e40b5b8b26d578e707f96c3 Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Sun, 4 Sep 2022 11:46:00 +0100 Subject: [PATCH 10/12] Make ml build less noisy --- base/pop/pml/src/ml.p | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/pop/pml/src/ml.p b/base/pop/pml/src/ml.p index 928a1c60..ce50dd12 100644 --- a/base/pop/pml/src/ml.p +++ b/base/pop/pml/src/ml.p @@ -92,7 +92,7 @@ lvars warnings = false; define lconstant loadfile(file); lvars dir, file, dev = false; dlocal pop_debugging = ml_debugging, - popgctrace = true; + popgctrace = ml_debugging and true; ;;; Make backslash an alphabeticiser dlocal % item_chartype(`\\`) % = 12; From ed6f3e3b39a20456403baf5a9c1661fb8a9151b5 Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Sun, 4 Sep 2022 15:27:59 +0100 Subject: [PATCH 11/12] Making the Common Lisp subsystem load more quietly --- base/pop/lisp/src/clisp.p | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/base/pop/lisp/src/clisp.p b/base/pop/lisp/src/clisp.p index baf6a840..e743a518 100644 --- a/base/pop/lisp/src/clisp.p +++ b/base/pop/lisp/src/clisp.p @@ -14,6 +14,10 @@ sysflush(popdevout, true); sysgarbage(); max(popmemused + 8e5, popmemlim) -> popmemlim; +#_IF not(DEF lisp_debugging) +vars lisp_debugging = false; +#_ENDIF + /********************** Initialise a few things *****************************/ @@ -41,9 +45,11 @@ define global lisp_src_compile(file); dlocal lisp_system_building = true, pop_debugging = false, - popgctrace = true, + popgctrace = lisp_debugging and true, popsyscall = 1, - subsystem_compile_warn = sysloadwarning, + subsystem_compile_warn = lisp_debugging and sysloadwarning or erase, + loadwarning = lisp_debugging and sysloadwarning or erase, + libwarning = lisp_debugging and syslibwarning or erase, pop_buffer_charout = false, ; if islist(file) then From 20b43822faaa6968765e22a290c9c164fe47e3e9 Mon Sep 17 00:00:00 2001 From: Stephen Leach Date: Mon, 5 Sep 2022 08:37:56 +0100 Subject: [PATCH 12/12] Add -quiet flag to documentation for mkimage --- base/pop/help/mkimage | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/pop/help/mkimage b/base/pop/help/mkimage index 41d76ac2..f6ac702c 100644 --- a/base/pop/help/mkimage +++ b/base/pop/help/mkimage @@ -299,6 +299,10 @@ should precede the image name. "undef"). (Has no affect on the value of pop_debugging when the saved image is restored.) +-quiet + Reduces the amount of output produced by turning off popgctrace + and the file loading messages. + -flags key flags LIB * MKIMAGE defines a property named mkimage_flags_table. This option adds to the table a mapping from the word key to a list of