From 3191ccada039a723dfc6d8ed7b2ce1b50d47723e Mon Sep 17 00:00:00 2001 From: Graham Nelson Date: Tue, 12 Mar 2019 22:06:19 +0000 Subject: [PATCH] Improved first-run build --- README.md | 11 ++++------- READMEscript.txt => scripts/READMEscript.txt | 15 ++++++--------- scripts/first.sh | 15 +++++++++++++++ .../gitignorescript.txt | 0 makescript.txt => scripts/makescript.txt | 2 ++ 5 files changed, 27 insertions(+), 16 deletions(-) rename READMEscript.txt => scripts/READMEscript.txt (97%) create mode 100644 scripts/first.sh rename gitignorescript.txt => scripts/gitignorescript.txt (100%) rename makescript.txt => scripts/makescript.txt (99%) diff --git a/README.md b/README.md index 1887d9990..0089a9be0 100644 --- a/README.md +++ b/README.md @@ -37,13 +37,10 @@ Make a directory in which to work: let's call this "work". Then: * Clone and build Inweb into "work/inweb". * Clone and build Intest into "work/intest". * Clone Inform into "work/inform". Change the current directory to that. -We first need to make all the many makefiles necessary, so run these two -commands - the first makes the master makefile, the second makes all the -tool-specific ones: - * ../inweb/Tangled/inweb -makefile makefile - * make makers -* And now you can simply run "make". Thiss hould give you a complete working -set of command-line Inform tools. +Then run "bash scripts/first.sh" (or whatever shell you prefer: it need +not be bash). This should give you a complete working set of command-line +Inform tools and associated makefiles. For any future builds, you can simply +type "make". * For a simple test, try e.g. "inblorb/Tangled/inblorb -help". All the executables should similarly respond to -help. * But for a true test, run "make check". This compiles two more tools needed diff --git a/READMEscript.txt b/scripts/READMEscript.txt similarity index 97% rename from READMEscript.txt rename to scripts/READMEscript.txt index f4ca609a7..cab499e7e 100644 --- a/READMEscript.txt +++ b/scripts/READMEscript.txt @@ -1,4 +1,4 @@ -@-> README.md +@-> ../README.md # Inform 7 @version(inform7) ## About Inform 7 @@ -38,13 +38,10 @@ Make a directory in which to work: let's call this "work". Then: * Clone and build Inweb into "work/inweb". * Clone and build Intest into "work/intest". * Clone Inform into "work/inform". Change the current directory to that. -We first need to make all the many makefiles necessary, so run these two -commands - the first makes the master makefile, the second makes all the -tool-specific ones: - * ../inweb/Tangled/inweb -makefile makefile - * make makers -* And now you can simply run "make". Thiss hould give you a complete working -set of command-line Inform tools. +Then run "bash scripts/first.sh" (or whatever shell you prefer: it need +not be bash). This should give you a complete working set of command-line +Inform tools and associated makefiles. For any future builds, you can simply +type "make". * For a simple test, try e.g. "inblorb/Tangled/inblorb -help". All the executables should similarly respond to -help. * But for a true test, run "make check". This compiles two more tools needed @@ -164,7 +161,7 @@ be accepted. (Note that these are not git submodules.) This README.mk file was generated automatically by Inpolicy, and should not be edited. To make changes, edit READMEscript.txt and re-generate. -@-> docs/webs.html +@-> ../docs/webs.html @define web(program, manual)
  • @program - diff --git a/scripts/first.sh b/scripts/first.sh new file mode 100644 index 000000000..28ff8e5f2 --- /dev/null +++ b/scripts/first.sh @@ -0,0 +1,15 @@ +echo "(A script to make a first build of the core Inform tools)" +echo "(Step 1 of 3: making the overall makefile)" +if ! ( ../inweb/Tangled/inweb -prototype scripts/makescript.txt -makefile makefile; ) then + echo "(Okay, so that failed. Have you installed and built Inweb?)" + exit 1 +fi +echo "(Step 2 of 3: making individual makefiles)" +if ! ( make makers; ) then + exit 1 +fi +echo "(Step 3 of 3: building the tools)" +if ! ( make; ) then + exit 1 +fi +echo "(Done!)" diff --git a/gitignorescript.txt b/scripts/gitignorescript.txt similarity index 100% rename from gitignorescript.txt rename to scripts/gitignorescript.txt diff --git a/makescript.txt b/scripts/makescript.txt similarity index 99% rename from makescript.txt rename to scripts/makescript.txt index 18fe8735a..517a0b037 100644 --- a/makescript.txt +++ b/scripts/makescript.txt @@ -198,6 +198,7 @@ makers: .PHONY: gitignores gitignores: + $(INWEBX) -prototype scripts/gitignorescript.txt -gitignore .gitignore {repeatblock} $(INWEBX) $(*WEB) -gitignore $(*WEB)/.gitignore {endblock} @@ -338,6 +339,7 @@ endef .PHONY: pages pages: + $(INPOLICYX) -write-me scripts/READMEscript.txt $(INWEBX) inblorb -weave-docs -weave-into docs/inblorb $(INWEBX) indoc -weave-docs -weave-into docs/indoc $(INWEBX) inpolicy -weave-docs -weave-into docs/inpolicy