inweb-bootstrap/inweb.mk

171 lines
6.2 KiB
Makefile
Raw Normal View History

2019-02-04 22:26:45 +00:00
# This makefile was automatically written by inweb -makefile
# and is not intended for human editing
2022-04-21 23:06:45 +00:00
INWEBPLATFORM = macos
INFORM6OS = MACOS
GLULXEOS = OS_UNIX
EXEEXTENSION =
INTEST = intest/Tangled/intest
INWEB = inweb/Tangled/inweb
CCOPTS = -DPLATFORM_MACOS=1 -mmacosx-version-min=10.6 -arch x86_64 -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
2019-02-04 22:26:45 +00:00
ME = inweb
FTEST = $(ME)/foundation-test
2019-02-04 22:26:45 +00:00
SAFETYCOPY = $(ME)/Tangled/inweb_dev
2020-04-14 17:36:42 +00:00
COLONY = $(ME)/colony.txt
2020-04-13 16:06:45 +00:00
2019-02-04 22:26:45 +00:00
-include $(ME)/platform-settings.mk
.PHONY: all
all: $(ME)/platform-settings.mk $(ME)/Tangled/$(ME) $(FTEST)/Tangled/foundation-test
2019-02-04 22:26:45 +00:00
$(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)
2019-02-04 22:26:45 +00:00
.PHONY: force
force: $(ME)/platform-settings.mk
$(call make-me)
$(call make-ftest)
2019-02-04 22:26:45 +00:00
2022-04-21 23:06:45 +00:00
.PHONY: makers
makers:
$(INWEB) $(FTEST) -makefile $(FTEST)/foundation-test.mk
$(INWEB) -prototype $(ME)/Materials/platforms/macos.mkscript -makefile $(ME)/Materials/platforms/macos.mk
$(INWEB) -prototype $(ME)/Materials/platforms/macos32.mkscript -makefile $(ME)/Materials/platforms/macos32.mk
$(INWEB) -prototype $(ME)/Materials/platforms/windows.mkscript -makefile $(ME)/Materials/platforms/windows.mk
$(INWEB) -prototype $(ME)/Materials/platforms/linux.mkscript -makefile $(ME)/Materials/platforms/linux.mk
$(INWEB) -prototype $(ME)/Materials/platforms/unix.mkscript -makefile $(ME)/Materials/platforms/unix.mk
2019-02-04 22:26:45 +00:00
.PHONY: macos
macos:
2022-04-21 23:06:45 +00:00
cp -f $(ME)/Materials/platforms/macos.mk $(ME)/platform-settings.mk
echo "=== Platform set to 'macos'. Now: make -f inweb/inweb.mk initial ==="
.PHONY: macos32
2022-04-21 23:06:45 +00:00
macos32:
cp -f $(ME)/Materials/platforms/macos32.mk $(ME)/platform-settings.mk
echo "=== Platform set to 'macos32'. Now: make -f inweb/inweb.mk initial ==="
2019-02-04 22:26:45 +00:00
.PHONY: windows
windows:
2022-04-21 23:06:45 +00:00
cp -f $(ME)/Materials/platforms/windows.mk $(ME)/platform-settings.mk
echo "=== Platform set to 'windows'. Now: make -f inweb/inweb.mk initial ==="
2019-02-04 22:26:45 +00:00
.PHONY: linux
linux:
2022-04-21 23:06:45 +00:00
cp -f $(ME)/Materials/platforms/linux.mk $(ME)/platform-settings.mk
echo "=== Platform set to 'linux'. Now: make -f inweb/inweb.mk initial ==="
2019-02-04 22:26:45 +00:00
.PHONY: unix
unix:
2022-04-21 23:06:45 +00:00
cp -f $(ME)/Materials/platforms/unix.mk $(ME)/platform-settings.mk
echo "=== Platform set to 'unix'. Now: make -f inweb/inweb.mk initial ==="
2019-02-04 22:26:45 +00:00
.PHONY: initial
initial: $(ME)/platform-settings.mk
$(call make-me-once-tangled)
2022-04-21 23:06:45 +00:00
$(call make-ftest)
2019-02-04 22:26:45 +00:00
.PHONY: safe
safe:
$(call make-me-using-safety-copy)
define make-me-once-tangled
2022-04-21 23:06:45 +00:00
clang -std=c11 -c $(MANYWARNINGS) $(CCOPTS) -g -o $(ME)/Tangled/$(ME).o $(ME)/Tangled/$(ME).c
clang $(CCOPTS) -g -o $(ME)/Tangled/$(ME)$(EXEEXTENSION) $(ME)/Tangled/$(ME).o
2019-02-04 22:26:45 +00:00
endef
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
endef
2019-02-04 22:26:45 +00:00
.PHONY: test
test:
$(INTEST) -from $(ME) all
2020-03-23 15:04:43 +00:00
.PHONY: commit
commit:
$(INWEB) -advance-build-file $(ME)/build.txt
2022-04-23 22:41:01 +00:00
$(INWEB) -prototype inweb/scripts/inweb.rmscript -write-me inweb/README.md
2020-03-23 15:04:43 +00:00
cd $(ME); git commit -a
.PHONY: pages
pages:
2020-03-26 23:01:14 +00:00
$(INWEB) -help > $(ME)/Figures/help.txt
2020-04-05 17:37:43 +00:00
$(INWEB) -show-languages > $(ME)/Figures/languages.txt
2020-04-23 22:23:44 +00:00
$(INWEB) -colony $(COLONY) -member twinprimes -scan > $(ME)/Figures/scan.txt
$(INWEB) -colony $(COLONY) -member twinprimes -weave-as TestingInweb -weave-to $(ME)/Figures/tree.txt
2020-04-14 17:36:42 +00:00
cp -f $(COLONY) $(ME)/Figures/colony.txt
2020-04-20 22:26:08 +00:00
cp -f $(ME)/docs-src/nav.html $(ME)/Figures/nav.txt
2020-03-26 23:01:14 +00:00
$(INWEB) -advance-build-file $(ME)/build.txt
2019-03-12 23:32:12 +00:00
mkdir -p $(ME)/docs
2020-03-23 21:39:27 +00:00
rm -f $(ME)/docs/*.html
2020-04-20 22:26:08 +00:00
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
2022-04-23 22:41:01 +00:00
$(INWEB) -prototype inweb/scripts/inweb.rmscript -write-me inweb/README.md
mkdir -p $(ME)/docs/inweb
2020-03-23 21:39:27 +00:00
rm -f $(ME)/docs/inweb/*.html
2020-04-12 16:24:23 +00:00
mkdir -p $(ME)/docs/goldbach
rm -f $(ME)/docs/goldbach/*.html
mkdir -p $(ME)/docs/twinprimes
rm -f $(ME)/docs/twinprimes/*.html
2020-04-15 22:45:08 +00:00
mkdir -p $(ME)/docs/eastertide
rm -f $(ME)/docs/eastertide/*.html
mkdir -p $(ME)/docs/foundation-module
2020-03-23 21:39:27 +00:00
rm -f $(ME)/docs/foundation-module/*.html
mkdir -p $(ME)/docs/foundation-test
2020-03-23 21:39:27 +00:00
rm -f $(ME)/docs/foundation-test/*.html
2020-04-13 16:06:45 +00:00
$(INWEB) -colony $(COLONY) -member overview -weave
$(INWEB) -colony $(COLONY) -member goldbach -weave
2020-04-25 22:51:13 +00:00
$(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
2020-04-26 12:07:06 +00:00
$(INWEB) -colony $(COLONY) inweb/Examples/goldbach all -weave-as PDFTeX -weave-to inweb/docs/goldbach/goldbach.pdf
2020-04-25 22:51:13 +00:00
$(INWEB) -colony $(COLONY) inweb/Examples/goldbach all -weave-as TeX -weave-to inweb/docs/goldbach/goldbach.tex
2020-04-13 16:06:45 +00:00
$(INWEB) -colony $(COLONY) -member twinprimes -weave
2020-04-15 22:45:08 +00:00
$(INWEB) -colony $(COLONY) -member eastertide -weave
2020-04-13 16:06:45 +00:00
$(INWEB) -colony $(COLONY) -member inweb -weave
2020-04-15 22:45:08 +00:00
$(INWEB) -colony $(COLONY) -member foundation -weave
2020-04-13 16:06:45 +00:00
$(INWEB) -colony $(COLONY) -member foundation-test -weave
2019-02-04 22:26:45 +00:00
.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