1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-05 08:34:22 +03:00
inform7/scripts/makescript.txt

761 lines
32 KiB
Plaintext
Raw Normal View History

2019-02-05 02:44:07 +02:00
# -----------------------------------------------------------------------------
# Core Inform makescript - to be turned into a makefile by inweb
# -----------------------------------------------------------------------------
# Inform is a suite of software with many components and a full makefile for
# it would be highly repetitive, and hard to maintain. Instead we use this
# script for making that makefile; it's human-readable and editable.
# To perform the translation, run this as a shell command:
#
# $ ../inweb/Tangled/inweb -prototype makescript.txt -makefile makefile
2019-02-05 02:44:07 +02:00
#
# In the syntax of this file, only curly braces {thus} represent special
# features: everything else is raw makefile syntax, copied directly across.
# -----------------------------------------------------------------------------
# The following ensures that basic tools such as CC and LINK have suitable
# definitions.
{platform-settings}
INTEST = ../intest/Tangled/intest
2019-04-16 10:15:15 +03:00
INTESTX = ../intest/Tangled/intest
2019-03-16 15:12:11 +02:00
INTESTWEB = ../intest
INWEB = ../inweb/Tangled/inweb
INWEBX = ../inweb/Tangled/inweb
INTERX = inter/Tangled/inter
INBUILDX = inbuild/Tangled/inbuild
2019-02-05 02:44:07 +02:00
# The "-" at the front here tells make to load this file if it exists, and
# continue otherwise. If it does exist, it will define the symbol INTEGRATION.
# That signals that the user wants to integrate the intools into the UI app;
# if it's not defined, the user is just playing with the intools in isolation.
# (Different versions of this file are needed on different operating systems.)
-include ../make-integration-settings.mk
# If present, this should define the symbol BENEVOLENTOVERLORD, which indicates
# that you should have the power, in the build process, of advancing the master
# build code for Inform: 6P21 -> 6P22, and so on. (It has no other effect.)
-include ../make-benevolent-overlord.mk
# -----------------------------------------------------------------------------
# Most components of Inform are C programs written as literate-programming
# webs, making use of shared libraries of code called modules. We list them.
# Each module in turn is defined by a symbol name such as NAME, a tool name
# (usually the same but in lower case), and lastly a location relative to the
# root of the core Inform distribution.
# In the eventual makefile, the symbol NAMEWEB is defined as its location.
{module} FOUNDATION foundation ../inweb/foundation-module
2020-03-11 02:21:09 +02:00
{module} WORDS words inbuild/words-module
2019-02-05 02:44:07 +02:00
{module} INFLECTIONS inflections inform7/inflections-module
2020-03-11 02:21:09 +02:00
{module} SYNTAX syntax inbuild/syntax-module
2019-02-05 02:44:07 +02:00
{module} LINGUISTICS linguistics inform7/linguistics-module
{module} KINDS kinds inform7/kinds-module
{module} PROBLEMS problems inform7/problems-module
{module} CORE core inform7/core-module
{module} IF if inform7/if-module
{module} INDEX index inform7/index-module
{module} MULTIMEDIA multimedia inform7/multimedia-module
{module} INTER inter inter/inter-module
2019-08-28 12:35:44 +03:00
{module} BUILDING building inter/building-module
2019-02-05 02:44:07 +02:00
{module} CODEGEN codegen inter/codegen-module
2020-02-23 14:36:39 +02:00
{module} HTML html inbuild/html-module
{module} ARCH arch inbuild/arch-module
{module} INBUILD inbuild inbuild/inbuild-module
2019-02-05 02:44:07 +02:00
# First, the tools we need to make, using the same declaration notation.
# In the eventual makefile, the symbol NAMEWEB is the location of NAME;
# the symbol NAMEMAKER is the individual make file for the tool; and
# the symbol NAMEX is the actual executable which the tool compiles into.
# After its declaration, we list all modules needed to compile the tool.
{tool} INBLORB inblorb inblorb
{dep} INBLORB on FOUNDATION
{tool} INDOC indoc indoc
{dep} INDOC on FOUNDATION
{tool} INFORM7 inform7 inform7
{dep} INFORM7 on FOUNDATION
{dep} INFORM7 on WORDS
{dep} INFORM7 on INFLECTIONS
{dep} INFORM7 on SYNTAX
{dep} INFORM7 on LINGUISTICS
{dep} INFORM7 on KINDS
{dep} INFORM7 on PROBLEMS
{dep} INFORM7 on CORE
{dep} INFORM7 on IF
{dep} INFORM7 on MULTIMEDIA
{dep} INFORM7 on INDEX
2020-02-23 14:36:39 +02:00
{dep} INFORM7 on HTML
{dep} INFORM7 on ARCH
2019-02-05 02:44:07 +02:00
{dep} INFORM7 on INTER
2019-08-28 12:35:44 +03:00
{dep} INFORM7 on BUILDING
2019-02-05 02:44:07 +02:00
{dep} INFORM7 on CODEGEN
{dep} INFORM7 on INBUILD
2019-02-05 02:44:07 +02:00
{tool} INPOLICY inpolicy inpolicy
{dep} INPOLICY on FOUNDATION
{tool} INRTPS inrtps inrtps
{dep} INRTPS on FOUNDATION
{tool} INBUILDTOOL inbuild inbuild
{dep} INBUILDTOOL on FOUNDATION
{dep} INBUILDTOOL on WORDS
2020-03-03 02:59:42 +02:00
{dep} INBUILDTOOL on SYNTAX
2020-02-23 14:36:39 +02:00
{dep} INBUILDTOOL on HTML
{dep} INBUILDTOOL on ARCH
{dep} INBUILDTOOL on INBUILD
2020-01-28 00:51:46 +02:00
2019-02-05 02:44:07 +02:00
{tool} INTERTOOL inter inter
{dep} INTERTOOL on FOUNDATION
{dep} INTERTOOL on ARCH
2019-02-05 02:44:07 +02:00
{dep} INTERTOOL on INTER
2019-08-28 12:35:44 +03:00
{dep} INTERTOOL on BUILDING
2019-02-05 02:44:07 +02:00
{dep} INTERTOOL on CODEGEN
# Inform 6 is not a web, so we have to give it special treatment:
INFORM6X = inform6/Tangled/inform6
# While these are also executables, they only provide unit tests for modules:
{tool} INFLECTIONSTEST inflections-test inform7/inflections-test
{dep} INFLECTIONSTEST on FOUNDATION
{dep} INFLECTIONSTEST on WORDS
{dep} INFLECTIONSTEST on INFLECTIONS
{tool} KINDSTEST kinds-test inform7/kinds-test
{dep} KINDSTEST on FOUNDATION
{dep} KINDSTEST on WORDS
{dep} KINDSTEST on INFLECTIONS
{dep} KINDSTEST on SYNTAX
{dep} KINDSTEST on LINGUISTICS
{dep} KINDSTEST on KINDS
{tool} LINGUISTICSTEST linguistics-test inform7/linguistics-test
{dep} LINGUISTICSTEST on FOUNDATION
{dep} LINGUISTICSTEST on WORDS
{dep} LINGUISTICSTEST on INFLECTIONS
{dep} LINGUISTICSTEST on SYNTAX
{dep} LINGUISTICSTEST on LINGUISTICS
{tool} PROBLEMSTEST problems-test inform7/problems-test
{dep} PROBLEMSTEST on FOUNDATION
{dep} PROBLEMSTEST on WORDS
{dep} PROBLEMSTEST on SYNTAX
{dep} PROBLEMSTEST on PROBLEMS
2020-03-11 02:21:09 +02:00
{tool} SYNTAXTEST syntax-test inbuild/syntax-test
2019-02-05 02:44:07 +02:00
{dep} SYNTAXTEST on FOUNDATION
{dep} SYNTAXTEST on WORDS
{dep} SYNTAXTEST on SYNTAX
2020-03-11 02:21:09 +02:00
{tool} WORDSTEST words-test inbuild/words-test
2019-02-05 02:44:07 +02:00
{dep} WORDSTEST on FOUNDATION
{dep} WORDSTEST on WORDS
# -----------------------------------------------------------------------------
# Targets "all" and "force"
# -----------------------------------------------------------------------------
# "make all", the default target, incrementally makes the tools; "make force"
# makes everything, disregarding all timestamps on files.
.PHONY: all
all: tools kits srules localintegration
2019-02-05 02:44:07 +02:00
.PHONY: force
force: forcetools forcekits forcesrules localintegration
2019-02-05 02:44:07 +02:00
2019-02-08 14:03:07 +02:00
.PHONY: localintegration
2019-03-17 21:45:41 +02:00
localintegration: inform7/Internal/Languages/English/Syntax.preform
inform7/Internal/Languages/English/Syntax.preform: inform7/Tangled/Syntax.preform
2019-03-16 15:12:11 +02:00
cp -f 'inform7/Tangled/Syntax.preform' "inform7/Internal/Languages/English/Syntax.preform"
2019-02-08 14:03:07 +02:00
# (Of course those other four phony targets are yet to be defined.)
2019-02-08 13:49:53 +02:00
2019-02-05 02:44:07 +02:00
# -----------------------------------------------------------------------------
# Target "makers"
# -----------------------------------------------------------------------------
# Each individual tool has its own makefile, stored inside its individual web.
# "make makers" runs through each tool in turn and creates this makefile.
# Note the repeatblock feature: the line in the block is repeated once for each
# defined tool. Inside the block, an asterisk expands to the tool's symbol
# name: so for example, for inblorb, *WEB would become INBLORBWEB.
.PHONY: makers
makers:
{repeatblock}
$(INWEBX) $(*WEB) -makefile $(*MAKER)
{endblock}
$(INWEBX) -prototype inform6/makescript.txt -makefile inform6/inform6.mk
2019-04-07 10:39:25 +03:00
$(INWEBX) -prototype retrospective/makescript.txt -makefile retrospective/makefile
2019-02-05 02:44:07 +02:00
# -----------------------------------------------------------------------------
# Target "gitignores"
# -----------------------------------------------------------------------------
# Each individual web needs its own .gitignore file, and this makes them.
.PHONY: gitignores
gitignores:
2019-03-13 00:06:19 +02:00
$(INWEBX) -prototype scripts/gitignorescript.txt -gitignore .gitignore
2019-02-05 02:44:07 +02:00
{repeatblock}
$(INWEBX) $(*WEB) -gitignore $(*WEB)/.gitignore
{endblock}
$(INWEBX) -prototype inform6/gitignorescript.txt -gitignore inform6/.gitignore
2019-02-05 02:44:07 +02:00
# -----------------------------------------------------------------------------
# Target "versions"
# -----------------------------------------------------------------------------
# Asks the tools their current version numbers.
.PHONY: versions
versions:
{repeatblock}
$(*X) -version
{endblock}
$(INFORM6X) -V
# -----------------------------------------------------------------------------
# Targets "srules" and "forcesrules"
# -----------------------------------------------------------------------------
2019-03-15 23:23:46 +02:00
# The Standard Rules extension is generated from a web (though it is not a
# C program), and needs its own individual handling. "make srules" updates
# this if need be; "make forcesrules" updates it regardless.
2019-02-05 02:44:07 +02:00
2019-03-16 15:12:11 +02:00
SRULES = inform7/Internal/Extensions/Graham\ Nelson/Standard\ Rules.i7x
2019-10-03 01:04:15 +03:00
BINFORM = inform7/Internal/Extensions/Graham\ Nelson/Basic\ Inform.i7x
2019-02-05 02:44:07 +02:00
.PHONY: srules
srules: $(SRULES)
2020-01-27 03:22:21 +02:00
$(SRULES): inform7/extensions/standard_rules/Contents.w inform7/extensions/standard_rules/Sections/*.w inform7/extensions/basic_inform/Contents.w inform7/extensions/basic_inform/Sections/*.w
$(INWEBX) inform7/extensions/standard_rules -tangle-to $(SRULES)
$(INWEBX) inform7/extensions/basic_inform -tangle-to $(BINFORM)
2019-02-05 02:44:07 +02:00
.PHONY: forcesrules
forcesrules:
2020-01-27 03:22:21 +02:00
$(INWEBX) inform7/extensions/standard_rules -tangle-to $(SRULES)
$(INWEBX) inform7/extensions/basic_inform -tangle-to $(BINFORM)
2019-02-05 02:44:07 +02:00
# -----------------------------------------------------------------------------
# Targets "kits" and "forcekits"
# -----------------------------------------------------------------------------
# These are easy because Inbuild performs a make-like service on them; that
# saves a great deal of messy make code here.
.PHONY: kits
kits:
$(INBUILDX) -build -contents-of inform7/Internal/Inter
.PHONY: forcekits
forcekits:
$(INBUILDX) -rebuild -contents-of inform7/Internal/Inter
2019-02-05 02:44:07 +02:00
# -----------------------------------------------------------------------------
# Target "tools"
# -----------------------------------------------------------------------------
# "make tools" builds all of the tools incrementally, i.e., only as necessary.
# Note the use of repeat to make a list: $(INBLORBX) $(INDOCX) ..., etc.
.PHONY: tools
tools: {repeatspan}$(*X){endspan} $(INFORM6X)
{repeatblock}
$(*X): {dependent-files-for}*
ifdef BENEVOLENTOVERLORD
$(MAKE) -f $(INPOLICYMAKER)
$(INPOLICYX) -advance-build $(*WEB)
endif
$(MAKE) -f $(*MAKER)
{endblock}
# As ever, Inform 6 needs special handling:
$(INFORM6X): inform6/Inform6/*.c
$(MAKE) -f inform6/inform6.mk
2019-04-07 10:39:25 +03:00
# -----------------------------------------------------------------------------
# Target "retrospective"
# -----------------------------------------------------------------------------
# "make retrospective" builds the back catalogue of old releases of ni and
# cBlorb, in the retrospective/BBBB directories (where BBBB is the release
# build code)
.PHONY: retrospective
retrospective:
$(MAKE) -f retrospective/makefile
2019-02-05 02:44:07 +02:00
# -----------------------------------------------------------------------------
# Target "forcetools"
# -----------------------------------------------------------------------------
# Similarly, but with a single target, since nothing is incremental here.
.PHONY: forcetools
forcetools:
ifdef BENEVOLENTOVERLORD
$(MAKE) -f $(INPOLICYMAKER)
endif
{repeatblock}
ifdef BENEVOLENTOVERLORD
$(INPOLICYX) -advance-build $(*WEB)
endif
$(MAKE) -f $(*MAKER) force
$(MAKE) -f inform6/inform6.mk force
{endblock}
# -----------------------------------------------------------------------------
# Target "check"
# -----------------------------------------------------------------------------
# "make check" invites the make file for every tool to run its own tests.
# I6 must come first, because that guarantees the Z and Glulx interpreters
# are safely built before we need them.
# -----------------------------------------------------------------------------
.PHONY: check
check:
$(MAKE) -f inform6/inform6.mk test
$(INPOLICYX) -silence -check-problems
{repeatblock}
$(MAKE) -f $(*MAKER) test
{endblock}
# -----------------------------------------------------------------------------
# Target "tangle"
# -----------------------------------------------------------------------------
# "make tangle", probably not very useful, tangles each web in turn.
# -----------------------------------------------------------------------------
.PHONY: tangle
tangle:
$(call tangle-webs)
define tangle-webs
{repeatblock}
$(INWEBX) $(*WEB) -tangle
{endblock}
endef
# -----------------------------------------------------------------------------
# Target "weave"
# -----------------------------------------------------------------------------
# "make weave" weaves each web in turn.
# -----------------------------------------------------------------------------
WEAVEOPTS = -weave sections
.PHONY: weave
weave:
$(call weave-webs)
define weave-webs
{repeatblock}
$(INWEBX) $(*WEB) $(WEAVEOPTS)
{endblock}
endef
2019-02-10 01:58:02 +02:00
# -----------------------------------------------------------------------------
# Target "pages"
# -----------------------------------------------------------------------------
# "make pages" refreshes the GitHub Pages content in the docs folder.
# -----------------------------------------------------------------------------
.PHONY: pages
pages:
2019-03-13 00:06:19 +02:00
$(INPOLICYX) -write-me scripts/READMEscript.txt
2020-03-22 12:50:19 +02:00
rm docs/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) docs/docs-src/webs.inweb -weave-as GitHubCovers -weave-into docs -navigation docs/docs-src/nav.html
$(INWEBX) docs/docs-src/compiler.inweb -weave-as GitHubCovers -weave-into docs -breadcrumb 'Source:webs.html' -navigation docs/docs-src/navc-o.html
$(INWEBX) docs/docs-src/extensions.inweb -weave-as GitHubCovers -weave-into docs -breadcrumb 'Source:webs.html' -navigation docs/docs-src/navk-o.html
$(INWEBX) docs/docs-src/other.inweb -weave-as GitHubCovers -weave-into docs -breadcrumb 'Source:webs.html' -navigation docs/docs-src/navo-o.html
$(INWEBX) docs/docs-src/units.inweb -weave-as GitHubCovers -weave-into docs -breadcrumb 'Source:webs.html' -navigation docs/docs-src/navu-o.html
2020-03-22 12:50:19 +02:00
rm docs/BasicInformKit/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/Internal/Inter/BasicInformKit -weave-docs -weave-into docs/BasicInformKit -navigation docs/docs-src/navk.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Kits:../extensions.html'
2020-03-22 12:50:19 +02:00
rm docs/WorldModelKit/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/Internal/Inter/WorldModelKit -weave-docs -weave-into docs/WorldModelKit -navigation docs/docs-src/navk.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Kits:../extensions.html'
2020-03-22 12:50:19 +02:00
rm docs/CommandParserKit/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/Internal/Inter/CommandParserKit -weave-docs -weave-into docs/CommandParserKit -navigation docs/docs-src/navk.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Kits:../extensions.html'
2020-03-22 12:50:19 +02:00
rm docs/BasicInformExtrasKit/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/Internal/Inter/BasicInformExtrasKit -weave-docs -weave-into docs/BasicInformExtrasKit -navigation docs/docs-src/navk.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Kits:../extensions.html'
2020-03-22 12:50:19 +02:00
rm docs/EnglishLanguageKit/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/Internal/Inter/EnglishLanguageKit -weave-docs -weave-into docs/EnglishLanguageKit -navigation docs/docs-src/navk.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Kits:../extensions.html'
2020-03-22 12:50:19 +02:00
rm docs/inblorb/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inblorb -weave-docs -weave-into docs/inblorb -navigation docs/docs-src/navo.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Other Tools:../other.html'
2020-03-22 12:50:19 +02:00
rm docs/inbuild/*.html
$(INWEBX) inbuild -weave-docs -weave-into docs/inbuild -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Tools:../compiler.html'
rm docs/arch-module/*.html
$(INWEBX) inbuild/arch-module -weave-docs -weave-into docs/arch-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/syntax-module/*.html
$(INWEBX) inbuild/syntax-module -weave-docs -weave-into docs/syntax-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/syntax-test/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inbuild/syntax-test -weave-docs -weave-into docs/syntax-test -navigation docs/docs-src/navu.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Unit Test Tools:../units.html'
2020-03-22 12:50:19 +02:00
rm docs/words-module/*.html
$(INWEBX) inbuild/words-module -weave-docs -weave-into docs/words-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/words-test/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inbuild/words-test -weave-docs -weave-into docs/words-test -navigation docs/docs-src/navu.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Unit Test Tools:../units.html'
2020-03-22 12:50:19 +02:00
rm docs/inbuild-module/*.html
$(INWEBX) inbuild/inbuild-module -weave-docs -weave-into docs/inbuild-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/html-module/*.html
$(INWEBX) inbuild/html-module -weave-docs -weave-into docs/html-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/indoc/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) indoc -weave-docs -weave-into docs/indoc -navigation docs/docs-src/navo.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Other Tools:../other.html'
2020-03-22 12:50:19 +02:00
rm docs/inform7/*.html
$(INWEBX) inform7 -weave-docs -weave-into docs/inform7 -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Tools:../compiler.html'
rm docs/core-module/*.html
$(INWEBX) inform7/core-module -weave-docs -weave-into docs/core-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/if-module/*.html
$(INWEBX) inform7/if-module -weave-docs -weave-into docs/if-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/index-module/*.html
$(INWEBX) inform7/index-module -weave-docs -weave-into docs/index-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/inflections-module/*.html
$(INWEBX) inform7/inflections-module -weave-docs -weave-into docs/inflections-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/inflections-test/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/inflections-test -weave-docs -weave-into docs/inflections-test -navigation docs/docs-src/navu.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Unit Test Tools:../units.html'
2020-03-22 12:50:19 +02:00
rm docs/kinds-module/*.html
$(INWEBX) inform7/kinds-module -weave-docs -weave-into docs/kinds-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/kinds-test/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/kinds-test -weave-docs -weave-into docs/kinds-test -navigation docs/docs-src/navu.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Unit Test Tools:../units.html'
2020-03-22 12:50:19 +02:00
rm docs/linguistics-module/*.html
$(INWEBX) inform7/linguistics-module -weave-docs -weave-into docs/linguistics-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/linguistics-test/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/linguistics-test -weave-docs -weave-into docs/linguistics-test -navigation docs/docs-src/navu.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Unit Test Tools:../units.html'
2020-03-22 12:50:19 +02:00
rm docs/multimedia-module/*.html
$(INWEBX) inform7/multimedia-module -weave-docs -weave-into docs/multimedia-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/problems-module/*.html
$(INWEBX) inform7/problems-module -weave-docs -weave-into docs/problems-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/problems-test/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/problems-test -weave-docs -weave-into docs/problems-test -navigation docs/docs-src/navu.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Unit Test Tools:../units.html'
2020-03-22 12:50:19 +02:00
rm docs/inpolicy/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inpolicy -weave-docs -weave-into docs/inpolicy -navigation docs/docs-src/navo.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Other Tools:../other.html'
2020-03-22 12:50:19 +02:00
rm docs/inrtps/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inrtps -weave-docs -weave-into docs/inrtps -navigation docs/docs-src/navo.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Other Tools:../other.html'
2020-03-22 12:50:19 +02:00
rm docs/inter/*.html
$(INWEBX) inter -weave-docs -weave-into docs/inter -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Tools:../compiler.html'
rm docs/inter-module/*.html
$(INWEBX) inter/inter-module -weave-docs -weave-into docs/inter-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/codegen-module/*.html
$(INWEBX) inter/codegen-module -weave-docs -weave-into docs/codegen-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/building-module/*.html
$(INWEBX) inter/building-module -weave-docs -weave-into docs/building-module -navigation docs/docs-src/navc.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Compiler Modules:../compiler.html'
rm docs/standard_rules/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/extensions/standard_rules -weave-docs -weave-into docs/standard_rules -navigation docs/docs-src/navk.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Extensions:../extensions.html'
2020-03-22 12:50:19 +02:00
rm docs/basic_inform/*.html
2020-03-19 02:11:25 +02:00
$(INWEBX) inform7/extensions/basic_inform -weave-docs -weave-into docs/basic_inform -navigation docs/docs-src/navk.html -breadcrumb 'Source:../webs.html' -breadcrumb 'Extensions:../extensions.html'
2019-02-10 01:58:02 +02:00
2019-02-05 02:44:07 +02:00
# -----------------------------------------------------------------------------
# Target "clean"
# -----------------------------------------------------------------------------
# "make clean" removes inessential files from the Inform source hierarchy
# -----------------------------------------------------------------------------
.PHONY: clean
clean:
$(call clean-up)
define clean-up
{repeatblock}
$(MAKE) -f $(*MAKER) clean
{endblock}
$(MAKE) -f inform6/inform6.mk clean
endef
# -----------------------------------------------------------------------------
# Target "purge"
# -----------------------------------------------------------------------------
# "make purge" cleans, but also removes binaries
# -----------------------------------------------------------------------------
.PHONY: purge
purge:
$(call purge-up)
define purge-up
{repeatblock}
$(MAKE) -f $(*MAKER) purge
{endblock}
$(MAKE) -f inform6/inform6.mk purge
endef
# -----------------------------------------------------------------------------
# Target "ebooks"
# -----------------------------------------------------------------------------
# "make ebooks" generates the two Inform ebook files in EPUB format.
# One combines the manuals Writing with Inform and The Inform Recipe Book into
# a single volume, while the other holds the collected change logs.
# -----------------------------------------------------------------------------
.PHONY: ebooks
ebooks:
$(call clean-ebooks)
2019-03-16 15:12:11 +02:00
$(INDOCX) -from resources/Documentation ebook
2019-02-05 02:44:07 +02:00
$(call clean-ebooks)
2019-03-16 15:12:11 +02:00
$(INDOCX) -from resources/Changes ebook
2019-02-05 02:44:07 +02:00
$(call clean-ebooks)
define clean-ebooks
2019-03-16 15:12:11 +02:00
rm -f resources/Documentation/Output/OEBPS/images/*
rm -f resources/Documentation/Output/OEBPS/*.*
rm -f resources/Documentation/Output/META-INF/container.xml
rm -f resources/Documentation/Output/mimetype
rm -f resources/Documentation/Output/*.*
rm -f resources/Changes/Output/OEBPS/images/*
rm -f resources/Changes/Output/OEBPS/*.*
rm -f resources/Changes/Output/META-INF/container.xml
rm -f resources/Changes/Output/mimetype
rm -f resources/Changes/Output/*.*
2019-02-05 02:44:07 +02:00
endef
# -----------------------------------------------------------------------------
# Targets "integration" and "forceintegration"
# -----------------------------------------------------------------------------
# This copies material into the user interface application.
# -----------------------------------------------------------------------------
2019-03-17 21:45:41 +02:00
ifdef BUILTINCOMPS
2019-02-05 02:44:07 +02:00
INTOOLSBUILTIN = \
$(BUILTINCOMPS)/$(INBLORBNAME) \
$(BUILTINCOMPS)/$(INFORM6NAME) \
$(BUILTINCOMPS)/$(INFORM7NAME) \
$(BUILTINCOMPS)/$(INTESTNAME)
SRULESINPLACE = $(INTERNAL)/Extensions/Graham\ Nelson/Standard\ Rules.i7x
2019-10-03 01:04:15 +03:00
BINFORMINPLACE = $(INTERNAL)/Extensions/Graham\ Nelson/Basic\ Inform.i7x
2019-02-05 02:44:07 +02:00
INTERNALEXEMPLUM = $(INTERNAL)/Miscellany/Cover.jpg
2019-03-16 15:12:11 +02:00
INTERNALEXEMPLUMFROM = inform7/Internal/Miscellany/Cover.jpg
2019-02-05 02:44:07 +02:00
IMAGESEXEMPLUM = $(BUILTINHTML)/doc_images/help.png
2019-03-16 15:12:11 +02:00
IMAGESEXEMPLUMFROM = resources/Imagery/doc_images/help.png
2019-02-05 02:44:07 +02:00
DOCEXEMPLUM = $(BUILTINHTMLINNER)/index.html
RTPEXEMPLUM = $(BUILTINHTMLINNER)/RTP_P1.html
.PHONY: integration
integration: \
$(INTOOLSBUILTIN) \
$(INTERNAL)/Languages/English/Syntax.preform \
$(INTERNAL)/Languages/English/Standard.indext \
$(INTERNAL)/Languages/English/Basic.indext \
2019-02-05 02:44:07 +02:00
$(SRULESINPLACE) \
2019-10-03 01:04:15 +03:00
$(BINFORMINPLACE) \
2020-02-01 01:04:39 +02:00
kitsintegration \
2020-01-22 12:58:51 +02:00
$(DOCEXEMPLUM) \
2019-02-05 02:44:07 +02:00
$(INTERNALEXEMPLUM) \
$(IMAGESEXEMPLUM) \
$(RTPEXEMPLUM)
2020-02-01 01:04:39 +02:00
.PHONY: kitsintegration
kitsintegration:
$(call transfer-kits)
2019-02-05 02:44:07 +02:00
.PHONY: forceintegration
forceintegration:
$(call transfer-intools)
$(call transfer-preform)
$(call transfer-standard-rules)
2020-02-01 01:04:39 +02:00
$(call transfer-kits)
2019-02-05 02:44:07 +02:00
$(call transfer-internal-tree)
$(call transfer-images)
$(call make-inapp-documentation)
$(call make-inapp-outcome-pages)
# (a) Copying necessary intools into the app
# Only the following intools are present in the UI app at run-time: inblorb,
# inform6, inform7, intest. All can have different names there.
$(BUILTINCOMPS)/$(INBLORBNAME): $(INBLORBX)
mkdir -p $(BUILTINCOMPS)
cp -f $(INBLORBX) $(BUILTINCOMPS)/$(INBLORBNAME)
$(BUILTINCOMPS)/$(INFORM6NAME): inform6/Tangled/inform6
$(MAKE) -f inform6/inform6.mk
mkdir -p $(BUILTINCOMPS)
cp -f $(INFORM6X) $(BUILTINCOMPS)/$(INFORM6NAME)
$(BUILTINCOMPS)/$(INFORM7NAME): $(INFORM7WEB)/Tangled/inform7
$(MAKE) -f $(INFORM7MAKER)
mkdir -p $(BUILTINCOMPS)
cp -f $(INFORM7X) $(BUILTINCOMPS)/$(INFORM7NAME)
$(BUILTINCOMPS)/intest: $(INTESTWEB)/Tangled/intest
2019-03-16 15:12:11 +02:00
cd ..; $(MAKE) -f intest/intest.mk; cd inform
2019-02-05 02:44:07 +02:00
mkdir -p $(BUILTINCOMPS)
2019-03-16 15:12:11 +02:00
cp -f $(INTESTWEB)/Tangled/intest $(BUILTINCOMPS)/intest
2019-02-05 02:44:07 +02:00
define transfer-intools
mkdir -p $(BUILTINCOMPS)
cp -f $(INBLORBX) $(BUILTINCOMPS)/$(INBLORBNAME)
cp -f $(INFORM6X) $(BUILTINCOMPS)/$(INFORM6NAME)
cp -f $(INFORM7X) $(BUILTINCOMPS)/$(INFORM7NAME)
cp -f $(INTESTX) $(BUILTINCOMPS)/intest
endef
# (b) Copying Preform definition and index things into the app
2019-02-05 02:44:07 +02:00
$(INTERNAL)/Languages/English/Syntax.preform: $(INFORM7WEB)/Tangled/Syntax.preform
$(call transfer-preform)
$(INFORM7WEB)/Tangled/Syntax.preform:
$(MAKE) -f $(INFORM7MAKER)
$(INTERNAL)/Languages/English/Standard.indext: inform7/Internal/Languages/English/Standard.indext
$(call transfer-preform)
$(INTERNAL)/Languages/English/Basic.indext: inform7/Internal/Languages/English/Basic.indext
$(call transfer-preform)
2019-02-05 02:44:07 +02:00
define transfer-preform
cp -f 'inform7/Tangled/Syntax.preform' "$(INTERNAL)/Languages/English/Syntax.preform"
2019-03-16 15:12:11 +02:00
cp -f 'inform7/Tangled/Syntax.preform' "inform7/Internal/Languages/English/Syntax.preform"
cp -f 'inform7/Internal/Languages/English/Standard.indext' "$(INTERNAL)/Languages/English/Standard.indext"
cp -f 'inform7/Internal/Languages/English/Basic.indext' "$(INTERNAL)/Languages/English/Basic.indext"
2019-02-05 02:44:07 +02:00
endef
# (c) Copying the Standard Rules into the app
$(SRULESINPLACE): $(SRULES)
$(call transfer-standard-rules)
define transfer-standard-rules
mkdir -p "$(INTERNAL)/Extensions/Graham Nelson"
cp $(SRULES) $(SRULESINPLACE)
2020-01-22 12:58:51 +02:00
$(call transfer-xefs)
2019-02-05 02:44:07 +02:00
endef
2019-10-03 01:04:15 +03:00
$(BINFORMINPLACE): $(BINFORM)
$(call transfer-basic-inform)
define transfer-basic-inform
mkdir -p "$(INTERNAL)/Extensions/Graham Nelson"
cp $(BINFORM) $(BINFORMINPLACE)
2020-01-22 12:58:51 +02:00
$(call transfer-xefs)
endef
define transfer-xefs
mkdir -p "$(INTERNAL)/HTML"
cp -f inform7/Internal/HTML/xrefs.txt "$(INTERNAL)/HTML"
2019-10-03 01:04:15 +03:00
endef
2020-02-10 02:10:58 +02:00
# (d) Copying kits and pipelines into the app
2019-02-05 02:44:07 +02:00
2020-02-01 01:04:39 +02:00
define transfer-kits
$(INBUILDX) -sync-to $(INTERNAL) -contents-of inform7/Internal/Inter
2020-02-10 02:10:58 +02:00
$(INBUILDX) -sync-to $(INTERNAL) -contents-of inform7/Internal/Pipelines
2019-07-20 14:40:27 +03:00
endef
2019-02-05 02:44:07 +02:00
# (e) Copying internal resources into the app
# The Internal tree also holds built-in extensions, web interpreters and so on.
# In effect, it's a repository in the UI app of non-executable resources:
$(INTERNALEXEMPLUM): \
2019-03-16 15:12:11 +02:00
inform7/Internal/Extensions/Eric\ Eve/[A-Za-z]* \
inform7/Internal/Extensions/Emily\ Short/[A-Za-z]* \
inform7/Internal/Extensions/Graham\ Nelson/[A-Za-z]* \
inform7/Internal/Miscellany/[A-Za-z]*.* \
inform7/Internal/HTML/[A-Za-z]*.* \
inform7/Internal/Templates/Parchment/[A-Za-z]*.* \
inform7/Internal/Templates/Quixe/[A-Za-z]*.* \
inform7/Internal/Templates/Classic/[A-Za-z]*.* \
inform7/Internal/Templates/Vorple/[A-Za-z]*.* \
inform7/Internal/Templates/Standard/[A-Za-z]*.*
2019-02-05 02:44:07 +02:00
$(call transfer-internal-tree)
define transfer-internal-tree
touch $(INTERNALEXEMPLUMFROM)
mkdir -p $(INTERNAL)
mkdir -p "$(INTERNAL)/Extensions/Eric Eve"
rm -f $(INTERNAL)/Extensions/Eric\ Eve/*
mkdir -p "$(INTERNAL)/Extensions/Emily Short"
rm -f $(INTERNAL)/Extensions/Emily\ Short/*
mkdir -p "$(INTERNAL)/Extensions/Graham Nelson"
rm -f $(INTERNAL)/Extensions/Graham\ Nelson/*
2019-03-16 15:12:11 +02:00
cp -R -f inform7/Internal/Extensions $(INTERNAL)/Extensions/..
2019-02-05 02:44:07 +02:00
mkdir -p "$(INTERNAL)/Languages"
mkdir -p "$(INTERNAL)/Languages/English"
mkdir -p "$(INTERNAL)/Languages/French"
mkdir -p "$(INTERNAL)/Languages/German"
mkdir -p "$(INTERNAL)/Languages/Italian"
mkdir -p "$(INTERNAL)/Languages/Spanish"
2019-03-16 15:12:11 +02:00
cp -R -f inform7/Internal/Languages $(INTERNAL)/Languages/..
2019-02-05 02:44:07 +02:00
mkdir -p "$(INTERNAL)/Templates"
mkdir -p "$(INTERNAL)/Templates/Standard"
rm -f $(INTERNAL)/Templates/Standard/*
mkdir -p "$(INTERNAL)/Templates/Classic"
rm -f $(INTERNAL)/Templates/Classic/*
mkdir -p "$(INTERNAL)/Templates/Parchment"
rm -f $(INTERNAL)/Templates/Parchment/*
mkdir -p "$(INTERNAL)/Templates/Quixe"
rm -f $(INTERNAL)/Templates/Quixe/*
mkdir -p "$(INTERNAL)/Templates/Vorple"
rm -f $(INTERNAL)/Templates/Vorple/*
2019-03-16 15:12:11 +02:00
cp -R -f inform7/Internal/Templates $(INTERNAL)/Templates/..
2019-02-05 02:44:07 +02:00
mkdir -p "$(INTERNAL)/Miscellany"
rm -f $(INTERNAL)/Miscellany/*
2019-03-16 15:12:11 +02:00
cp -R -f inform7/Internal/Miscellany $(INTERNAL)/Miscellany/..
2019-02-05 02:44:07 +02:00
mkdir -p "$(INTERNAL)/HTML"
rm -f $(INTERNAL)/HTML/*
2019-03-16 15:12:11 +02:00
cp -R -f inform7/Internal/HTML $(INTERNAL)/HTML/..
2019-02-05 02:44:07 +02:00
endef
# (f) Copying images into the app
$(IMAGESEXEMPLUM): \
2019-03-16 15:12:11 +02:00
resources/Imagery/app_images/[A-Za-z]*.* \
resources/Imagery/bg_images/[A-Za-z]*.* \
resources/Imagery/doc_images/[A-Za-z]*.* \
resources/Imagery/map_icons/[A-Za-z]*.* \
resources/Imagery/outcome_images/[A-Za-z]*.* \
resources/Imagery/scene_icons/[A-Za-z]*.*
2019-02-05 02:44:07 +02:00
$(call transfer-images)
define transfer-images
touch $(IMAGESEXEMPLUMFROM)
2019-03-16 15:12:11 +02:00
cp -f resources/Imagery/app_images/Welcome*Background.png $(BUILTINHTML)
2019-02-05 02:44:07 +02:00
mkdir -p $(BUILTINHTML)/bg_images
rm -f $(BUILTINHTML)/bg_images/*
2019-03-16 15:12:11 +02:00
cp -f resources/Imagery/bg_images/[A-Za-z]*.* $(BUILTINHTML)/bg_images
2019-02-05 02:44:07 +02:00
mkdir -p $(BUILTINHTML)/doc_images
rm -f $(BUILTINHTML)/doc_images/*
2019-03-16 15:12:11 +02:00
cp -f resources/Imagery/doc_images/[A-Za-z]*.* $(BUILTINHTML)/doc_images
2019-02-05 02:44:07 +02:00
mkdir -p $(BUILTINHTML)/map_icons
rm -f $(BUILTINHTML)/map_icons/*
2019-03-16 15:12:11 +02:00
cp -f resources/Imagery/map_icons/[A-Za-z]*.* $(BUILTINHTML)/map_icons
2019-02-05 02:44:07 +02:00
mkdir -p $(BUILTINHTML)/outcome_images
rm -f $(BUILTINHTML)/outcome_images/*
2019-03-16 15:12:11 +02:00
cp -f resources/Imagery/outcome_images/[A-Za-z]*.* $(BUILTINHTML)/outcome_images
2019-02-05 02:44:07 +02:00
mkdir -p $(BUILTINHTML)/scene_icons
rm -f $(BUILTINHTML)/scene_icons/*
2019-03-16 15:12:11 +02:00
cp -f resources/Imagery/scene_icons/[A-Za-z]*.* $(BUILTINHTML)/scene_icons
2019-02-05 02:44:07 +02:00
endef
# (g) Typesetting documentation to HTML inside the app
2019-03-16 15:12:11 +02:00
$(DOCEXEMPLUM): resources/Documentation/*.txt resources/Documentation/Examples/*.txt
2019-02-05 02:44:07 +02:00
$(call make-inapp-documentation)
define make-inapp-documentation
mkdir -p "$(INTERNAL)/Documentation"
mkdir -p $(BUILTINHTMLINNER)
2020-01-22 12:58:51 +02:00
$(INDOCX) -from resources/Documentation -xrefs 'inform7/Internal/HTML/xrefs.txt' $(INDOCOPTS)
2019-02-05 02:44:07 +02:00
endef
# (h) Typesetting the HTML pages used to display run-time problem messages
2019-03-16 15:12:11 +02:00
$(RTPEXEMPLUM): resources/Outcome*Pages/texts.txt resources/Outcome*Pages/*.html
2019-02-05 02:44:07 +02:00
$(call make-inapp-outcome-pages)
define make-inapp-outcome-pages
2019-03-16 15:12:11 +02:00
$(INRTPSX) resources/Outcome\ Pages $(BUILTINHTMLINNER) $(INRTPSOPTS)
cp -f resources/Outcome\ Pages/pl404.html $(BUILTINHTMLINNER)
2019-02-05 02:44:07 +02:00
endef
2019-03-17 21:45:41 +02:00
endif
2019-02-05 02:44:07 +02:00
# -----------------------------------------------------------------------------