From 1237824333a488b535fc1487d4fe92c7afa26539 Mon Sep 17 00:00:00 2001 From: Graham Nelson Date: Sat, 30 Apr 2022 11:41:53 +0100 Subject: [PATCH] Beginning work on better building for Apple Silicon Macs --- Chapter 6/Makefiles.w | 61 ++++ Figures/colony.txt | 2 +- Manual/Webs, Tangling and Weaving.w | 8 + Materials/platforms/inweb-on-linux.mk | 4 + Materials/platforms/inweb-on-macos.mk | 4 + Materials/platforms/inweb-on-macos32.mk | 4 + Materials/platforms/inweb-on-macosarm.mk | 154 ++++++++++ Materials/platforms/inweb-on-macosuniv.mk | 153 ++++++++++ Materials/platforms/inweb-on-unix.mk | 4 + Materials/platforms/inweb-on-windows.mk | 4 + Materials/platforms/macosarm.mk | 20 ++ Materials/platforms/macosarm.mkscript | 109 +++++++ Materials/platforms/macosuniv.mk | 21 ++ Materials/platforms/macosuniv.mkscript | 114 +++++++ Materials/platforms/mascosarm.mk | 3 + README.md | 2 +- Tangled/inweb.c | 343 ++++++++++++++-------- build.txt | 4 +- colony.txt | 2 +- docs/eastertide/S-rtd.html | 2 +- docs/eastertide/index.html | 2 +- docs/foundation-module/1-fm.html | 2 +- docs/foundation-module/1-pp.html | 2 +- docs/foundation-module/1-wp.html | 2 +- docs/foundation-module/2-dct.html | 2 +- docs/foundation-module/2-dl.html | 2 +- docs/foundation-module/2-fc.html | 2 +- docs/foundation-module/2-lcl.html | 2 +- docs/foundation-module/2-llas.html | 2 +- docs/foundation-module/2-mmr.html | 2 +- docs/foundation-module/2-mth.html | 2 +- docs/foundation-module/2-str.html | 2 +- docs/foundation-module/2-trs.html | 2 +- docs/foundation-module/2-wal.html | 2 +- docs/foundation-module/3-cf.html | 2 +- docs/foundation-module/3-cla.html | 2 +- docs/foundation-module/3-drc.html | 2 +- docs/foundation-module/3-em.html | 2 +- docs/foundation-module/3-fln.html | 2 +- docs/foundation-module/3-pth.html | 2 +- docs/foundation-module/3-shl.html | 2 +- docs/foundation-module/3-tm.html | 2 +- docs/foundation-module/4-chr.html | 2 +- docs/foundation-module/4-cst.html | 2 +- docs/foundation-module/4-pm.html | 2 +- docs/foundation-module/4-prp.html | 4 +- docs/foundation-module/4-sm.html | 2 +- docs/foundation-module/4-taa.html | 2 +- docs/foundation-module/4-tf.html | 2 +- docs/foundation-module/4-ws.html | 2 +- docs/foundation-module/5-ee.html | 2 +- docs/foundation-module/5-htm.html | 2 +- docs/foundation-module/6-bf.html | 2 +- docs/foundation-module/6-id.html | 2 +- docs/foundation-module/6-sd.html | 2 +- docs/foundation-module/7-vn.html | 2 +- docs/foundation-module/7-vnr.html | 2 +- docs/foundation-module/8-bdfw.html | 2 +- docs/foundation-module/8-bf.html | 2 +- docs/foundation-module/8-st.html | 2 +- docs/foundation-module/8-wm.html | 2 +- docs/foundation-module/8-ws.html | 2 +- docs/foundation-module/P-abgtf.html | 2 +- docs/foundation-module/index.html | 2 +- docs/foundation-test/S-pc.html | 2 +- docs/foundation-test/S-ut.html | 2 +- docs/foundation-test/index.html | 2 +- docs/goldbach/S-sp.html | 2 +- docs/goldbach/S-tsoe.html | 2 +- docs/goldbach/goldbach.pdf | Bin 251998 -> 251998 bytes docs/goldbach/index.html | 2 +- docs/index.html | 2 +- docs/inweb/1-apacs.html | 2 +- docs/inweb/1-bsc.html | 2 +- docs/inweb/1-cnf.html | 2 +- docs/inweb/1-pc.html | 2 +- docs/inweb/1-ptt.html | 2 +- docs/inweb/1-ts.html | 2 +- docs/inweb/2-ec.html | 2 +- docs/inweb/2-lc.html | 2 +- docs/inweb/2-pm.html | 2 +- docs/inweb/2-pn.html | 2 +- docs/inweb/2-tgs.html | 2 +- docs/inweb/2-tp.html | 2 +- docs/inweb/2-tr.html | 4 +- docs/inweb/3-ta.html | 2 +- docs/inweb/3-tc.html | 2 +- docs/inweb/3-tt.html | 2 +- docs/inweb/3-tw.html | 2 +- docs/inweb/3-twot.html | 2 +- docs/inweb/4-as.html | 2 +- docs/inweb/4-cl.html | 2 +- docs/inweb/4-is.html | 2 +- docs/inweb/4-lm.html | 2 +- docs/inweb/4-pl.html | 2 +- docs/inweb/4-taf.html | 2 +- docs/inweb/4-tp.html | 2 +- docs/inweb/5-df.html | 2 +- docs/inweb/5-fm.html | 2 +- docs/inweb/5-hf.html | 2 +- docs/inweb/5-ptf.html | 2 +- docs/inweb/5-tf.html | 2 +- docs/inweb/5-tu.html | 2 +- docs/inweb/5-wt.html | 2 +- docs/inweb/6-cln.html | 4 +- docs/inweb/6-cs.html | 2 +- docs/inweb/6-gs.html | 2 +- docs/inweb/6-mkf.html | 151 +++++++--- docs/inweb/6-rw.html | 2 +- docs/inweb/M-awwp.html | 2 +- docs/inweb/M-htwaw.html | 2 +- docs/inweb/M-iti.html | 2 +- docs/inweb/M-mwiw.html | 4 +- docs/inweb/M-rc.html | 2 +- docs/inweb/M-spl.html | 2 +- docs/inweb/M-tid.html | 2 +- docs/inweb/M-wtaw.html | 9 +- docs/inweb/P-htpw.html | 2 +- docs/inweb/index.html | 2 +- docs/twinprimes/twinprimes.html | 2 +- scripts/first.sh | 2 +- scripts/inweb.mkscript | 2 +- 122 files changed, 1110 insertions(+), 274 deletions(-) create mode 100644 Materials/platforms/inweb-on-macosarm.mk create mode 100644 Materials/platforms/inweb-on-macosuniv.mk create mode 100644 Materials/platforms/macosarm.mk create mode 100644 Materials/platforms/macosarm.mkscript create mode 100644 Materials/platforms/macosuniv.mk create mode 100644 Materials/platforms/macosuniv.mkscript create mode 100644 Materials/platforms/mascosarm.mk diff --git a/Chapter 6/Makefiles.w b/Chapter 6/Makefiles.w index cd9d623..4596df9 100644 --- a/Chapter 6/Makefiles.w +++ b/Chapter 6/Makefiles.w @@ -18,6 +18,10 @@ void Makefiles::write(web *W, filename *prototype, filename *F, module_search *I Preprocessor::new_macro(L, I"identity-settings", NULL, Makefiles::identity_settings_expander, NULL); + preprocessor_macro *mf = Preprocessor::new_macro(L, + I"modify-filenames", I"original: ORIGINAL ?suffix: SUFFIX ?prefix: PREFIX", + Makefiles::modify_filenames_expander, NULL); + Preprocessor::do_not_suppress_whitespace(mf); Preprocessor::new_macro(L, I"component", I"symbol: SYMBOL webname: WEBNAME path: PATH set: SET type: TYPE", Makefiles::component_expander, NULL); @@ -119,6 +123,63 @@ void Makefiles::seek_INWEBPLATFORM(text_stream *line, text_file_position *tfp, v Regexp::dispose_of(&mr); } +@h The modify filename expander. + += +void Makefiles::modify_filenames_expander(preprocessor_macro *mm, preprocessor_state *PPS, + text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) { + text_stream *OUT = PPS->dest; + + text_stream *original = parameter_values[0]; + text_stream *suffix = parameter_values[1]; + text_stream *prefix = parameter_values[2]; + + wchar_t previous = 'X'; int quoted = FALSE, boundary = FALSE; + TEMPORARY_TEXT(captured) + LOOP_THROUGH_TEXT(pos, original) { + wchar_t c = Str::get(pos); + if (c == '\'') { quoted = quoted?FALSE:TRUE; } + if (Characters::is_whitespace(c)) { + if ((previous != '\\') && (quoted == FALSE)) boundary = TRUE; + } else { + if (boundary) @; + boundary = FALSE; + } + PUT_TO(captured, c); + previous = c; + } + @ + DISCARD_TEXT(captured) +} + +@ = + Str::trim_white_space(captured); + if (Str::len(captured) > 0) { + int in_quotes = FALSE; + if ((Str::get_first_char(captured) == '\'') && (Str::get_last_char(captured) == '\'')) { + Str::delete_first_character(captured); + Str::delete_last_character(captured); + in_quotes = TRUE; + } + if (in_quotes) WRITE("'"); + int last_slash = -1; + for (int i=0; i= 0) + for (int i=last_slash; i $(ME)/Figures/help.txt + $(INWEB) -show-languages > $(ME)/Figures/languages.txt + $(INWEB) -colony $(COLONY) -member twinprimes -scan > $(ME)/Figures/scan.txt + $(INWEB) -colony $(COLONY) -member twinprimes -weave-as TestingInweb -weave-to $(ME)/Figures/tree.txt + cp -f $(COLONY) $(ME)/Figures/colony.txt + cp -f $(ME)/docs-src/nav.html $(ME)/Figures/nav.txt + $(INWEB) -advance-build-file $(ME)/build.txt + mkdir -p $(ME)/docs + rm -f $(ME)/docs/*.html + mkdir -p $(ME)/docs/docs-assets + rm -f $(ME)/docs/docs-assets/*.css + rm -f $(ME)/docs/docs-assets/*.png + rm -f $(ME)/docs/docs-assets/*.gif + cp -f $(ME)/docs-src/Octagram.png $(ME)/docs/docs-assets/Octagram.png + $(INWEB) -prototype inweb/scripts/inweb.rmscript -write-me inweb/README.md + mkdir -p $(ME)/docs/inweb + rm -f $(ME)/docs/inweb/*.html + mkdir -p $(ME)/docs/goldbach + rm -f $(ME)/docs/goldbach/*.html + mkdir -p $(ME)/docs/twinprimes + rm -f $(ME)/docs/twinprimes/*.html + mkdir -p $(ME)/docs/eastertide + rm -f $(ME)/docs/eastertide/*.html + mkdir -p $(ME)/docs/foundation-module + rm -f $(ME)/docs/foundation-module/*.html + mkdir -p $(ME)/docs/foundation-test + rm -f $(ME)/docs/foundation-test/*.html + $(INWEB) -colony $(COLONY) -member overview -weave + $(INWEB) -colony $(COLONY) -member goldbach -weave + $(INWEB) -colony $(COLONY) inweb/Examples/goldbach all -weave-as Plain -weave-to inweb/docs/goldbach/goldbach.txt + $(INWEB) -colony $(COLONY) inweb/Examples/goldbach all -weave-as TestingInweb -weave-to inweb/docs/goldbach/goldbach-test.txt + $(INWEB) -colony $(COLONY) inweb/Examples/goldbach all -weave-as PDFTeX -weave-to inweb/docs/goldbach/goldbach.pdf + $(INWEB) -colony $(COLONY) inweb/Examples/goldbach all -weave-as TeX -weave-to inweb/docs/goldbach/goldbach.tex + $(INWEB) -colony $(COLONY) -member twinprimes -weave + $(INWEB) -colony $(COLONY) -member eastertide -weave + $(INWEB) -colony $(COLONY) -member inweb -weave + $(INWEB) -colony $(COLONY) -member foundation -weave + $(INWEB) -colony $(COLONY) -member foundation-test -weave + +.PHONY: clean +clean: + $(call clean-up) + +.PHONY: purge +purge: + $(call clean-up) + +define clean-up + rm -f $(ME)/Tangled/*.o + rm -f $(ME)/Tangled/*.h +endef + diff --git a/Materials/platforms/inweb-on-macosuniv.mk b/Materials/platforms/inweb-on-macosuniv.mk new file mode 100644 index 0000000..66a40eb --- /dev/null +++ b/Materials/platforms/inweb-on-macosuniv.mk @@ -0,0 +1,153 @@ +# This makefile was automatically written by inweb -makefile +# and is not intended for human editing + +INWEBPLATFORM = macosuniv + +INFORM6OS = MACOS + +GLULXEOS = OS_UNIX + +EXEEXTENSION = + +INTEST = intest/Tangled/intest +INWEB = inweb/Tangled/inweb + +CCOPTSX = -DPLATFORM_MACOS=1 -target x86_64-apple-macos10.12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk +CCOPTSA = -DPLATFORM_MACOS=1 -target arm64-apple-macos11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk + +MANYWARNINGS = -Weverything -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return -ferror-limit=1000 + +FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return + +ME = inweb +FTEST = $(ME)/foundation-test +SAFETYCOPY = $(ME)/Tangled/inweb_dev + +COLONY = $(ME)/colony.txt + +-include $(ME)/platform-settings.mk + +.PHONY: all + +all: $(ME)/platform-settings.mk $(ME)/Tangled/$(ME) $(FTEST)/Tangled/foundation-test + +$(ME)/Tangled/$(ME): $(ME)/Contents.w $(ME)/Chapter*/*.w $(ME)/foundation-module/Contents.w $(ME)/foundation-module/Chapter*/*.w + $(call make-me) + +$(FTEST)/Tangled/foundation-test: $(FTEST)/Contents.w $(FTEST)/Sections/*.w $(ME)/foundation-module/Contents.w $(ME)/foundation-module/Chapter*/*.w + $(call make-ftest) + +.PHONY: force +force: $(ME)/platform-settings.mk + $(call make-me) + $(call make-ftest) + +.PHONY: makers +makers: + $(INWEB) $(FTEST) -makefile $(FTEST)/foundation-test.mk + $(INWEB) -prototype $(ME)/Materials/platforms/macos.mkscript -makefile $(ME)/Materials/platforms/macos.mk + $(INWEB) -platform macos -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macos.mk + $(INWEB) -prototype $(ME)/Materials/platforms/macos32.mkscript -makefile $(ME)/Materials/platforms/macos32.mk + $(INWEB) -platform macos32 -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macos32.mk + $(INWEB) -prototype $(ME)/Materials/platforms/macosarm.mkscript -makefile $(ME)/Materials/platforms/macosarm.mk + $(INWEB) -platform macosarm -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macosarm.mk + $(INWEB) -prototype $(ME)/Materials/platforms/macosuniv.mkscript -makefile $(ME)/Materials/platforms/macosuniv.mk + $(INWEB) -platform macosuniv -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macosuniv.mk + $(INWEB) -prototype $(ME)/Materials/platforms/windows.mkscript -makefile $(ME)/Materials/platforms/windows.mk + $(INWEB) -platform windows -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-windows.mk + $(INWEB) -prototype $(ME)/Materials/platforms/linux.mkscript -makefile $(ME)/Materials/platforms/linux.mk + $(INWEB) -platform linux -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-linux.mk + $(INWEB) -prototype $(ME)/Materials/platforms/unix.mkscript -makefile $(ME)/Materials/platforms/unix.mk + $(INWEB) -platform unix -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-unix.mk + +.PHONY: initial +initial: $(ME)/platform-settings.mk + $(call make-me-once-tangled) + $(call make-ftest) + +.PHONY: safe +safe: + $(call make-me-using-safety-copy) + +define make-me-once-tangled + clang -std=c11 -c $(MANYWARNINGS) $(CCOPTSX) -g -o$(ME)/Tangled/$(ME)_x86.o$(ME)/Tangled/$(ME)_x86.c clang -std=c11 -c $(MANYWARNINGS) $(CCOPTSA) -g -o$(ME)/Tangled/$(ME)_arm.o$(ME)/Tangled/$(ME)_arm.c clang $(CCOPTSX) -g -o$(ME)/Tangled/$(ME)$(EXEEXTENSION)_x86$(ME)/Tangled/$(ME)_x86.o clang $(CCOPTSA) -g -o$(ME)/Tangled/$(ME)$(EXEEXTENSION)_arm$(ME)/Tangled/$(ME)_arm.o lipo -create -output $(ME)/Tangled/$(ME)$(EXEEXTENSION)$(ME)/Tangled/$(ME)$(EXEEXTENSION)_x86$(ME)/Tangled/$(ME)$(EXEEXTENSION)_armendef + +define make-me + $(ME)/Tangled/$(ME) $(ME) -tangle + $(call make-me-once-tangled) +endef + +define make-me-using-safety-copy + $(SAFETYCOPY) $(ME) -tangle + $(call make-me-once-tangled) +endef + +define make-ftest + $(INWEB) $(FTEST) -makefile $(FTEST)/foundation-test.mk + make -f $(FTEST)/foundation-test.mk force +endef + +.PHONY: test +test: + $(INTEST) -from $(ME) all + +.PHONY: commit +commit: + $(INWEB) -advance-build-file $(ME)/build.txt + $(INWEB) -prototype inweb/scripts/inweb.rmscript -write-me inweb/README.md + cd $(ME); git commit -a + +.PHONY: pages +pages: + $(INWEB) -help > $(ME)/Figures/help.txt + $(INWEB) -show-languages > $(ME)/Figures/languages.txt + $(INWEB) -colony $(COLONY) -member twinprimes -scan > $(ME)/Figures/scan.txt + $(INWEB) -colony $(COLONY) -member twinprimes -weave-as TestingInweb -weave-to $(ME)/Figures/tree.txt + cp -f $(COLONY) $(ME)/Figures/colony.txt + cp -f $(ME)/docs-src/nav.html $(ME)/Figures/nav.txt + $(INWEB) -advance-build-file $(ME)/build.txt + mkdir -p $(ME)/docs + rm -f $(ME)/docs/*.html + mkdir -p $(ME)/docs/docs-assets + rm -f $(ME)/docs/docs-assets/*.css + rm -f $(ME)/docs/docs-assets/*.png + rm -f $(ME)/docs/docs-assets/*.gif + cp -f $(ME)/docs-src/Octagram.png $(ME)/docs/docs-assets/Octagram.png + $(INWEB) -prototype inweb/scripts/inweb.rmscript -write-me inweb/README.md + mkdir -p $(ME)/docs/inweb + rm -f $(ME)/docs/inweb/*.html + mkdir -p $(ME)/docs/goldbach + rm -f $(ME)/docs/goldbach/*.html + mkdir -p $(ME)/docs/twinprimes + rm -f $(ME)/docs/twinprimes/*.html + mkdir -p $(ME)/docs/eastertide + rm -f $(ME)/docs/eastertide/*.html + mkdir -p $(ME)/docs/foundation-module + rm -f $(ME)/docs/foundation-module/*.html + mkdir -p $(ME)/docs/foundation-test + rm -f $(ME)/docs/foundation-test/*.html + $(INWEB) -colony $(COLONY) -member overview -weave + $(INWEB) -colony $(COLONY) -member goldbach -weave + $(INWEB) -colony $(COLONY) inweb/Examples/goldbach all -weave-as Plain -weave-to inweb/docs/goldbach/goldbach.txt + $(INWEB) -colony $(COLONY) inweb/Examples/goldbach all -weave-as TestingInweb -weave-to inweb/docs/goldbach/goldbach-test.txt + $(INWEB) -colony $(COLONY) inweb/Examples/goldbach all -weave-as PDFTeX -weave-to inweb/docs/goldbach/goldbach.pdf + $(INWEB) -colony $(COLONY) inweb/Examples/goldbach all -weave-as TeX -weave-to inweb/docs/goldbach/goldbach.tex + $(INWEB) -colony $(COLONY) -member twinprimes -weave + $(INWEB) -colony $(COLONY) -member eastertide -weave + $(INWEB) -colony $(COLONY) -member inweb -weave + $(INWEB) -colony $(COLONY) -member foundation -weave + $(INWEB) -colony $(COLONY) -member foundation-test -weave + +.PHONY: clean +clean: + $(call clean-up) + +.PHONY: purge +purge: + $(call clean-up) + +define clean-up + rm -f $(ME)/Tangled/*.o + rm -f $(ME)/Tangled/*.h +endef + diff --git a/Materials/platforms/inweb-on-unix.mk b/Materials/platforms/inweb-on-unix.mk index a5afd88..c9f0781 100644 --- a/Materials/platforms/inweb-on-unix.mk +++ b/Materials/platforms/inweb-on-unix.mk @@ -48,6 +48,10 @@ makers: $(INWEB) -platform macos -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macos.mk $(INWEB) -prototype $(ME)/Materials/platforms/macos32.mkscript -makefile $(ME)/Materials/platforms/macos32.mk $(INWEB) -platform macos32 -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macos32.mk + $(INWEB) -prototype $(ME)/Materials/platforms/macosarm.mkscript -makefile $(ME)/Materials/platforms/macosarm.mk + $(INWEB) -platform macosarm -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macosarm.mk + $(INWEB) -prototype $(ME)/Materials/platforms/macosuniv.mkscript -makefile $(ME)/Materials/platforms/macosuniv.mk + $(INWEB) -platform macosuniv -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macosuniv.mk $(INWEB) -prototype $(ME)/Materials/platforms/windows.mkscript -makefile $(ME)/Materials/platforms/windows.mk $(INWEB) -platform windows -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-windows.mk $(INWEB) -prototype $(ME)/Materials/platforms/linux.mkscript -makefile $(ME)/Materials/platforms/linux.mk diff --git a/Materials/platforms/inweb-on-windows.mk b/Materials/platforms/inweb-on-windows.mk index 50cc0ae..268fcab 100644 --- a/Materials/platforms/inweb-on-windows.mk +++ b/Materials/platforms/inweb-on-windows.mk @@ -48,6 +48,10 @@ makers: $(INWEB) -platform macos -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macos.mk $(INWEB) -prototype $(ME)/Materials/platforms/macos32.mkscript -makefile $(ME)/Materials/platforms/macos32.mk $(INWEB) -platform macos32 -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macos32.mk + $(INWEB) -prototype $(ME)/Materials/platforms/macosarm.mkscript -makefile $(ME)/Materials/platforms/macosarm.mk + $(INWEB) -platform macosarm -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macosarm.mk + $(INWEB) -prototype $(ME)/Materials/platforms/macosuniv.mkscript -makefile $(ME)/Materials/platforms/macosuniv.mk + $(INWEB) -platform macosuniv -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-macosuniv.mk $(INWEB) -prototype $(ME)/Materials/platforms/windows.mkscript -makefile $(ME)/Materials/platforms/windows.mk $(INWEB) -platform windows -prototype $(ME)/scripts/inweb.mkscript -makefile $(ME)/Materials/platforms/inweb-on-windows.mk $(INWEB) -prototype $(ME)/Materials/platforms/linux.mkscript -makefile $(ME)/Materials/platforms/linux.mk diff --git a/Materials/platforms/macosarm.mk b/Materials/platforms/macosarm.mk new file mode 100644 index 0000000..8f4838a --- /dev/null +++ b/Materials/platforms/macosarm.mk @@ -0,0 +1,20 @@ +# This makefile was automatically written by inweb -makefile +# and is not intended for human editing + +INWEBPLATFORM = macosarm + +INFORM6OS = MACOS + +GLULXEOS = OS_UNIX + +EXEEXTENSION = + +INTEST = intest/Tangled/intest +INWEB = inweb/Tangled/inweb + +CCOPTS = -DPLATFORM_MACOS=1 -target arm64-apple-macos11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk + +MANYWARNINGS = -Weverything -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return -ferror-limit=1000 + +FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return + diff --git a/Materials/platforms/macosarm.mkscript b/Materials/platforms/macosarm.mkscript new file mode 100644 index 0000000..a65b69b --- /dev/null +++ b/Materials/platforms/macosarm.mkscript @@ -0,0 +1,109 @@ +# This is "macosarm.mkscript", a script which defines build settings used in +# inweb, intest, inform and all of their subsidiary tools for the platform +# "macos". The maintainer of this file is Graham Nelson. + +# The script is used for two purposes. Firstly, it is used to generate the +# file "macosarm.mk" of platform settings. If an inweb user selects macos as +# platform on a first run, then this is the file copied into place as +# inweb/platform-settings.mk. But secondly, it also defines macros which +# can be used by any *.mkscript files being converted to *.mk files on +# this platform. + +# Do not edit "macosarm.mk" directly. Instead, edit this script, and then +# rebuild "macosarm.mk" by setting the current working directory to the directory +# _above_ "inweb", and using the command: + +# inweb/Tangled/inweb inweb -prototype inweb/Materials/platforms/macosarm.mkscript -makefile inweb/Materials/platforms/macosarm.mk + +# Or simply: + +# make -f inweb/inweb.mk makers + +# which recreates all of the make-files in the inweb repository from their +# scripts, including macosarm.mk among them. + +# See the inweb manual for documentation on the *.mkscript file format, i.e., +# the format in which this file is written. But it is essentially just a makefile +# with a number of special macro and loop features whose syntax involves braces +# { ... }, so anywhere that you see braces, you're looking at something special +# to *.mkscript; anything else is straightforward make syntax. + +# ----------------------------------------------------------------------------- + +# The first definition in this file should set INWEBPLATFORM to the platform +# name, which is the same as the leafname of this file without the ".mkscript" +# file extension. So: + +INWEBPLATFORM = macosarm + +# The I6 source code has its own set of symbolic names for operating systems, +# not always the same as inweb's names for platforms, so: + +INFORM6OS = MACOS + +# And similarly for glulxe, which is used as part of the dumb-glulx interpreter, +# which is used in testing Inform on the command line: + +GLULXEOS = OS_UNIX + +# On some platforms, executables have a specific file extension, which we define here: + +EXEEXTENSION = + +# ----------------------------------------------------------------------------- + +# These are likely to be the same on all platforms: + +INTEST = intest/Tangled/intest +INWEB = inweb/Tangled/inweb + +# ----------------------------------------------------------------------------- + +# Now three macro definitions: two for compiling C code to *.o object files +# (one being strict about warnings, the other indulgently suppressing them); +# and one for linking those *.o files into an executable. + +{define: compile to: TO from: FROM ?options: OPTS} + clang -std=c11 -c $(MANYWARNINGS) $(CCOPTS) -g {OPTS} -o {TO} {FROM} +{end-define} + +{define: compile-indulgently to: TO from: FROM ?options: OPTS} + clang -std=c99 -c $(FEWERWARNINGS) $(CCOPTS) -g {OPTS} -o {TO} {FROM} +{end-define} + +{define: link to: TO from: FROM ?options: OPTS} + clang $(CCOPTS) -g -o {TO} {FROM} {OPTS} +{end-define} + +# Where: + +CCOPTS = -DPLATFORM_MACOS=1 -target arm64-apple-macos11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk + +MANYWARNINGS = -Weverything -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return -ferror-limit=1000 + +# To explain those: + +# -Wno-pointer-arith: we use the gcc extension allowing (void *) pointers to increment, don't complain +# -Wno-variadic-macros: we use the gcc extension for variadic macros, don't complain +# -Wno-cast-align, -Wno-padded: we don't care about address alignments of structure elements +# -Wno-missing-noreturn: a few fatal-error functions could be marked with +# __attribute__((noreturn)) to prevent this, but gcc doesn't accept +# this except in a predeclaration, which is inconvenient for us +# -Wno-shadow: we don't care if an inner block defines a variable of the same name +# -Wno-unused-macros: a few constants are defined to document external formats rather than for use here +# -Wno-unused-parameter: we don't much care if a function argument isn't used +# -Wno-missing-prototypes: because Preform-defined routines aren't predeclared with prototypes +# -Wno-missing-variable-declarations: these are not for linking, so don't care about extern/static +# -Wno-unreachable-code-break: these derive from Preform-compiled switches, and are harmless +# -Wno-class-varargs: for some reason clang thinks structs shouldn't be passed to variable-argument functions +# -Wno-format-nonliteral: similarly, it thinks all format strings in |printf| should be literals +# -Wno-cast-qual: in OS X 10.11, clang became bothered by casts from (void *) if it thought they were const +# -Wno-double-promotion: in OS X 10.12, clang began warning of possible precision loss: we only need about 1% accuracy anyway +# -Wno-commas: in OS X 10.13, clang began warning about "possible misuse of comma operator" - by misuse, it means use +# -Wno-strict-prototypes: in OS X 10.13, clang began objecting to (some) function prototypes generated by macros +# -Wno-extra-semi-stmt: in OS X 10.15, clang began objecting to redundant semicolons after macros had expanded, +# which is a little tiresome: though it's off by default (on MacOS with -Weverything), we explicitly disable it +# -Wno-c11-extensions: we want to allow ourselves use of _Noreturn, a C11 annotation... +# -Wno-unreachable-code-return: ...which means some compilers can prove some of our return statements unnecessary + +FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return diff --git a/Materials/platforms/macosuniv.mk b/Materials/platforms/macosuniv.mk new file mode 100644 index 0000000..e20ae7c --- /dev/null +++ b/Materials/platforms/macosuniv.mk @@ -0,0 +1,21 @@ +# This makefile was automatically written by inweb -makefile +# and is not intended for human editing + +INWEBPLATFORM = macosuniv + +INFORM6OS = MACOS + +GLULXEOS = OS_UNIX + +EXEEXTENSION = + +INTEST = intest/Tangled/intest +INWEB = inweb/Tangled/inweb + +CCOPTSX = -DPLATFORM_MACOS=1 -target x86_64-apple-macos10.12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk +CCOPTSA = -DPLATFORM_MACOS=1 -target arm64-apple-macos11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk + +MANYWARNINGS = -Weverything -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return -ferror-limit=1000 + +FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return + diff --git a/Materials/platforms/macosuniv.mkscript b/Materials/platforms/macosuniv.mkscript new file mode 100644 index 0000000..765ea70 --- /dev/null +++ b/Materials/platforms/macosuniv.mkscript @@ -0,0 +1,114 @@ +# This is "macosuniv.mkscript", a script which defines build settings used in +# inweb, intest, inform and all of their subsidiary tools for the platform +# "macos". The maintainer of this file is Graham Nelson. + +# The script is used for two purposes. Firstly, it is used to generate the +# file "macosuniv.mk" of platform settings. If an inweb user selects macos as +# platform on a first run, then this is the file copied into place as +# inweb/platform-settings.mk. But secondly, it also defines macros which +# can be used by any *.mkscript files being converted to *.mk files on +# this platform. + +# Do not edit "macosuniv.mk" directly. Instead, edit this script, and then +# rebuild "macosuniv.mk" by setting the current working directory to the directory +# _above_ "inweb", and using the command: + +# inweb/Tangled/inweb inweb -prototype inweb/Materials/platforms/macosuniv.mkscript -makefile inweb/Materials/platforms/macosuniv.mk + +# Or simply: + +# make -f inweb/inweb.mk makers + +# which recreates all of the make-files in the inweb repository from their +# scripts, including macosuniv.mk among them. + +# See the inweb manual for documentation on the *.mkscript file format, i.e., +# the format in which this file is written. But it is essentially just a makefile +# with a number of special macro and loop features whose syntax involves braces +# { ... }, so anywhere that you see braces, you're looking at something special +# to *.mkscript; anything else is straightforward make syntax. + +# ----------------------------------------------------------------------------- + +# The first definition in this file should set INWEBPLATFORM to the platform +# name, which is the same as the leafname of this file without the ".mkscript" +# file extension. So: + +INWEBPLATFORM = macosuniv + +# The I6 source code has its own set of symbolic names for operating systems, +# not always the same as inweb's names for platforms, so: + +INFORM6OS = MACOS + +# And similarly for glulxe, which is used as part of the dumb-glulx interpreter, +# which is used in testing Inform on the command line: + +GLULXEOS = OS_UNIX + +# On some platforms, executables have a specific file extension, which we define here: + +EXEEXTENSION = + +# ----------------------------------------------------------------------------- + +# These are likely to be the same on all platforms: + +INTEST = intest/Tangled/intest +INWEB = inweb/Tangled/inweb + +# ----------------------------------------------------------------------------- + +# Now three macro definitions: two for compiling C code to *.o object files +# (one being strict about warnings, the other indulgently suppressing them); +# and one for linking those *.o files into an executable. + +{define: compile to: TO from: FROM ?options: OPTS} + clang -std=c11 -c $(MANYWARNINGS) $(CCOPTSX) -g {OPTS} -o {modify-filenames original: {TO} suffix: _x86} {FROM} + clang -std=c11 -c $(MANYWARNINGS) $(CCOPTSA) -g {OPTS} -o {modify-filenames original: {TO} suffix: _arm} {FROM} +{end-define} + +{define: compile-indulgently to: TO from: FROM ?options: OPTS} + clang -std=c99 -c $(FEWERWARNINGS) $(CCOPTSX) -g {OPTS} -o {modify-filenames original: {TO} suffix: _x86} {modify-filenames original: {FROM} suffix: _x86} + clang -std=c99 -c $(FEWERWARNINGS) $(CCOPTSA) -g {OPTS} -o {modify-filenames original: {TO} suffix: _arm} {modify-filenames original: {FROM} suffix: _arm} +{end-define} + +{define: link to: TO from: FROM ?options: OPTS} + clang $(CCOPTSX) -g -o {modify-filenames original: {TO} suffix: _x86} {modify-filenames original: {FROM} suffix: _x86} {OPTS} + clang $(CCOPTSA) -g -o {modify-filenames original: {TO} suffix: _arm} {modify-filenames original: {FROM} suffix: _arm} {OPTS} + lipo -create -output {TO} {modify-filenames original: {TO} suffix: _x86} {modify-filenames original: {TO} suffix: _arm} +{end-define} + +# Where: + +CCOPTSX = -DPLATFORM_MACOS=1 -target x86_64-apple-macos10.12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk +CCOPTSA = -DPLATFORM_MACOS=1 -target arm64-apple-macos11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk + +MANYWARNINGS = -Weverything -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return -ferror-limit=1000 + +# To explain those: + +# -Wno-pointer-arith: we use the gcc extension allowing (void *) pointers to increment, don't complain +# -Wno-variadic-macros: we use the gcc extension for variadic macros, don't complain +# -Wno-cast-align, -Wno-padded: we don't care about address alignments of structure elements +# -Wno-missing-noreturn: a few fatal-error functions could be marked with +# __attribute__((noreturn)) to prevent this, but gcc doesn't accept +# this except in a predeclaration, which is inconvenient for us +# -Wno-shadow: we don't care if an inner block defines a variable of the same name +# -Wno-unused-macros: a few constants are defined to document external formats rather than for use here +# -Wno-unused-parameter: we don't much care if a function argument isn't used +# -Wno-missing-prototypes: because Preform-defined routines aren't predeclared with prototypes +# -Wno-missing-variable-declarations: these are not for linking, so don't care about extern/static +# -Wno-unreachable-code-break: these derive from Preform-compiled switches, and are harmless +# -Wno-class-varargs: for some reason clang thinks structs shouldn't be passed to variable-argument functions +# -Wno-format-nonliteral: similarly, it thinks all format strings in |printf| should be literals +# -Wno-cast-qual: in OS X 10.11, clang became bothered by casts from (void *) if it thought they were const +# -Wno-double-promotion: in OS X 10.12, clang began warning of possible precision loss: we only need about 1% accuracy anyway +# -Wno-commas: in OS X 10.13, clang began warning about "possible misuse of comma operator" - by misuse, it means use +# -Wno-strict-prototypes: in OS X 10.13, clang began objecting to (some) function prototypes generated by macros +# -Wno-extra-semi-stmt: in OS X 10.15, clang began objecting to redundant semicolons after macros had expanded, +# which is a little tiresome: though it's off by default (on MacOS with -Weverything), we explicitly disable it +# -Wno-c11-extensions: we want to allow ourselves use of _Noreturn, a C11 annotation... +# -Wno-unreachable-code-return: ...which means some compilers can prove some of our return statements unnecessary + +FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return diff --git a/Materials/platforms/mascosarm.mk b/Materials/platforms/mascosarm.mk new file mode 100644 index 0000000..bc33a99 --- /dev/null +++ b/Materials/platforms/mascosarm.mk @@ -0,0 +1,3 @@ +# This makefile was automatically written by inweb -makefile +# and is not intended for human editing + diff --git a/README.md b/README.md index 3daaa3a..e47e85a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Inweb 7.1.0 -v7.1.0-beta+1A97 'Escape to Danger' (29 April 2022) +v7.1.0-beta+1A98 'Escape to Danger' (30 April 2022) ## About Inweb diff --git a/Tangled/inweb.c b/Tangled/inweb.c index 524e40e..ac47236 100644 --- a/Tangled/inweb.c +++ b/Tangled/inweb.c @@ -2409,7 +2409,7 @@ typedef struct tex_results { struct filename *PDF_filename; CLASS_DEFINITION } tex_results; -#line 47 "inweb/Chapter 6/Makefiles.w" +#line 51 "inweb/Chapter 6/Makefiles.w" typedef struct makefile_specifics { struct web *for_web; /* if one has been set at the command line */ struct dictionary *tools_dictionary; /* components with |type: tool| */ @@ -4563,21 +4563,23 @@ void TeXUtilities__remove_math_mode(OUTPUT_STREAM, text_stream *text) ; void TeXUtilities__remove_math_mode_range(OUTPUT_STREAM, text_stream *text, int from, int to) ; #line 12 "inweb/Chapter 6/Makefiles.w" void Makefiles__write(web *W, filename *prototype, filename *F, module_search *I, text_stream *platform) ; -#line 68 "inweb/Chapter 6/Makefiles.w" +#line 72 "inweb/Chapter 6/Makefiles.w" void Makefiles__identity_settings_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) ; -#line 90 "inweb/Chapter 6/Makefiles.w" +#line 94 "inweb/Chapter 6/Makefiles.w" void Makefiles__platform_settings_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) ; -#line 115 "inweb/Chapter 6/Makefiles.w" +#line 119 "inweb/Chapter 6/Makefiles.w" void Makefiles__seek_INWEBPLATFORM(text_stream *line, text_file_position *tfp, void *X) ; -#line 125 "inweb/Chapter 6/Makefiles.w" +#line 129 "inweb/Chapter 6/Makefiles.w" +void Makefiles__modify_filenames_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) ; +#line 186 "inweb/Chapter 6/Makefiles.w" void Makefiles__component_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) ; -#line 175 "inweb/Chapter 6/Makefiles.w" +#line 236 "inweb/Chapter 6/Makefiles.w" void Makefiles__components_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) ; -#line 208 "inweb/Chapter 6/Makefiles.w" +#line 269 "inweb/Chapter 6/Makefiles.w" void Makefiles__dependent_files_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) ; -#line 264 "inweb/Chapter 6/Makefiles.w" +#line 325 "inweb/Chapter 6/Makefiles.w" void Makefiles__pattern(OUTPUT_STREAM, linked_list *L, filename *F) ; -#line 305 "inweb/Chapter 6/Makefiles.w" +#line 366 "inweb/Chapter 6/Makefiles.w" void Makefiles__pathname_slashed(OUTPUT_STREAM, pathname *P) ; #line 8 "inweb/Chapter 6/Git Support.w" void Git__write_gitignore(web *W, filename *prototype, filename *F) ; @@ -5321,6 +5323,8 @@ text_stream *TL_IS_675 = NULL; text_stream *TL_IS_676 = NULL; text_stream *TL_IS_677 = NULL; text_stream *TL_IS_678 = NULL; +text_stream *TL_IS_679 = NULL; +text_stream *TL_IS_680 = NULL; void register_tangled_text_literals(void); #line 57 "inweb/foundation-module/Chapter 2/Streams.w" #define WRITE(args...) Writers__printf(OUT, args) @@ -8739,11 +8743,11 @@ int CommandLine__read_pair_p(text_stream *opt, text_stream *opt_val, int N, ; innocuous = TRUE; break; case VERSION_CLSW: { PRINT("inweb"); - char *svn = "7.1.0-beta+1A96"; + char *svn = "7.1.0-beta+1A97"; if (svn[0]) PRINT(" version %s", svn); char *vname = "Escape to Danger"; if (vname[0]) PRINT(" '%s'", vname); - char *d = "28 April 2022"; + char *d = "29 April 2022"; if (d[0]) PRINT(" (%s)", d); PRINT("\n"); innocuous = TRUE; break; @@ -31233,20 +31237,24 @@ void Makefiles__write(web *W, filename *prototype, filename *F, module_search *I Preprocessor__new_macro(L, TL_IS_637, NULL, Makefiles__identity_settings_expander, NULL); - Preprocessor__new_macro(L, + preprocessor_macro *mf = Preprocessor__new_macro(L, TL_IS_638, TL_IS_639, - Makefiles__component_expander, NULL); + Makefiles__modify_filenames_expander, NULL); + Preprocessor__do_not_suppress_whitespace(mf); Preprocessor__new_macro(L, TL_IS_640, TL_IS_641, + Makefiles__component_expander, NULL); + Preprocessor__new_macro(L, + TL_IS_642, TL_IS_643, Makefiles__dependent_files_expander, NULL); Preprocessor__new_loop_macro(L, - TL_IS_642, TL_IS_643, + TL_IS_644, TL_IS_645, Makefiles__components_expander, NULL); makefile_specifics *specifics = CREATE(makefile_specifics); { -#line 58 "inweb/Chapter 6/Makefiles.w" +#line 62 "inweb/Chapter 6/Makefiles.w" specifics->for_web = W; specifics->tools_dictionary = Dictionaries__new(16, FALSE); specifics->webs_dictionary = Dictionaries__new(16, FALSE); @@ -31255,7 +31263,7 @@ void Makefiles__write(web *W, filename *prototype, filename *F, module_search *I specifics->which_platform = platform; } -#line 32 "inweb/Chapter 6/Makefiles.w" +#line 36 "inweb/Chapter 6/Makefiles.w" ; text_stream *header = Str__new(); @@ -31267,15 +31275,15 @@ void Makefiles__write(web *W, filename *prototype, filename *F, module_search *I STORE_POINTER_makefile_specifics(specifics), '#'); } -#line 56 "inweb/Chapter 6/Makefiles.w" +#line 60 "inweb/Chapter 6/Makefiles.w" -#line 68 "inweb/Chapter 6/Makefiles.w" +#line 72 "inweb/Chapter 6/Makefiles.w" void Makefiles__identity_settings_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) { makefile_specifics *specifics = RETRIEVE_POINTER_makefile_specifics(PPS->specifics); text_stream *OUT = PPS->dest; WRITE("INWEB = "); Makefiles__pathname_slashed(OUT, path_to_inweb); WRITE("/Tangled/inweb\n"); - pathname *path_to_intest = Pathnames__down(Pathnames__up(path_to_inweb), TL_IS_644); + pathname *path_to_intest = Pathnames__down(Pathnames__up(path_to_inweb), TL_IS_646); WRITE("INTEST = "); Makefiles__pathname_slashed(OUT, path_to_intest); WRITE("/Tangled/intest\n"); if (specifics->for_web) { WRITE("MYNAME = %S\n", Pathnames__directory_name(specifics->for_web->md->path_to_web)); @@ -31285,13 +31293,13 @@ void Makefiles__identity_settings_expander(preprocessor_macro *mm, preprocessor_ } } -#line 90 "inweb/Chapter 6/Makefiles.w" +#line 94 "inweb/Chapter 6/Makefiles.w" void Makefiles__platform_settings_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) { makefile_specifics *specifics = RETRIEVE_POINTER_makefile_specifics(PPS->specifics); text_stream *INWEBPLATFORM = Str__duplicate(specifics->which_platform); if (Str__len(INWEBPLATFORM) == 0) { - filename *ps = Filenames__in(path_to_inweb, TL_IS_645); + filename *ps = Filenames__in(path_to_inweb, TL_IS_647); TextFiles__read(ps, FALSE, "can't open platform settings file", TRUE, Makefiles__seek_INWEBPLATFORM, NULL, INWEBPLATFORM); } @@ -31299,8 +31307,8 @@ void Makefiles__platform_settings_expander(preprocessor_macro *mm, preprocessor_ Errors__in_text_file( "found platform settings file, but it does not set INWEBPLATFORM", tfp); } else { - pathname *P = Pathnames__down(path_to_inweb, TL_IS_646); - P = Pathnames__down(P, TL_IS_647); + pathname *P = Pathnames__down(path_to_inweb, TL_IS_648); + P = Pathnames__down(P, TL_IS_649); WRITE_TO(INWEBPLATFORM, ".mkscript"); filename *F = Filenames__in(P, INWEBPLATFORM); TextFiles__read(F, FALSE, "can't open platform definitions file", @@ -31318,7 +31326,98 @@ void Makefiles__seek_INWEBPLATFORM(text_stream *line, text_file_position *tfp, v Regexp__dispose_of(&mr); } -#line 125 "inweb/Chapter 6/Makefiles.w" +#line 129 "inweb/Chapter 6/Makefiles.w" +void Makefiles__modify_filenames_expander(preprocessor_macro *mm, preprocessor_state *PPS, + text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) { + text_stream *OUT = PPS->dest; + + text_stream *original = parameter_values[0]; + text_stream *suffix = parameter_values[1]; + text_stream *prefix = parameter_values[2]; + + wchar_t previous = 'X'; int quoted = FALSE, boundary = FALSE; + TEMPORARY_TEXT(captured) + LOOP_THROUGH_TEXT(pos, original) { + wchar_t c = Str__get(pos); + if (c == '\'') { quoted = quoted?FALSE:TRUE; } + if (Characters__is_whitespace(c)) { + if ((previous != '\\') && (quoted == FALSE)) boundary = TRUE; + } else { + if (boundary) +{ +#line 156 "inweb/Chapter 6/Makefiles.w" + Str__trim_white_space(captured); + if (Str__len(captured) > 0) { + int in_quotes = FALSE; + if ((Str__get_first_char(captured) == '\'') && (Str__get_last_char(captured) == '\'')) { + Str__delete_first_character(captured); + Str__delete_last_character(captured); + in_quotes = TRUE; + } + if (in_quotes) WRITE("'"); + int last_slash = -1; + for (int i=0; i= 0) + for (int i=last_slash; i 0) { + int in_quotes = FALSE; + if ((Str__get_first_char(captured) == '\'') && (Str__get_last_char(captured) == '\'')) { + Str__delete_first_character(captured); + Str__delete_last_character(captured); + in_quotes = TRUE; + } + if (in_quotes) WRITE("'"); + int last_slash = -1; + for (int i=0; i= 0) + for (int i=last_slash; ispecifics); @@ -31330,12 +31429,12 @@ void Makefiles__component_expander(preprocessor_macro *mm, preprocessor_state *P text_stream *set = parameter_values[3]; text_stream *category = parameter_values[4]; - if (Str__eq(category, TL_IS_648)) { + if (Str__eq(category, TL_IS_650)) { int marker = MAKEFILE_TOOL_MOM; dictionary *D = specifics->tools_dictionary; { -#line 158 "inweb/Chapter 6/Makefiles.w" +#line 219 "inweb/Chapter 6/Makefiles.w" web_md *Wm = Reader__load_web_md(Pathnames__from_text(path), NULL, specifics->search_path, TRUE); Wm->as_module->module_name = Str__duplicate(symbol); @@ -31345,25 +31444,25 @@ void Makefiles__component_expander(preprocessor_macro *mm, preprocessor_state *P Dictionaries__write_value(D, symbol, Wm); } -#line 139 "inweb/Chapter 6/Makefiles.w" +#line 200 "inweb/Chapter 6/Makefiles.w" ; { -#line 167 "inweb/Chapter 6/Makefiles.w" +#line 228 "inweb/Chapter 6/Makefiles.w" WRITE("%SLEAF = %S\n", symbol, webname); WRITE("%SWEB = %S\n", symbol, path); WRITE("%SMAKER = $(%SWEB)/%S.mk\n", symbol, symbol, webname); WRITE("%SX = $(%SWEB)/Tangled/%S\n", symbol, symbol, webname); } -#line 140 "inweb/Chapter 6/Makefiles.w" +#line 201 "inweb/Chapter 6/Makefiles.w" ; - } else if (Str__eq(category, TL_IS_649)) { + } else if (Str__eq(category, TL_IS_651)) { int marker = MAKEFILE_WEB_MOM; dictionary *D = specifics->webs_dictionary; { -#line 158 "inweb/Chapter 6/Makefiles.w" +#line 219 "inweb/Chapter 6/Makefiles.w" web_md *Wm = Reader__load_web_md(Pathnames__from_text(path), NULL, specifics->search_path, TRUE); Wm->as_module->module_name = Str__duplicate(symbol); @@ -31373,25 +31472,25 @@ void Makefiles__component_expander(preprocessor_macro *mm, preprocessor_state *P Dictionaries__write_value(D, symbol, Wm); } -#line 144 "inweb/Chapter 6/Makefiles.w" +#line 205 "inweb/Chapter 6/Makefiles.w" ; { -#line 167 "inweb/Chapter 6/Makefiles.w" +#line 228 "inweb/Chapter 6/Makefiles.w" WRITE("%SLEAF = %S\n", symbol, webname); WRITE("%SWEB = %S\n", symbol, path); WRITE("%SMAKER = $(%SWEB)/%S.mk\n", symbol, symbol, webname); WRITE("%SX = $(%SWEB)/Tangled/%S\n", symbol, symbol, webname); } -#line 145 "inweb/Chapter 6/Makefiles.w" +#line 206 "inweb/Chapter 6/Makefiles.w" ; - } else if (Str__eq(category, TL_IS_650)) { + } else if (Str__eq(category, TL_IS_652)) { int marker = MAKEFILE_MODULE_MOM; dictionary *D = specifics->modules_dictionary; { -#line 158 "inweb/Chapter 6/Makefiles.w" +#line 219 "inweb/Chapter 6/Makefiles.w" web_md *Wm = Reader__load_web_md(Pathnames__from_text(path), NULL, specifics->search_path, TRUE); Wm->as_module->module_name = Str__duplicate(symbol); @@ -31401,18 +31500,18 @@ void Makefiles__component_expander(preprocessor_macro *mm, preprocessor_state *P Dictionaries__write_value(D, symbol, Wm); } -#line 149 "inweb/Chapter 6/Makefiles.w" +#line 210 "inweb/Chapter 6/Makefiles.w" ; { -#line 167 "inweb/Chapter 6/Makefiles.w" +#line 228 "inweb/Chapter 6/Makefiles.w" WRITE("%SLEAF = %S\n", symbol, webname); WRITE("%SWEB = %S\n", symbol, path); WRITE("%SMAKER = $(%SWEB)/%S.mk\n", symbol, symbol, webname); WRITE("%SX = $(%SWEB)/Tangled/%S\n", symbol, symbol, webname); } -#line 150 "inweb/Chapter 6/Makefiles.w" +#line 211 "inweb/Chapter 6/Makefiles.w" ; } else { Errors__in_text_file("category should be 'tool', 'module' or 'web'", tfp); @@ -31420,70 +31519,70 @@ void Makefiles__component_expander(preprocessor_macro *mm, preprocessor_state *P PPS->last_line_was_blank = FALSE; } -#line 175 "inweb/Chapter 6/Makefiles.w" +#line 236 "inweb/Chapter 6/Makefiles.w" void Makefiles__components_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) { - Preprocessor__set_loop_var_name(loop, TL_IS_651); + Preprocessor__set_loop_var_name(loop, TL_IS_653); text_stream *category = parameter_values[0]; text_stream *set = parameter_values[1]; - if (Str__len(set) == 0) set = TL_IS_652; - if (Str__eq(category, TL_IS_653)) { + if (Str__len(set) == 0) set = TL_IS_654; + if (Str__eq(category, TL_IS_655)) { int marker = MAKEFILE_TOOL_MOM; { -#line 196 "inweb/Chapter 6/Makefiles.w" +#line 257 "inweb/Chapter 6/Makefiles.w" module *M; LOOP_OVER(M, module) { if ((M->origin_marker == marker) && - ((Str__eq(set, TL_IS_656)) || (Str__eq(set, M->module_tag)))) { + ((Str__eq(set, TL_IS_658)) || (Str__eq(set, M->module_tag)))) { text_stream *value = M->module_name; Preprocessor__add_loop_iteration(loop, value); } } } -#line 183 "inweb/Chapter 6/Makefiles.w" +#line 244 "inweb/Chapter 6/Makefiles.w" ; - } else if (Str__eq(category, TL_IS_654)) { + } else if (Str__eq(category, TL_IS_656)) { int marker = MAKEFILE_WEB_MOM; { -#line 196 "inweb/Chapter 6/Makefiles.w" +#line 257 "inweb/Chapter 6/Makefiles.w" module *M; LOOP_OVER(M, module) { if ((M->origin_marker == marker) && - ((Str__eq(set, TL_IS_656)) || (Str__eq(set, M->module_tag)))) { + ((Str__eq(set, TL_IS_658)) || (Str__eq(set, M->module_tag)))) { text_stream *value = M->module_name; Preprocessor__add_loop_iteration(loop, value); } } } -#line 186 "inweb/Chapter 6/Makefiles.w" +#line 247 "inweb/Chapter 6/Makefiles.w" ; - } else if (Str__eq(category, TL_IS_655)) { + } else if (Str__eq(category, TL_IS_657)) { int marker = MAKEFILE_MODULE_MOM; { -#line 196 "inweb/Chapter 6/Makefiles.w" +#line 257 "inweb/Chapter 6/Makefiles.w" module *M; LOOP_OVER(M, module) { if ((M->origin_marker == marker) && - ((Str__eq(set, TL_IS_656)) || (Str__eq(set, M->module_tag)))) { + ((Str__eq(set, TL_IS_658)) || (Str__eq(set, M->module_tag)))) { text_stream *value = M->module_name; Preprocessor__add_loop_iteration(loop, value); } } } -#line 189 "inweb/Chapter 6/Makefiles.w" +#line 250 "inweb/Chapter 6/Makefiles.w" ; } else { Errors__in_text_file("category should be 'tool', 'module' or 'web'", tfp); } } -#line 208 "inweb/Chapter 6/Makefiles.w" +#line 269 "inweb/Chapter 6/Makefiles.w" void Makefiles__dependent_files_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) { makefile_specifics *specifics = RETRIEVE_POINTER_makefile_specifics(PPS->specifics); @@ -31536,12 +31635,12 @@ void Makefiles__dependent_files_expander(preprocessor_macro *mm, preprocessor_st PPS->last_line_was_blank = FALSE; } -#line 264 "inweb/Chapter 6/Makefiles.w" +#line 325 "inweb/Chapter 6/Makefiles.w" void Makefiles__pattern(OUTPUT_STREAM, linked_list *L, filename *F) { dictionary *patterns_done = Dictionaries__new(16, TRUE); if (F) { -#line 275 "inweb/Chapter 6/Makefiles.w" +#line 336 "inweb/Chapter 6/Makefiles.w" pathname *P = Filenames__up(F); TEMPORARY_TEXT(leaf_pattern) WRITE_TO(leaf_pattern, "%S", Pathnames__directory_name(P)); @@ -31568,14 +31667,14 @@ void Makefiles__pattern(OUTPUT_STREAM, linked_list *L, filename *F) { DISCARD_TEXT(tester) } -#line 266 "inweb/Chapter 6/Makefiles.w" +#line 327 "inweb/Chapter 6/Makefiles.w" ; section_md *Sm; LOOP_OVER_LINKED_LIST(Sm, section_md, L) { filename *F = Sm->source_file_for_section; { -#line 275 "inweb/Chapter 6/Makefiles.w" +#line 336 "inweb/Chapter 6/Makefiles.w" pathname *P = Filenames__up(F); TEMPORARY_TEXT(leaf_pattern) WRITE_TO(leaf_pattern, "%S", Pathnames__directory_name(P)); @@ -31602,12 +31701,12 @@ void Makefiles__pattern(OUTPUT_STREAM, linked_list *L, filename *F) { DISCARD_TEXT(tester) } -#line 270 "inweb/Chapter 6/Makefiles.w" +#line 331 "inweb/Chapter 6/Makefiles.w" ; } } -#line 305 "inweb/Chapter 6/Makefiles.w" +#line 366 "inweb/Chapter 6/Makefiles.w" void Makefiles__pathname_slashed(OUTPUT_STREAM, pathname *P) { TEMPORARY_TEXT(PT) WRITE_TO(PT, "%p", P); @@ -31622,7 +31721,7 @@ void Makefiles__pathname_slashed(OUTPUT_STREAM, pathname *P) { #line 8 "inweb/Chapter 6/Git Support.w" void Git__write_gitignore(web *W, filename *prototype, filename *F) { linked_list *L = NEW_LINKED_LIST(preprocessor_macro); - Preprocessor__new_macro(L, TL_IS_657, NULL, Git__basics_expander, NULL); + Preprocessor__new_macro(L, TL_IS_659, NULL, Git__basics_expander, NULL); text_stream *header = Str__new(); WRITE_TO(header, "# This gitignore was automatically written by inweb -gitignore\n"); WRITE_TO(header, "# and is not intended for human editing\n\n"); @@ -31633,7 +31732,7 @@ void Git__write_gitignore(web *W, filename *prototype, filename *F) { #line 22 "inweb/Chapter 6/Git Support.w" void Git__basics_expander(preprocessor_macro *mm, preprocessor_state *PPS, text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) { - filename *prototype = Filenames__in(path_to_inweb_materials, TL_IS_658); + filename *prototype = Filenames__in(path_to_inweb_materials, TL_IS_660); TextFiles__read(prototype, FALSE, "can't open basic .gitignore file", TRUE, Preprocessor__scan_line, NULL, PPS); WRITE_TO(STDOUT, "(Read basics.giscript from inweb/"); @@ -31649,7 +31748,7 @@ void Ctags__write(web *W, filename *F) { P = Filenames__up(F); } else { P = W->md->path_to_web; - F = Filenames__in(P, TL_IS_659); + F = Filenames__in(P, TL_IS_661); } text_stream *OUT = &ctags_file; if (STREAM_OPEN_TO_FILE(OUT, F, UTF8_ENC) == FALSE) @@ -31661,7 +31760,7 @@ void Ctags__write(web *W, filename *F) { WRITE("!_TAG_FILE_SORTED\t0\t/0=unsorted, 1=sorted, 2=foldcase/\n"); WRITE("!_TAG_PROGRAM_AUTHOR\tGraham Nelson\t/graham.nelson@mod-langs.ox.ac.uk/\n"); WRITE("!_TAG_PROGRAM_NAME\tinweb\t//\n"); - WRITE("!_TAG_PROGRAM_VERSION\t7.1.0-beta+1A96\t/built 28 April 2022/\n"); + WRITE("!_TAG_PROGRAM_VERSION\t7.1.0-beta+1A97\t/built 29 April 2022/\n"); } #line 47 "inweb/Chapter 6/Ctags Support.w" @@ -31752,7 +31851,7 @@ void Ctags__note_defined_constant(source_line *L, text_stream *name) { void Readme__write(filename *prototype, filename *F) { linked_list *L = NEW_LINKED_LIST(preprocessor_macro); preprocessor_macro *mm = Preprocessor__new_macro(L, - TL_IS_660, TL_IS_661, + TL_IS_662, TL_IS_663, Readme__bibliographic_expander, NULL); Preprocessor__do_not_suppress_whitespace(mm); WRITE_TO(STDOUT, "(Read script from %f)\n", prototype); @@ -31767,8 +31866,8 @@ void Readme__bibliographic_expander(preprocessor_macro *mm, preprocessor_state * text_stream *OUT = PPS->dest; writeme_asset *A = Readme__find_asset(asset_name); if (A->if_web) WRITE("%S", Bibliographic__get_datum(A->if_web, datum)); - else if (Str__eq(datum, TL_IS_662)) WRITE("%S", A->date); - else if (Str__eq(datum, TL_IS_663)) WRITE("%S", A->version); + else if (Str__eq(datum, TL_IS_664)) WRITE("%S", A->date); + else if (Str__eq(datum, TL_IS_665)) WRITE("%S", A->version); } #line 49 "inweb/Chapter 6/Readme Writeme.w" @@ -31776,8 +31875,8 @@ void Readme__bibliographic_expander(preprocessor_macro *mm, preprocessor_state * void Readme__write_var(text_stream *OUT, text_stream *program, text_stream *datum) { writeme_asset *A = Readme__find_asset(program); if (A->if_web) WRITE("%S", Bibliographic__get_datum(A->if_web, datum)); - else if (Str__eq(datum, TL_IS_664)) WRITE("%S", A->date); - else if (Str__eq(datum, TL_IS_665)) WRITE("%S", A->version); + else if (Str__eq(datum, TL_IS_666)) WRITE("%S", A->date); + else if (Str__eq(datum, TL_IS_667)) WRITE("%S", A->version); } #line 60 "inweb/Chapter 6/Readme Writeme.w" @@ -31808,7 +31907,7 @@ writeme_asset *Readme__find_asset(text_stream *program) { A->if_web = WebMetadata__get_without_modules(Pathnames__from_text(program), NULL); } else { filename *I6_vn = Filenames__in( - Pathnames__down(Pathnames__from_text(program), TL_IS_666), TL_IS_667); + Pathnames__down(Pathnames__from_text(program), TL_IS_668), TL_IS_669); if (TextFiles__exists(I6_vn)) { #line 97 "inweb/Chapter 6/Readme Writeme.w" @@ -31818,7 +31917,7 @@ writeme_asset *Readme__find_asset(text_stream *program) { } #line 82 "inweb/Chapter 6/Readme Writeme.w" ; - filename *template_vn = Filenames__in(Pathnames__from_text(program), TL_IS_668); + filename *template_vn = Filenames__in(Pathnames__from_text(program), TL_IS_670); if (TextFiles__exists(template_vn)) { #line 101 "inweb/Chapter 6/Readme Writeme.w" @@ -31828,7 +31927,7 @@ writeme_asset *Readme__find_asset(text_stream *program) { } #line 84 "inweb/Chapter 6/Readme Writeme.w" ; - filename *rmt_vn = Filenames__in(Pathnames__from_text(program), TL_IS_669); + filename *rmt_vn = Filenames__in(Pathnames__from_text(program), TL_IS_671); if (TextFiles__exists(rmt_vn)) { #line 105 "inweb/Chapter 6/Readme Writeme.w" @@ -31838,7 +31937,7 @@ writeme_asset *Readme__find_asset(text_stream *program) { } #line 86 "inweb/Chapter 6/Readme Writeme.w" ; - rmt_vn = Filenames__in(Pathnames__from_text(program), TL_IS_670); + rmt_vn = Filenames__in(Pathnames__from_text(program), TL_IS_672); if (TextFiles__exists(rmt_vn)) { #line 105 "inweb/Chapter 6/Readme Writeme.w" @@ -31913,7 +32012,7 @@ void Readme__readme_harvester(text_stream *text, text_file_position *tfp, void * void Colonies__load(filename *F) { colony *C = CREATE(colony); C->members = NEW_LINKED_LIST(colony_member); - C->home = TL_IS_671; + C->home = TL_IS_673; C->assets_path = NULL; C->patterns_path = NULL; colony_reader_state crs; @@ -31937,8 +32036,8 @@ void Colonies__read_line(text_stream *line, text_file_position *tfp, void *v_crs match_results mr = Regexp__create_mr(); if (Regexp__match(&mr, line, L"(%c*?): \"*(%C+)\" at \"(%c*)\" in \"(%c*)\"")) { colony_member *CM = CREATE(colony_member); - if (Str__eq(mr.exp[0], TL_IS_672)) CM->web_rather_than_module = TRUE; - else if (Str__eq(mr.exp[0], TL_IS_673)) CM->web_rather_than_module = FALSE; + if (Str__eq(mr.exp[0], TL_IS_674)) CM->web_rather_than_module = TRUE; + else if (Str__eq(mr.exp[0], TL_IS_675)) CM->web_rather_than_module = FALSE; else { CM->web_rather_than_module = FALSE; Errors__in_text_file("text before ':' must be 'web' or 'module'", tfp); @@ -31946,7 +32045,7 @@ void Colonies__read_line(text_stream *line, text_file_position *tfp, void *v_crs CM->name = Str__duplicate(mr.exp[1]); CM->path = Str__duplicate(mr.exp[2]); CM->home_leaf = Str__new(); - if (Str__suffix_eq(CM->path, TL_IS_674, 6)) { + if (Str__suffix_eq(CM->path, TL_IS_676, 6)) { filename *F = Filenames__from_text(CM->path); Filenames__write_unextended_leafname(CM->home_leaf, F); WRITE_TO(CM->home_leaf, ".html"); @@ -32086,7 +32185,7 @@ module *Colonies__as_module(colony_member *CM, source_line *L, web_md *Wm) { #line 254 "inweb/Chapter 6/Colonies.w" filename *F = NULL; pathname *P = NULL; - if (Str__suffix_eq(CM->path, TL_IS_675, 6)) + if (Str__suffix_eq(CM->path, TL_IS_677, 6)) F = Filenames__from_text(CM->path); else P = Pathnames__from_text(CM->path); @@ -32113,7 +32212,7 @@ text_stream *Colonies__home(void) { colony *C; LOOP_OVER(C, colony) return C->home; - return TL_IS_676; + return TL_IS_678; } pathname *Colonies__assets_path(void) { @@ -32305,7 +32404,7 @@ int Colonies__resolve_reference_in_weave_inner(text_stream *url, text_stream *ti return FALSE; } if (N > 1) { - Main__error_in_web(TL_IS_677, L); + Main__error_in_web(TL_IS_679, L); WebModules__named_reference(&found_M, &found_Sm, &bare_module_name, title, search_M, text, TRUE, FALSE); return FALSE; @@ -32387,7 +32486,7 @@ void Colonies__paragraph_URL(OUTPUT_STREAM, paragraph *P, filename *from) { if (P == NULL) internal_error("no para"); section *to_S = P->under_section; module *to_M = to_S->md->owning_module; - if (Str__ne(to_M->module_name, TL_IS_678)) { + if (Str__ne(to_M->module_name, TL_IS_680)) { colony_member *to_C = Colonies__find(to_M->module_name); if (to_C) { pathname *from_path = Filenames__up(from); @@ -33054,45 +33153,47 @@ void register_tangled_text_literals(void) { TL_IS_635 = Str__literal(L"forall"); TL_IS_636 = Str__literal(L"platform-settings"); TL_IS_637 = Str__literal(L"identity-settings"); - TL_IS_638 = Str__literal(L"component"); - TL_IS_639 = Str__literal(L"symbol: SYMBOL webname: WEBNAME path: PATH set: SET type: TYPE"); - TL_IS_640 = Str__literal(L"dependent-files"); - TL_IS_641 = Str__literal(L"?tool: TOOL ?module: MODULES ?tool-and-modules: BOTH"); - TL_IS_642 = Str__literal(L"components"); - TL_IS_643 = Str__literal(L"type: TYPE ?set: SET"); - TL_IS_644 = Str__literal(L"intest"); - TL_IS_645 = Str__literal(L"platform-settings.mk"); - TL_IS_646 = Str__literal(L"Materials"); - TL_IS_647 = Str__literal(L"platforms"); - TL_IS_648 = Str__literal(L"tool"); - TL_IS_649 = Str__literal(L"web"); - TL_IS_650 = Str__literal(L"module"); - TL_IS_651 = Str__literal(L"SYMBOL"); - TL_IS_652 = Str__literal(L"all"); - TL_IS_653 = Str__literal(L"tool"); - TL_IS_654 = Str__literal(L"web"); - TL_IS_655 = Str__literal(L"module"); - TL_IS_656 = Str__literal(L"all"); - TL_IS_657 = Str__literal(L"basics"); - TL_IS_658 = Str__literal(L"default.giscript"); - TL_IS_659 = Str__literal(L"tags"); - TL_IS_660 = Str__literal(L"bibliographic"); - TL_IS_661 = Str__literal(L"datum: DATUM of: ASSET"); - TL_IS_662 = Str__literal(L"Build Date"); - TL_IS_663 = Str__literal(L"Version Number"); + TL_IS_638 = Str__literal(L"modify-filenames"); + TL_IS_639 = Str__literal(L"original: ORIGINAL ?suffix: SUFFIX ?prefix: PREFIX"); + TL_IS_640 = Str__literal(L"component"); + TL_IS_641 = Str__literal(L"symbol: SYMBOL webname: WEBNAME path: PATH set: SET type: TYPE"); + TL_IS_642 = Str__literal(L"dependent-files"); + TL_IS_643 = Str__literal(L"?tool: TOOL ?module: MODULES ?tool-and-modules: BOTH"); + TL_IS_644 = Str__literal(L"components"); + TL_IS_645 = Str__literal(L"type: TYPE ?set: SET"); + TL_IS_646 = Str__literal(L"intest"); + TL_IS_647 = Str__literal(L"platform-settings.mk"); + TL_IS_648 = Str__literal(L"Materials"); + TL_IS_649 = Str__literal(L"platforms"); + TL_IS_650 = Str__literal(L"tool"); + TL_IS_651 = Str__literal(L"web"); + TL_IS_652 = Str__literal(L"module"); + TL_IS_653 = Str__literal(L"SYMBOL"); + TL_IS_654 = Str__literal(L"all"); + TL_IS_655 = Str__literal(L"tool"); + TL_IS_656 = Str__literal(L"web"); + TL_IS_657 = Str__literal(L"module"); + TL_IS_658 = Str__literal(L"all"); + TL_IS_659 = Str__literal(L"basics"); + TL_IS_660 = Str__literal(L"default.giscript"); + TL_IS_661 = Str__literal(L"tags"); + TL_IS_662 = Str__literal(L"bibliographic"); + TL_IS_663 = Str__literal(L"datum: DATUM of: ASSET"); TL_IS_664 = Str__literal(L"Build Date"); TL_IS_665 = Str__literal(L"Version Number"); - TL_IS_666 = Str__literal(L"inform6"); - TL_IS_667 = Str__literal(L"header.h"); - TL_IS_668 = Str__literal(L"(manifest).txt"); - TL_IS_669 = Str__literal(L"README.txt"); - TL_IS_670 = Str__literal(L"README.md"); - TL_IS_671 = Str__literal(L"docs"); - TL_IS_672 = Str__literal(L"web"); - TL_IS_673 = Str__literal(L"module"); - TL_IS_674 = Str__literal(L".inweb"); - TL_IS_675 = Str__literal(L".inweb"); - TL_IS_676 = Str__literal(L"docs"); - TL_IS_677 = Str__literal(L"Multiple cross-references might be meant here"); - TL_IS_678 = Str__literal(L"(main)"); + TL_IS_666 = Str__literal(L"Build Date"); + TL_IS_667 = Str__literal(L"Version Number"); + TL_IS_668 = Str__literal(L"inform6"); + TL_IS_669 = Str__literal(L"header.h"); + TL_IS_670 = Str__literal(L"(manifest).txt"); + TL_IS_671 = Str__literal(L"README.txt"); + TL_IS_672 = Str__literal(L"README.md"); + TL_IS_673 = Str__literal(L"docs"); + TL_IS_674 = Str__literal(L"web"); + TL_IS_675 = Str__literal(L"module"); + TL_IS_676 = Str__literal(L".inweb"); + TL_IS_677 = Str__literal(L".inweb"); + TL_IS_678 = Str__literal(L"docs"); + TL_IS_679 = Str__literal(L"Multiple cross-references might be meant here"); + TL_IS_680 = Str__literal(L"(main)"); } diff --git a/build.txt b/build.txt index 684bd61..9dd7def 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,3 @@ Prerelease: beta -Build Date: 29 April 2022 -Build Number: 1A97 +Build Date: 30 April 2022 +Build Number: 1A98 diff --git a/colony.txt b/colony.txt index 8170c72..09ad969 100644 --- a/colony.txt +++ b/colony.txt @@ -16,4 +16,4 @@ web: "twinprimes" at "inweb/Examples/twinprimes.inweb" in "inweb/docs/twinprimes web: "eastertide" at "inweb/Examples/eastertide" in "inweb/docs/eastertide" web: "intest" at "intest" in "intest/docs" -web: "inform" at "inform/docs-src/overview.inweb" in "inform/docs" +web: "inform" at "inform/docs-src/index.inweb" in "inform/docs" diff --git a/docs/eastertide/S-rtd.html b/docs/eastertide/S-rtd.html index 6b196b2..ff57aaf 100644 --- a/docs/eastertide/S-rtd.html +++ b/docs/eastertide/S-rtd.html @@ -40,7 +40,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/eastertide/index.html b/docs/eastertide/index.html index 16d6973..aae4d3d 100644 --- a/docs/eastertide/index.html +++ b/docs/eastertide/index.html @@ -29,7 +29,7 @@

Repository

Related Projects

diff --git a/docs/foundation-module/1-fm.html b/docs/foundation-module/1-fm.html index 79c8fd1..6471e77 100644 --- a/docs/foundation-module/1-fm.html +++ b/docs/foundation-module/1-fm.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/foundation-module/1-pp.html b/docs/foundation-module/1-pp.html index 7934ca8..e7068bd 100644 --- a/docs/foundation-module/1-pp.html +++ b/docs/foundation-module/1-pp.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/foundation-module/1-wp.html b/docs/foundation-module/1-wp.html index b261774..a169a03 100644 --- a/docs/foundation-module/1-wp.html +++ b/docs/foundation-module/1-wp.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/2-dct.html b/docs/foundation-module/2-dct.html index cb61bb9..6155465 100644 --- a/docs/foundation-module/2-dct.html +++ b/docs/foundation-module/2-dct.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/2-dl.html b/docs/foundation-module/2-dl.html index 592311f..689d60c 100644 --- a/docs/foundation-module/2-dl.html +++ b/docs/foundation-module/2-dl.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/2-fc.html b/docs/foundation-module/2-fc.html index 1004bb9..34f77f5 100644 --- a/docs/foundation-module/2-fc.html +++ b/docs/foundation-module/2-fc.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/foundation-module/2-lcl.html b/docs/foundation-module/2-lcl.html index eaf1391..40901a5 100644 --- a/docs/foundation-module/2-lcl.html +++ b/docs/foundation-module/2-lcl.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/2-llas.html b/docs/foundation-module/2-llas.html index 1734cb2..3a6bdd1 100644 --- a/docs/foundation-module/2-llas.html +++ b/docs/foundation-module/2-llas.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/2-mmr.html b/docs/foundation-module/2-mmr.html index 5795e85..22a84a8 100644 --- a/docs/foundation-module/2-mmr.html +++ b/docs/foundation-module/2-mmr.html @@ -53,7 +53,7 @@ MathJax = {

Repository

Related Projects

diff --git a/docs/foundation-module/2-mth.html b/docs/foundation-module/2-mth.html index 3dc41cd..5441acd 100644 --- a/docs/foundation-module/2-mth.html +++ b/docs/foundation-module/2-mth.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/foundation-module/2-str.html b/docs/foundation-module/2-str.html index f3692b4..be6f054 100644 --- a/docs/foundation-module/2-str.html +++ b/docs/foundation-module/2-str.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/2-trs.html b/docs/foundation-module/2-trs.html index 68f3edc..cfc536f 100644 --- a/docs/foundation-module/2-trs.html +++ b/docs/foundation-module/2-trs.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/2-wal.html b/docs/foundation-module/2-wal.html index 612c38c..9f85d73 100644 --- a/docs/foundation-module/2-wal.html +++ b/docs/foundation-module/2-wal.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/3-cf.html b/docs/foundation-module/3-cf.html index 7e957df..fda6e49 100644 --- a/docs/foundation-module/3-cf.html +++ b/docs/foundation-module/3-cf.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/3-cla.html b/docs/foundation-module/3-cla.html index 72f1aa0..3456872 100644 --- a/docs/foundation-module/3-cla.html +++ b/docs/foundation-module/3-cla.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/3-drc.html b/docs/foundation-module/3-drc.html index 81fd7f1..189542a 100644 --- a/docs/foundation-module/3-drc.html +++ b/docs/foundation-module/3-drc.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/3-em.html b/docs/foundation-module/3-em.html index 6b4a7f0..fb95f9e 100644 --- a/docs/foundation-module/3-em.html +++ b/docs/foundation-module/3-em.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/3-fln.html b/docs/foundation-module/3-fln.html index 9894312..43e7f1c 100644 --- a/docs/foundation-module/3-fln.html +++ b/docs/foundation-module/3-fln.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/3-pth.html b/docs/foundation-module/3-pth.html index 3d6ea6f..f2efb87 100644 --- a/docs/foundation-module/3-pth.html +++ b/docs/foundation-module/3-pth.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/3-shl.html b/docs/foundation-module/3-shl.html index 39cf1f0..6a40ddf 100644 --- a/docs/foundation-module/3-shl.html +++ b/docs/foundation-module/3-shl.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/3-tm.html b/docs/foundation-module/3-tm.html index 3e4434d..9b714c9 100644 --- a/docs/foundation-module/3-tm.html +++ b/docs/foundation-module/3-tm.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/4-chr.html b/docs/foundation-module/4-chr.html index bfe4401..009cb65 100644 --- a/docs/foundation-module/4-chr.html +++ b/docs/foundation-module/4-chr.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/4-cst.html b/docs/foundation-module/4-cst.html index 80c50b9..6cd0f16 100644 --- a/docs/foundation-module/4-cst.html +++ b/docs/foundation-module/4-cst.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/4-pm.html b/docs/foundation-module/4-pm.html index e7d2230..4fe1595 100644 --- a/docs/foundation-module/4-pm.html +++ b/docs/foundation-module/4-pm.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/4-prp.html b/docs/foundation-module/4-prp.html index ea301dc..2a267a5 100644 --- a/docs/foundation-module/4-prp.html +++ b/docs/foundation-module/4-prp.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

@@ -482,7 +482,7 @@ So you can have in: {WHATEVER text_stream *value = mr.exp[1]; text_stream *remainder = NULL; match_results mr3 = Regexp::create_mr(); - if (Regexp::match(&mr3, value, L"(%c+?) *(%C+: *%c*)")) { + if (Regexp::match(&mr3, value, L"(%c+?) *(%C+:[^/]%c*)")) { value = mr3.exp[0]; remainder = mr3.exp[1]; } diff --git a/docs/foundation-module/4-sm.html b/docs/foundation-module/4-sm.html index bc8daa4..2f3f786 100644 --- a/docs/foundation-module/4-sm.html +++ b/docs/foundation-module/4-sm.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/4-taa.html b/docs/foundation-module/4-taa.html index d7f641c..4ec344f 100644 --- a/docs/foundation-module/4-taa.html +++ b/docs/foundation-module/4-taa.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/4-tf.html b/docs/foundation-module/4-tf.html index 1358c42..8fce8ac 100644 --- a/docs/foundation-module/4-tf.html +++ b/docs/foundation-module/4-tf.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/4-ws.html b/docs/foundation-module/4-ws.html index 1e0f890..d808892 100644 --- a/docs/foundation-module/4-ws.html +++ b/docs/foundation-module/4-ws.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/5-ee.html b/docs/foundation-module/5-ee.html index 945e05c..08a9f9b 100644 --- a/docs/foundation-module/5-ee.html +++ b/docs/foundation-module/5-ee.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/5-htm.html b/docs/foundation-module/5-htm.html index fa2ecbe..b0f9af4 100644 --- a/docs/foundation-module/5-htm.html +++ b/docs/foundation-module/5-htm.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/6-bf.html b/docs/foundation-module/6-bf.html index 2a4fb7c..7e04b60 100644 --- a/docs/foundation-module/6-bf.html +++ b/docs/foundation-module/6-bf.html @@ -53,7 +53,7 @@ MathJax = {

Repository

Related Projects

diff --git a/docs/foundation-module/6-id.html b/docs/foundation-module/6-id.html index a0e2042..6ac6e1c 100644 --- a/docs/foundation-module/6-id.html +++ b/docs/foundation-module/6-id.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/foundation-module/6-sd.html b/docs/foundation-module/6-sd.html index bb54b0e..4f2ba58 100644 --- a/docs/foundation-module/6-sd.html +++ b/docs/foundation-module/6-sd.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/foundation-module/7-vn.html b/docs/foundation-module/7-vn.html index f6bbffb..5177b4c 100644 --- a/docs/foundation-module/7-vn.html +++ b/docs/foundation-module/7-vn.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/7-vnr.html b/docs/foundation-module/7-vnr.html index 3114ab2..bbaf4f5 100644 --- a/docs/foundation-module/7-vnr.html +++ b/docs/foundation-module/7-vnr.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/8-bdfw.html b/docs/foundation-module/8-bdfw.html index 71adbc1..37a8695 100644 --- a/docs/foundation-module/8-bdfw.html +++ b/docs/foundation-module/8-bdfw.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/8-bf.html b/docs/foundation-module/8-bf.html index 9e5e2c2..7837eb6 100644 --- a/docs/foundation-module/8-bf.html +++ b/docs/foundation-module/8-bf.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/8-st.html b/docs/foundation-module/8-st.html index 6d5445b..e6cca37 100644 --- a/docs/foundation-module/8-st.html +++ b/docs/foundation-module/8-st.html @@ -44,7 +44,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/8-wm.html b/docs/foundation-module/8-wm.html index 0d1a319..ede2746 100644 --- a/docs/foundation-module/8-wm.html +++ b/docs/foundation-module/8-wm.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/8-ws.html b/docs/foundation-module/8-ws.html index 6a6aa34..e5be965 100644 --- a/docs/foundation-module/8-ws.html +++ b/docs/foundation-module/8-ws.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-module/P-abgtf.html b/docs/foundation-module/P-abgtf.html index d0013aa..a2c8d68 100644 --- a/docs/foundation-module/P-abgtf.html +++ b/docs/foundation-module/P-abgtf.html @@ -45,7 +45,7 @@ MathJax = {

Repository

Related Projects

diff --git a/docs/foundation-module/index.html b/docs/foundation-module/index.html index 92647bd..575227c 100644 --- a/docs/foundation-module/index.html +++ b/docs/foundation-module/index.html @@ -29,7 +29,7 @@

Repository

Related Projects

diff --git a/docs/foundation-test/S-pc.html b/docs/foundation-test/S-pc.html index eb36d98..8f28ae1 100644 --- a/docs/foundation-test/S-pc.html +++ b/docs/foundation-test/S-pc.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/foundation-test/S-ut.html b/docs/foundation-test/S-ut.html index 9ba7a9c..7b449d4 100644 --- a/docs/foundation-test/S-ut.html +++ b/docs/foundation-test/S-ut.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/foundation-test/index.html b/docs/foundation-test/index.html index cad1faf..49fe033 100644 --- a/docs/foundation-test/index.html +++ b/docs/foundation-test/index.html @@ -29,7 +29,7 @@

Repository

Related Projects

diff --git a/docs/goldbach/S-sp.html b/docs/goldbach/S-sp.html index 72a7281..81b63fe 100644 --- a/docs/goldbach/S-sp.html +++ b/docs/goldbach/S-sp.html @@ -51,7 +51,7 @@ MathJax = {

Repository

Related Projects

diff --git a/docs/goldbach/S-tsoe.html b/docs/goldbach/S-tsoe.html index ff1a601..ff83022 100644 --- a/docs/goldbach/S-tsoe.html +++ b/docs/goldbach/S-tsoe.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/goldbach/goldbach.pdf b/docs/goldbach/goldbach.pdf index ceb3eedba1812076e4c7be0a039f770576c141a6..fa90e358a94ca565cfc3ba2d615af3c297d0796e 100644 GIT binary patch delta 139 zcmcb&f&bnH{)QID7N#xCd?&Sy4GaxU42(>*4Gh%{4AeEb^nLSFToOxC6*OF|j0}v7 z3`}53wp*TLUdQWf>SEzy=44=C>f+*NY+-ETgwWbZs}xU>0<6|r(i=!$#$*l H%qENgSqdZt delta 139 zcmcb&f&bnH{)QID7N#xCd?&SyEDTLeEes5`4Gh%{4AeEb^nLSFToOxC6*OF|j0}v7 z3`}53wp*TLUdQX~Y+>l);%4mV

Repository

Related Projects

diff --git a/docs/index.html b/docs/index.html index 39b81de..ebf7936 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/inweb/1-apacs.html b/docs/inweb/1-apacs.html index 5c5728f..e53c3d1 100644 --- a/docs/inweb/1-apacs.html +++ b/docs/inweb/1-apacs.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/1-bsc.html b/docs/inweb/1-bsc.html index c8c5c0f..c8674d0 100644 --- a/docs/inweb/1-bsc.html +++ b/docs/inweb/1-bsc.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/inweb/1-cnf.html b/docs/inweb/1-cnf.html index 176bed6..f55622a 100644 --- a/docs/inweb/1-cnf.html +++ b/docs/inweb/1-cnf.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/1-pc.html b/docs/inweb/1-pc.html index 976578f..a885560 100644 --- a/docs/inweb/1-pc.html +++ b/docs/inweb/1-pc.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/1-ptt.html b/docs/inweb/1-ptt.html index 6f072ed..954f512 100644 --- a/docs/inweb/1-ptt.html +++ b/docs/inweb/1-ptt.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/1-ts.html b/docs/inweb/1-ts.html index 8a2edfd..40a8fbb 100644 --- a/docs/inweb/1-ts.html +++ b/docs/inweb/1-ts.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/2-ec.html b/docs/inweb/2-ec.html index 567d6cb..6ba24c7 100644 --- a/docs/inweb/2-ec.html +++ b/docs/inweb/2-ec.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/2-lc.html b/docs/inweb/2-lc.html index d09b03e..c34bf4c 100644 --- a/docs/inweb/2-lc.html +++ b/docs/inweb/2-lc.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/2-pm.html b/docs/inweb/2-pm.html index 7cb96a7..20fd7f7 100644 --- a/docs/inweb/2-pm.html +++ b/docs/inweb/2-pm.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/2-pn.html b/docs/inweb/2-pn.html index 4009f81..dcf848c 100644 --- a/docs/inweb/2-pn.html +++ b/docs/inweb/2-pn.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/2-tgs.html b/docs/inweb/2-tgs.html index f354576..1c042bd 100644 --- a/docs/inweb/2-tgs.html +++ b/docs/inweb/2-tgs.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/2-tp.html b/docs/inweb/2-tp.html index f60806e..10e524c 100644 --- a/docs/inweb/2-tp.html +++ b/docs/inweb/2-tp.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/2-tr.html b/docs/inweb/2-tr.html index 1dd044b..1624fb9 100644 --- a/docs/inweb/2-tr.html +++ b/docs/inweb/2-tr.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

@@ -152,7 +152,7 @@ each of which has a list of s

-web_md *Reader::load_web_md(pathname *P, filename *alt_F, module_search *I,
+web_md *Reader::load_web_md(pathname *P, filename *alt_F, module_search *I,
     int including_modules) {
     return WebMetadata::get(P, alt_F, default_inweb_syntax, I, verbose_mode,
         including_modules, path_to_inweb);
diff --git a/docs/inweb/3-ta.html b/docs/inweb/3-ta.html
index c5ed783..48c85f0 100644
--- a/docs/inweb/3-ta.html
+++ b/docs/inweb/3-ta.html
@@ -39,7 +39,7 @@ function togglePopup(material_id) {
 

Repository

Related Projects

diff --git a/docs/inweb/3-tc.html b/docs/inweb/3-tc.html index 787eb09..19a73c9 100644 --- a/docs/inweb/3-tc.html +++ b/docs/inweb/3-tc.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/3-tt.html b/docs/inweb/3-tt.html index 5a81400..2350a08 100644 --- a/docs/inweb/3-tt.html +++ b/docs/inweb/3-tt.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/3-tw.html b/docs/inweb/3-tw.html index 8d2e565..13b4cf1 100644 --- a/docs/inweb/3-tw.html +++ b/docs/inweb/3-tw.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/3-twot.html b/docs/inweb/3-twot.html index 157f5f9..737ee85 100644 --- a/docs/inweb/3-twot.html +++ b/docs/inweb/3-twot.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/4-as.html b/docs/inweb/4-as.html index 7c53adb..695c29c 100644 --- a/docs/inweb/4-as.html +++ b/docs/inweb/4-as.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/4-cl.html b/docs/inweb/4-cl.html index 93d9435..80003cf 100644 --- a/docs/inweb/4-cl.html +++ b/docs/inweb/4-cl.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/4-is.html b/docs/inweb/4-is.html index 3486832..adc5499 100644 --- a/docs/inweb/4-is.html +++ b/docs/inweb/4-is.html @@ -53,7 +53,7 @@ MathJax = {

Repository

Related Projects

diff --git a/docs/inweb/4-lm.html b/docs/inweb/4-lm.html index 7e10186..103252c 100644 --- a/docs/inweb/4-lm.html +++ b/docs/inweb/4-lm.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/4-pl.html b/docs/inweb/4-pl.html index dda547f..9f961cb 100644 --- a/docs/inweb/4-pl.html +++ b/docs/inweb/4-pl.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/4-taf.html b/docs/inweb/4-taf.html index be78355..5e27a25 100644 --- a/docs/inweb/4-taf.html +++ b/docs/inweb/4-taf.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/4-tp.html b/docs/inweb/4-tp.html index d403e9a..ecf638d 100644 --- a/docs/inweb/4-tp.html +++ b/docs/inweb/4-tp.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/5-df.html b/docs/inweb/5-df.html index 496267b..b30f30f 100644 --- a/docs/inweb/5-df.html +++ b/docs/inweb/5-df.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/5-fm.html b/docs/inweb/5-fm.html index 92105c2..d0cdc6d 100644 --- a/docs/inweb/5-fm.html +++ b/docs/inweb/5-fm.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/5-hf.html b/docs/inweb/5-hf.html index 0be8005..ca8c56a 100644 --- a/docs/inweb/5-hf.html +++ b/docs/inweb/5-hf.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/5-ptf.html b/docs/inweb/5-ptf.html index 535b706..cd29411 100644 --- a/docs/inweb/5-ptf.html +++ b/docs/inweb/5-ptf.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/5-tf.html b/docs/inweb/5-tf.html index f81505d..d9012db 100644 --- a/docs/inweb/5-tf.html +++ b/docs/inweb/5-tf.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/5-tu.html b/docs/inweb/5-tu.html index acc3012..6d6f013 100644 --- a/docs/inweb/5-tu.html +++ b/docs/inweb/5-tu.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/5-wt.html b/docs/inweb/5-wt.html index d06e861..fa74d8f 100644 --- a/docs/inweb/5-wt.html +++ b/docs/inweb/5-wt.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/6-cln.html b/docs/inweb/6-cln.html index 47e7583..a9efd62 100644 --- a/docs/inweb/6-cln.html +++ b/docs/inweb/6-cln.html @@ -44,7 +44,7 @@ function togglePopup(material_id) {

Repository

Related Projects

@@ -134,7 +134,7 @@ at GitHub: web: "eastertide" at "inweb/Examples/eastertide" in "inweb/docs/eastertide" web: "intest" at "intest" in "intest/docs" -web: "inform" at "inform/docs-src/overview.inweb" in "inform/docs" +web: "inform" at "inform/docs-src/index.inweb" in "inform/docs"
 typedef struct colony_reader_state {
diff --git a/docs/inweb/6-cs.html b/docs/inweb/6-cs.html
index 1f052a3..d62325d 100644
--- a/docs/inweb/6-cs.html
+++ b/docs/inweb/6-cs.html
@@ -44,7 +44,7 @@ function togglePopup(material_id) {
 

Repository

Related Projects

diff --git a/docs/inweb/6-gs.html b/docs/inweb/6-gs.html index 3f2a63a..2c6acf9 100644 --- a/docs/inweb/6-gs.html +++ b/docs/inweb/6-gs.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

diff --git a/docs/inweb/6-mkf.html b/docs/inweb/6-mkf.html index 6192ddd..fa96163 100644 --- a/docs/inweb/6-mkf.html +++ b/docs/inweb/6-mkf.html @@ -39,7 +39,7 @@ function togglePopup(material_id) {

Repository

Related Projects

@@ -50,7 +50,7 @@ function togglePopup(material_id) {

Constructing a suitable makefile for a simple inweb project.

-
+

§1. Preprocessing. We will use Preprocessor (in foundation) with four special macros and one special loop construct. @@ -69,15 +69,19 @@ special loop construct. Preprocessor::new_macro(L, I"identity-settings", NULL, Makefiles::identity_settings_expander, NULL); + preprocessor_macro *mf = Preprocessor::new_macro(L, + I"modify-filenames", I"original: ORIGINAL ?suffix: SUFFIX ?prefix: PREFIX", + Makefiles::modify_filenames_expander, NULL); + Preprocessor::do_not_suppress_whitespace(mf); Preprocessor::new_macro(L, I"component", I"symbol: SYMBOL webname: WEBNAME path: PATH set: SET type: TYPE", - Makefiles::component_expander, NULL); + Makefiles::component_expander, NULL); Preprocessor::new_macro(L, I"dependent-files", I"?tool: TOOL ?module: MODULES ?tool-and-modules: BOTH", - Makefiles::dependent_files_expander, NULL); + Makefiles::dependent_files_expander, NULL); Preprocessor::new_loop_macro(L, I"components", I"type: TYPE ?set: SET", - Makefiles::components_expander, NULL); + Makefiles::components_expander, NULL); makefile_specifics *specifics = CREATE(makefile_specifics); Initialise the specific data for makefile-preprocessing1.2; @@ -126,12 +130,12 @@ a data structure to store those declarations in: text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) { makefile_specifics *specifics = RETRIEVE_POINTER_makefile_specifics(PPS->specifics); text_stream *OUT = PPS->dest; - WRITE("INWEB = "); Makefiles::pathname_slashed(OUT, path_to_inweb); WRITE("/Tangled/inweb\n"); + WRITE("INWEB = "); Makefiles::pathname_slashed(OUT, path_to_inweb); WRITE("/Tangled/inweb\n"); pathname *path_to_intest = Pathnames::down(Pathnames::up(path_to_inweb), I"intest"); - WRITE("INTEST = "); Makefiles::pathname_slashed(OUT, path_to_intest); WRITE("/Tangled/intest\n"); + WRITE("INTEST = "); Makefiles::pathname_slashed(OUT, path_to_intest); WRITE("/Tangled/intest\n"); if (specifics->for_web) { WRITE("MYNAME = %S\n", Pathnames::directory_name(specifics->for_web->md->path_to_web)); - WRITE("ME = "); Makefiles::pathname_slashed(OUT, specifics->for_web->md->path_to_web); + WRITE("ME = "); Makefiles::pathname_slashed(OUT, specifics->for_web->md->path_to_web); WRITE("\n"); PPS->last_line_was_blank = FALSE; } @@ -176,10 +180,71 @@ for that platform. Regexp::dispose_of(&mr); }

-

§4. The component expander.

+

§4. The modify filename expander.

-void Makefiles::component_expander(preprocessor_macro *mm, preprocessor_state *PPS,
+void Makefiles::modify_filenames_expander(preprocessor_macro *mm, preprocessor_state *PPS,
+    text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) {
+    text_stream *OUT = PPS->dest;
+
+    text_stream *original = parameter_values[0];
+    text_stream *suffix = parameter_values[1];
+    text_stream *prefix = parameter_values[2];
+
+    wchar_t previous = 'X'; int quoted = FALSE, boundary = FALSE;
+    TEMPORARY_TEXT(captured)
+    LOOP_THROUGH_TEXT(pos, original) {
+        wchar_t c = Str::get(pos);
+        if (c == '\'') { quoted = quoted?FALSE:TRUE; }
+        if (Characters::is_whitespace(c)) {
+            if ((previous != '\\') && (quoted == FALSE)) boundary = TRUE;
+        } else {
+            if (boundary) Captured a name4.1;
+            boundary = FALSE;
+        }
+        PUT_TO(captured, c);
+        previous = c;
+    }
+    Captured a name4.1
+    DISCARD_TEXT(captured)
+}
+
+

§4.1. Captured a name4.1 = +

+ +
+    Str::trim_white_space(captured);
+    if (Str::len(captured) > 0) {
+        int in_quotes = FALSE;
+        if ((Str::get_first_char(captured) == '\'') && (Str::get_last_char(captured) == '\'')) {
+            Str::delete_first_character(captured);
+            Str::delete_last_character(captured);
+            in_quotes = TRUE;
+        }
+        if (in_quotes) WRITE("'");
+        int last_slash = -1;
+        for (int i=0; i<Str::len(captured); i++)
+            if (Str::get_at(captured, i) == '/')
+                last_slash = i;
+        int last_dot = Str::len(captured);
+        if (last_slash >= 0)
+            for (int i=last_slash; i<Str::len(captured); i++)
+                if (Str::get_at(captured, i) == '.')
+                    last_dot = i;
+        for (int i=0; i<=last_slash; i++) PUT(Str::get_at(captured, i));
+        WRITE("%S", prefix);
+        for (int i=last_slash+1; i<last_dot; i++) PUT(Str::get_at(captured, i));
+        WRITE("%S", suffix);
+        for (int i=last_dot; i<Str::len(captured); i++) PUT(Str::get_at(captured, i));
+        if (in_quotes) WRITE("'");
+        Str::clear(captured);
+    }
+
+
  • This code is used in §4 (twice).
+

§5. The component expander.

+ +
+void Makefiles::component_expander(preprocessor_macro *mm, preprocessor_state *PPS,
     text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) {
     makefile_specifics *specifics = RETRIEVE_POINTER_makefile_specifics(PPS->specifics);
     text_stream *OUT = PPS->dest;
@@ -193,25 +258,25 @@ for that platform.
     if (Str::eq(category, I"tool")) {
         int marker = MAKEFILE_TOOL_MOM;
         dictionary *D = specifics->tools_dictionary;
-        Add to dictionary4.1;
-        Derive some make symbols4.2;
+        Add to dictionary5.1;
+        Derive some make symbols5.2;
     } else if (Str::eq(category, I"web")) {
         int marker = MAKEFILE_WEB_MOM;
         dictionary *D = specifics->webs_dictionary;
-        Add to dictionary4.1;
-        Derive some make symbols4.2;
+        Add to dictionary5.1;
+        Derive some make symbols5.2;
     } else if (Str::eq(category, I"module")) {
         int marker = MAKEFILE_MODULE_MOM;
         dictionary *D = specifics->modules_dictionary;
-        Add to dictionary4.1;
-        Derive some make symbols4.2;
+        Add to dictionary5.1;
+        Derive some make symbols5.2;
     } else {
         Errors::in_text_file("category should be 'tool', 'module' or 'web'", tfp);
     }
     PPS->last_line_was_blank = FALSE;
 }
 
-

§4.1. Add to dictionary4.1 = +

§5.1. Add to dictionary5.1 =

@@ -223,8 +288,8 @@ for that platform.
     Dictionaries::create(D, symbol);
     Dictionaries::write_value(D, symbol, Wm);
 
-
  • This code is used in §4 (three times).
-

§4.2. Derive some make symbols4.2 = +

  • This code is used in §5 (three times).
+

§5.2. Derive some make symbols5.2 =

@@ -233,11 +298,11 @@ for that platform.
     WRITE("%SMAKER = $(%SWEB)/%S.mk\n", symbol, symbol, webname);
     WRITE("%SX = $(%SWEB)/Tangled/%S\n", symbol, symbol, webname);
 
-
  • This code is used in §4 (three times).
-

§5. The components loop construct.

+
  • This code is used in §5 (three times).
+

§6. The components loop construct.

-void Makefiles::components_expander(preprocessor_macro *mm, preprocessor_state *PPS,
+void Makefiles::components_expander(preprocessor_macro *mm, preprocessor_state *PPS,
     text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) {
     Preprocessor::set_loop_var_name(loop, I"SYMBOL");
     text_stream *category = parameter_values[0];
@@ -245,19 +310,19 @@ for that platform.
     if (Str::len(set) == 0) set = I"all";
     if (Str::eq(category, I"tool")) {
         int marker = MAKEFILE_TOOL_MOM;
-        Make the web iterations5.1;
+        Make the web iterations6.1;
     } else if (Str::eq(category, I"web")) {
         int marker = MAKEFILE_WEB_MOM;
-        Make the web iterations5.1;
+        Make the web iterations6.1;
     } else if (Str::eq(category, I"module")) {
         int marker = MAKEFILE_MODULE_MOM;
-        Make the web iterations5.1;
+        Make the web iterations6.1;
     } else {
         Errors::in_text_file("category should be 'tool', 'module' or 'web'", tfp);
     }
 }
 
-

§5.1. Make the web iterations5.1 = +

§6.1. Make the web iterations6.1 =

@@ -270,11 +335,11 @@ for that platform.
         }
     }
 
-
  • This code is used in §5 (three times).
-

§6. The dependent-files expander.

+
  • This code is used in §6 (three times).
+

§7. The dependent-files expander.

-void Makefiles::dependent_files_expander(preprocessor_macro *mm, preprocessor_state *PPS,
+void Makefiles::dependent_files_expander(preprocessor_macro *mm, preprocessor_state *PPS,
     text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) {
     makefile_specifics *specifics = RETRIEVE_POINTER_makefile_specifics(PPS->specifics);
     text_stream *OUT = PPS->dest;
@@ -285,10 +350,10 @@ for that platform.
     if (Str::len(tool) > 0) {
         if (Dictionaries::find(specifics->tools_dictionary, tool)) {
             web_md *Wm = Dictionaries::read_value(specifics->tools_dictionary, tool);
-            Makefiles::pattern(OUT, Wm->as_module->sections_md, Wm->contents_filename);
+            Makefiles::pattern(OUT, Wm->as_module->sections_md, Wm->contents_filename);
         } else if (Dictionaries::find(specifics->webs_dictionary, tool)) {
             web_md *Wm = Dictionaries::read_value(specifics->webs_dictionary, tool);
-            Makefiles::pattern(OUT, Wm->as_module->sections_md, Wm->contents_filename);
+            Makefiles::pattern(OUT, Wm->as_module->sections_md, Wm->contents_filename);
         } else {
             TEMPORARY_TEXT(erm)
             WRITE_TO(erm, "unknown tool '%S' to find dependencies for", tool);
@@ -298,7 +363,7 @@ for that platform.
     } else if (Str::len(modules) > 0) {
         if (Dictionaries::find(specifics->modules_dictionary, modules)) {
             web_md *Wm = Dictionaries::read_value(specifics->modules_dictionary, modules);
-            Makefiles::pattern(OUT, Wm->sections_md, Wm->contents_filename);
+            Makefiles::pattern(OUT, Wm->sections_md, Wm->contents_filename);
         } else {
             TEMPORARY_TEXT(erm)
             WRITE_TO(erm, "unknown module '%S' to find dependencies for", modules);
@@ -308,10 +373,10 @@ for that platform.
     } else if (Str::len(both) > 0) {
         if (Dictionaries::find(specifics->tools_dictionary, both)) {
             web_md *Wm = Dictionaries::read_value(specifics->tools_dictionary, both);
-            Makefiles::pattern(OUT, Wm->sections_md, Wm->contents_filename);
+            Makefiles::pattern(OUT, Wm->sections_md, Wm->contents_filename);
         } else if (Dictionaries::find(specifics->webs_dictionary, both)) {
             web_md *Wm = Dictionaries::read_value(specifics->webs_dictionary, both);
-            Makefiles::pattern(OUT, Wm->sections_md, Wm->contents_filename);
+            Makefiles::pattern(OUT, Wm->sections_md, Wm->contents_filename);
         } else {
             TEMPORARY_TEXT(erm)
             WRITE_TO(erm, "unknown tool '%S' to find dependencies for", both);
@@ -319,29 +384,29 @@ for that platform.
             DISCARD_TEXT(erm)
         }
     } else {
-        Makefiles::pattern(OUT, specifics->for_web->md->sections_md,
+        Makefiles::pattern(OUT, specifics->for_web->md->sections_md,
             specifics->for_web->md->contents_filename);
     }
     WRITE("\n");
     PPS->last_line_was_blank = FALSE;
 }
 
-

§7. This outputs a makefile pattern matching a bunch of web source code filenames: +

§8. This outputs a makefile pattern matching a bunch of web source code filenames: say, inweb/Chapter\ %d/*.w.

-void Makefiles::pattern(OUTPUT_STREAM, linked_list *L, filename *F) {
+void Makefiles::pattern(OUTPUT_STREAM, linked_list *L, filename *F) {
     dictionary *patterns_done = Dictionaries::new(16, TRUE);
-    if (F) Add pattern for file F, if not already given7.1;
+    if (F) Add pattern for file F, if not already given8.1;
     section_md *Sm;
     LOOP_OVER_LINKED_LIST(Sm, section_md, L) {
         filename *F = Sm->source_file_for_section;
-        Add pattern for file F, if not already given7.1;
+        Add pattern for file F, if not already given8.1;
     }
 }
 
-

§7.1. Add pattern for file F, if not already given7.1 = +

§8.1. Add pattern for file F, if not already given8.1 =

@@ -370,14 +435,14 @@ say, inweb/Chapter\ %d/*.w    }
     DISCARD_TEXT(tester)
 
-
  • This code is used in §7 (twice).
-

§8. In makefile syntax, spaces must be preceded by slashes in filenames. (That +

  • This code is used in §8 (twice).
+

§9. In makefile syntax, spaces must be preceded by slashes in filenames. (That bald statement really doesn't begin to go into how awkward makefiles can be when filenames have spaces in, but there we are.)

-void Makefiles::pathname_slashed(OUTPUT_STREAM, pathname *P) {
+void Makefiles::pathname_slashed(OUTPUT_STREAM, pathname *P) {
     TEMPORARY_TEXT(PT)
     WRITE_TO(PT, "%p", P);
     LOOP_THROUGH_TEXT(pos, PT) {
diff --git a/docs/inweb/6-rw.html b/docs/inweb/6-rw.html
index 43611f8..9eee223 100644
--- a/docs/inweb/6-rw.html
+++ b/docs/inweb/6-rw.html
@@ -39,7 +39,7 @@ function togglePopup(material_id) {
 

Repository

Related Projects

diff --git a/docs/inweb/M-awwp.html b/docs/inweb/M-awwp.html index a9c251f..908dbb3 100644 --- a/docs/inweb/M-awwp.html +++ b/docs/inweb/M-awwp.html @@ -32,7 +32,7 @@

Repository

Related Projects

diff --git a/docs/inweb/M-htwaw.html b/docs/inweb/M-htwaw.html index cf0eaa4..f61f3d6 100644 --- a/docs/inweb/M-htwaw.html +++ b/docs/inweb/M-htwaw.html @@ -54,7 +54,7 @@ MathJax = {

Repository

Related Projects

diff --git a/docs/inweb/M-iti.html b/docs/inweb/M-iti.html index a363c17..c42901e 100644 --- a/docs/inweb/M-iti.html +++ b/docs/inweb/M-iti.html @@ -32,7 +32,7 @@

Repository

Related Projects

diff --git a/docs/inweb/M-mwiw.html b/docs/inweb/M-mwiw.html index 6fe2b8e..37bc9c6 100644 --- a/docs/inweb/M-mwiw.html +++ b/docs/inweb/M-mwiw.html @@ -32,7 +32,7 @@

Repository

Related Projects

@@ -163,7 +163,7 @@ for the Inweb repository: web: "eastertide" at "inweb/Examples/eastertide" in "inweb/docs/eastertide" web: "intest" at "intest" in "intest/docs" -web: "inform" at "inform/docs-src/overview.inweb" in "inform/docs" +web: "inform" at "inform/docs-src/index.inweb" in "inform/docs"

As this demonstrates, either webs, or modules, or both, can be declared. Each one gives (a) a short name, (b) a location relative to the current diff --git a/docs/inweb/M-rc.html b/docs/inweb/M-rc.html index 785b92a..32fca6c 100644 --- a/docs/inweb/M-rc.html +++ b/docs/inweb/M-rc.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/inweb/M-spl.html b/docs/inweb/M-spl.html index 4d7eef6..14267e7 100644 --- a/docs/inweb/M-spl.html +++ b/docs/inweb/M-spl.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/inweb/M-tid.html b/docs/inweb/M-tid.html index d4186fa..881db66 100644 --- a/docs/inweb/M-tid.html +++ b/docs/inweb/M-tid.html @@ -31,7 +31,7 @@

Repository

Related Projects

diff --git a/docs/inweb/M-wtaw.html b/docs/inweb/M-wtaw.html index aeef7ef..5852e59 100644 --- a/docs/inweb/M-wtaw.html +++ b/docs/inweb/M-wtaw.html @@ -37,7 +37,7 @@

Repository

Related Projects

@@ -756,6 +756,13 @@ to the inweb and intest tools respectivly. W to work with at the command line, and are then expanded to the directory name and web name respectively for W. (These are very often the same name, e.g., inform7.) +
  • {modify-filenames original: ORIGINAL suffix: SUFFIX prefix: PREFIX}. Here +both suffix: and prefix: are optional, but if neither is given then the result +is that no modification occurs. The idea here is that ORIGINAL is a whitespace-divided +list of filenames, as typically appears in a makefile, and that we modify each +filename by applying the prefix or suffix to its unextended leafname. So, for +example, {modify-filenames original: peach.o others/*.o prefix: x86_ suffix: _v12} would +expand to x86_peach_v12.o others/x86_*_v12.o.
  • {component symbol: SYMBOL webname: WEBNAME path: PATH set: SET type: TYPE} is used only in a makescript for a makefile trying to orchestrate complicated operations on colonies of large numbers of webs. (See the inform.mkscript diff --git a/docs/inweb/P-htpw.html b/docs/inweb/P-htpw.html index 43e6bd6..f6b4cd9 100644 --- a/docs/inweb/P-htpw.html +++ b/docs/inweb/P-htpw.html @@ -36,7 +36,7 @@

    Repository

    Related Projects

    diff --git a/docs/inweb/index.html b/docs/inweb/index.html index 421a05d..3ffa42c 100644 --- a/docs/inweb/index.html +++ b/docs/inweb/index.html @@ -29,7 +29,7 @@

    Repository

    Related Projects

    diff --git a/docs/twinprimes/twinprimes.html b/docs/twinprimes/twinprimes.html index f03317f..3fa99d7 100644 --- a/docs/twinprimes/twinprimes.html +++ b/docs/twinprimes/twinprimes.html @@ -53,7 +53,7 @@ function togglePopup(material_id) {

    Repository

    Related Projects

    diff --git a/scripts/first.sh b/scripts/first.sh index 7dc72b2..b7e7f74 100644 --- a/scripts/first.sh +++ b/scripts/first.sh @@ -3,7 +3,7 @@ echo "(A script to make a first build of Inweb)" PLATFORM="$1" if [ "$PLATFORM" = "" ]; then - echo "This script needs a parameter for the platform you are working on: macos, macos32, linux, windows, unix" + echo "This script needs a parameter for the platform you are working on: macos, macos32, macosarm, macosuniv, linux, windows, unix" exit 1 fi diff --git a/scripts/inweb.mkscript b/scripts/inweb.mkscript index 2b21bd8..054b836 100644 --- a/scripts/inweb.mkscript +++ b/scripts/inweb.mkscript @@ -23,7 +23,7 @@ # each case; when a platform is selected by the scripts/first.sh shell script, # the relevant one is copied to become inweb/inweb.mk. -{set name: PLATFORMS value: macos, macos32, windows, linux, unix} +{set name: PLATFORMS value: macos, macos32, macosarm, macosuniv, windows, linux, unix} # -----------------------------------------------------------------------------