mirror of
https://github.com/ganelson/inform.git
synced 2024-06-26 04:00:43 +03:00
Migrated the eight EgN-C test cases to use makescripts
This commit is contained in:
parent
229e604b52
commit
e25b49212e
1
inform7/.gitignore
vendored
1
inform7/.gitignore
vendored
|
@ -45,6 +45,7 @@ Tests/Test Externals/_Build/
|
|||
Tests/Test Externals/_Executables/
|
||||
Tests/Test Externals/_Textual/
|
||||
Tests/Test Makes/Eg?-C/Eg?
|
||||
Tests/Test Makes/Eg?-C/makefile
|
||||
Tests/Test Makes/Eg?-C/Eg?-I.[co]
|
||||
Tests/Test Makes/Eg?-C/Eg?-C.o
|
||||
Tests/Test Makes/Eg?-C/actual_output.txt
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# This is a "makescript" used by Inweb to construct a version of the makefile
|
||||
# for this using-Inform-with-C example which is likely to work on your platform.
|
||||
|
||||
{platform-settings}
|
||||
|
||||
# Where inform7 is installed, relative to this directory
|
||||
|
||||
INST = ../../..
|
||||
|
||||
# Abbreviations for running C compiler, linker, and inform7 tools
|
||||
|
||||
CC = clang -g -std=c99 -c -I $(INST)/Internal/Miscellany
|
||||
LINK = clang -g
|
||||
INFORM = $(INST)/Tangled/inform7 -silence
|
||||
|
||||
# There is one build target: an executable.
|
||||
|
@ -14,10 +14,10 @@ INFORM = $(INST)/Tangled/inform7 -silence
|
|||
all: Eg1
|
||||
|
||||
Eg1: Eg1-I.o
|
||||
$(LINK) -o Eg1 Eg1-I.o
|
||||
{link from: Eg1-I.o to: Eg1$(EXEEXTENSION)}
|
||||
|
||||
Eg1-I.o: Eg1-I.c
|
||||
$(CC) -o Eg1-I.o Eg1-I.c
|
||||
{compile from: Eg1-I.c to: Eg1-I.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg1-I.c: Eg1.i7
|
||||
$(INFORM) -basic -format=C -o Eg1-I.c Eg1.i7
|
||||
|
@ -33,4 +33,5 @@ clean:
|
|||
rm -f Eg1
|
||||
rm -f actual_output.txt
|
||||
rm -f build_log.txt
|
||||
rm -f inweb_output.txt
|
||||
|
39
inform7/Tests/Test Makes/Eg2-C/Eg2-C.mkscript
Normal file
39
inform7/Tests/Test Makes/Eg2-C/Eg2-C.mkscript
Normal file
|
@ -0,0 +1,39 @@
|
|||
# This is a "makescript" used by Inweb to construct a version of the makefile
|
||||
# for this using-Inform-with-C example which is likely to work on your platform.
|
||||
|
||||
{platform-settings}
|
||||
|
||||
# $(INST) is where inform7 is installed, relative to this directory.
|
||||
|
||||
INST = ../../..
|
||||
INFORM = $(INST)/Tangled/inform7 -silence
|
||||
|
||||
# There is one build target: an executable.
|
||||
|
||||
.PHONY: all
|
||||
all: Eg2
|
||||
|
||||
Eg2: Eg2-C.o Eg2-I.o
|
||||
{link from: Eg2-C.o Eg2-I.o to: Eg2$(EXEEXTENSION)}
|
||||
|
||||
Eg2-C.o: Eg2.c
|
||||
{compile from: Eg2.c to: Eg2-C.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg2-I.o: Eg2-I.c
|
||||
{compile from: Eg2-I.c to: Eg2-I.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg2-I.c: Eg2.i7
|
||||
$(INFORM) -basic -format=C/no-main -o Eg2-I.c Eg2.i7
|
||||
|
||||
.PHONY: run
|
||||
run: Eg2
|
||||
./Eg2
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f Eg2-I.c
|
||||
rm -f *.o
|
||||
rm -f Eg2
|
||||
rm -f actual_output.txt
|
||||
rm -f build_log.txt
|
||||
rm -f inweb_output.txt
|
|
@ -1,38 +0,0 @@
|
|||
# Where inform7 is installed, relative to this directory
|
||||
|
||||
INST = ../../..
|
||||
|
||||
# Abbreviations for running C compiler, linker, and inform7 tools
|
||||
|
||||
CC = clang -g -std=c99 -c -I $(INST)/Internal/Miscellany
|
||||
LINK = clang -g
|
||||
INFORM = $(INST)/Tangled/inform7 -silence
|
||||
|
||||
# There is one build target: an executable.
|
||||
|
||||
.PHONY: all
|
||||
all: Eg2
|
||||
|
||||
Eg2: Eg2-C.o Eg2-I.o
|
||||
$(LINK) -o Eg2 Eg2-C.o Eg2-I.o
|
||||
|
||||
Eg2-C.o: Eg2.c
|
||||
$(CC) -o Eg2-C.o Eg2.c
|
||||
|
||||
Eg2-I.o: Eg2-I.c
|
||||
$(CC) -o Eg2-I.o Eg2-I.c
|
||||
|
||||
Eg2-I.c: Eg2.i7
|
||||
$(INFORM) -basic -format=C/no-main -o Eg2-I.c Eg2.i7
|
||||
|
||||
.PHONY: run
|
||||
run: Eg2
|
||||
./Eg2
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f Eg2-I.c
|
||||
rm -f *.o
|
||||
rm -f Eg2
|
||||
rm -f actual_output.txt
|
||||
rm -f build_log.txt
|
|
@ -1,11 +1,11 @@
|
|||
# This is a "makescript" used by Inweb to construct a version of the makefile
|
||||
# for this using-Inform-with-C example which is likely to work on your platform.
|
||||
|
||||
{platform-settings}
|
||||
|
||||
# Where inform7 is installed, relative to this directory
|
||||
|
||||
INST = ../../..
|
||||
|
||||
# Abbreviations for running C compiler, linker, and inform7 tools
|
||||
|
||||
CC = clang -g -std=c99 -c -I $(INST)/Internal/Miscellany
|
||||
LINK = clang -g
|
||||
INFORM = $(INST)/Tangled/inform7 -silence
|
||||
|
||||
# There is one build target: an executable.
|
||||
|
@ -14,13 +14,13 @@ INFORM = $(INST)/Tangled/inform7 -silence
|
|||
all: Eg3
|
||||
|
||||
Eg3: Eg3-C.o Eg3-I.o
|
||||
$(LINK) -o Eg3 Eg3-C.o Eg3-I.o
|
||||
{link from: Eg3-C.o Eg3-I.o to: Eg3$(EXEEXTENSION)}
|
||||
|
||||
Eg3-C.o: Eg3.c
|
||||
$(CC) -o Eg3-C.o Eg3.c
|
||||
{compile from: Eg3.c to: Eg3-C.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg3-I.o: Eg3-I.c
|
||||
$(CC) -o Eg3-I.o Eg3-I.c
|
||||
{compile from: Eg3-I.c to: Eg3-I.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg3-I.c: Eg3.i7
|
||||
$(INFORM) -basic -format=C/no-main -o Eg3-I.c Eg3.i7
|
||||
|
@ -36,3 +36,4 @@ clean:
|
|||
rm -f Eg3
|
||||
rm -f actual_output.txt
|
||||
rm -f build_log.txt
|
||||
rm -f inweb_output.txt
|
|
@ -1,11 +1,11 @@
|
|||
# This is a "makescript" used by Inweb to construct a version of the makefile
|
||||
# for this using-Inform-with-C example which is likely to work on your platform.
|
||||
|
||||
{platform-settings}
|
||||
|
||||
# Where inform7 is installed, relative to this directory
|
||||
|
||||
INST = ../../..
|
||||
|
||||
# Abbreviations for running C compiler, linker, and inform7 tools
|
||||
|
||||
CC = clang -g -std=c99 -c -I $(INST)/Internal/Miscellany
|
||||
LINK = clang -g
|
||||
INFORM = $(INST)/Tangled/inform7 -silence
|
||||
|
||||
# There is one build target: an executable.
|
||||
|
@ -14,13 +14,13 @@ INFORM = $(INST)/Tangled/inform7 -silence
|
|||
all: Eg4
|
||||
|
||||
Eg4: Eg4-C.o Eg4-I.o
|
||||
$(LINK) -o Eg4 Eg4-C.o Eg4-I.o
|
||||
{link from: Eg4-C.o Eg4-I.o to: Eg4$(EXEEXTENSION)}
|
||||
|
||||
Eg4-C.o: Eg4.c
|
||||
$(CC) -o Eg4-C.o Eg4.c
|
||||
{compile from: Eg4.c to: Eg4-C.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg4-I.o: Eg4-I.c
|
||||
$(CC) -o Eg4-I.o Eg4-I.c
|
||||
{compile from: Eg4-I.c to: Eg4-I.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg4-I.c: Eg4.i7
|
||||
$(INFORM) -basic -format=C/no-main -o Eg4-I.c Eg4.i7
|
||||
|
@ -36,3 +36,4 @@ clean:
|
|||
rm -f Eg4
|
||||
rm -f actual_output.txt
|
||||
rm -f build_log.txt
|
||||
rm -f inweb_output.txt
|
|
@ -1,11 +1,11 @@
|
|||
# This is a "makescript" used by Inweb to construct a version of the makefile
|
||||
# for this using-Inform-with-C example which is likely to work on your platform.
|
||||
|
||||
{platform-settings}
|
||||
|
||||
# Where inform7 is installed, relative to this directory
|
||||
|
||||
INST = ../../..
|
||||
|
||||
# Abbreviations for running C compiler, linker, and inform7 tools
|
||||
|
||||
CC = clang -g -std=c99 -c -I $(INST)/Internal/Miscellany
|
||||
LINK = clang -g
|
||||
INFORM = $(INST)/Tangled/inform7 -silence
|
||||
|
||||
# There is one build target: an executable.
|
||||
|
@ -14,13 +14,13 @@ INFORM = $(INST)/Tangled/inform7 -silence
|
|||
all: Eg5
|
||||
|
||||
Eg5: Eg5-C.o Eg5-I.o
|
||||
$(LINK) -o Eg5 Eg5-C.o Eg5-I.o
|
||||
{link from: Eg5-C.o Eg5-I.o to: Eg5$(EXEEXTENSION)}
|
||||
|
||||
Eg5-C.o: Eg5.c
|
||||
$(CC) -o Eg5-C.o Eg5.c
|
||||
{compile from: Eg5.c to: Eg5-C.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg5-I.o: Eg5-I.c
|
||||
$(CC) -o Eg5-I.o Eg5-I.c
|
||||
{compile from: Eg5-I.c to: Eg5-I.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg5-I.c: Eg5.i7
|
||||
$(INFORM) -format=C/no-main -o Eg5-I.c Eg5.i7
|
||||
|
@ -36,3 +36,4 @@ clean:
|
|||
rm -f Eg5
|
||||
rm -f actual_output.txt
|
||||
rm -f build_log.txt
|
||||
rm -f inweb_output.txt
|
|
@ -1,11 +1,11 @@
|
|||
# This is a "makescript" used by Inweb to construct a version of the makefile
|
||||
# for this using-Inform-with-C example which is likely to work on your platform.
|
||||
|
||||
{platform-settings}
|
||||
|
||||
# Where inform7 is installed, relative to this directory
|
||||
|
||||
INST = ../../..
|
||||
|
||||
# Abbreviations for running C compiler, linker, and inform7 tools
|
||||
|
||||
CC = clang -g -std=c99 -c -I $(INST)/Internal/Miscellany
|
||||
LINK = clang -g
|
||||
INFORM = $(INST)/Tangled/inform7 -silence
|
||||
|
||||
# There is one build target: an executable.
|
||||
|
@ -14,13 +14,13 @@ INFORM = $(INST)/Tangled/inform7 -silence
|
|||
all: Eg6
|
||||
|
||||
Eg6: Eg6-C.o Eg6-I.o
|
||||
$(LINK) -o Eg6 Eg6-C.o Eg6-I.o
|
||||
{link from: Eg6-C.o Eg6-I.o to: Eg6$(EXEEXTENSION)}
|
||||
|
||||
Eg6-C.o: Eg6.c Eg6-I.c
|
||||
$(CC) -o Eg6-C.o Eg6.c
|
||||
{compile from: Eg6.c to: Eg6-C.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg6-I.o: Eg6-I.c
|
||||
$(CC) -o Eg6-I.o Eg6-I.c
|
||||
{compile from: Eg6-I.c to: Eg6-I.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg6-I.c: Eg6.i7
|
||||
$(INFORM) -format=C/no-main/symbols-header -o Eg6-I.c Eg6.i7
|
||||
|
@ -37,3 +37,4 @@ clean:
|
|||
rm -f inform7_symbols.h
|
||||
rm -f actual_output.txt
|
||||
rm -f build_log.txt
|
||||
rm -f inweb_output.txt
|
|
@ -1,11 +1,11 @@
|
|||
# This is a "makescript" used by Inweb to construct a version of the makefile
|
||||
# for this using-Inform-with-C example which is likely to work on your platform.
|
||||
|
||||
{platform-settings}
|
||||
|
||||
# Where inform7 is installed, relative to this directory
|
||||
|
||||
INST = ../../..
|
||||
|
||||
# Abbreviations for running C compiler, linker, and inform7 tools
|
||||
|
||||
CC = clang -g -std=c99 -c -I $(INST)/Internal/Miscellany
|
||||
LINK = clang -g
|
||||
INFORM = $(INST)/Tangled/inform7 -silence
|
||||
|
||||
# There is one build target: an executable.
|
||||
|
@ -14,13 +14,13 @@ INFORM = $(INST)/Tangled/inform7 -silence
|
|||
all: Eg7
|
||||
|
||||
Eg7: Eg7-C.o Eg7-I.o
|
||||
$(LINK) -o Eg7 Eg7-C.o Eg7-I.o
|
||||
{link from: Eg7-C.o Eg7-I.o to: Eg7$(EXEEXTENSION)}
|
||||
|
||||
Eg7-C.o: Eg7.c Eg7-I.c
|
||||
$(CC) -o Eg7-C.o Eg7.c
|
||||
{compile from: Eg7.c to: Eg7-C.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg7-I.o: Eg7-I.c
|
||||
$(CC) -o Eg7-I.o Eg7-I.c
|
||||
{compile from: Eg7-I.c to: Eg7-I.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg7-I.c: Eg7.i7
|
||||
$(INFORM) -format=C/no-main/symbols-header -o Eg7-I.c Eg7.i7
|
||||
|
@ -37,3 +37,4 @@ clean:
|
|||
rm -f inform7_symbols.h
|
||||
rm -f actual_output.txt
|
||||
rm -f build_log.txt
|
||||
rm -f inweb_output.txt
|
|
@ -1,11 +1,11 @@
|
|||
# This is a "makescript" used by Inweb to construct a version of the makefile
|
||||
# for this using-Inform-with-C example which is likely to work on your platform.
|
||||
|
||||
{platform-settings}
|
||||
|
||||
# Where inform7 is installed, relative to this directory
|
||||
|
||||
INST = ../../..
|
||||
|
||||
# Abbreviations for running C compiler, linker, and inform7 tools
|
||||
|
||||
CC = clang -g -std=c99 -c -I $(INST)/Internal/Miscellany
|
||||
LINK = clang -g
|
||||
INFORM = $(INST)/Tangled/inform7 -silence
|
||||
|
||||
# There is one build target: an executable.
|
||||
|
@ -14,13 +14,13 @@ INFORM = $(INST)/Tangled/inform7 -silence
|
|||
all: Eg8
|
||||
|
||||
Eg8: Eg8-C.o Eg8-I.o
|
||||
$(LINK) -o Eg8 Eg8-C.o Eg8-I.o
|
||||
{link from: Eg8-C.o Eg8-I.o to: Eg8$(EXEEXTENSION)}
|
||||
|
||||
Eg8-C.o: Eg8.c Eg8-I.c
|
||||
$(CC) -o Eg8-C.o Eg8.c
|
||||
{compile from: Eg8.c to: Eg8-C.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg8-I.o: Eg8-I.c
|
||||
$(CC) -o Eg8-I.o Eg8-I.c
|
||||
{compile from: Eg8-I.c to: Eg8-I.o options: -I $(INST)/Internal/Miscellany}
|
||||
|
||||
Eg8-I.c: Eg8.i7
|
||||
$(INFORM) -basic -format=C/no-main/symbols-header -o Eg8-I.c Eg8.i7
|
||||
|
@ -37,3 +37,4 @@ clean:
|
|||
rm -f inform7_symbols.h
|
||||
rm -f build_log.txt
|
||||
rm -f actual_output.txt
|
||||
rm -f inweb_output.txt
|
|
@ -524,14 +524,19 @@
|
|||
|
||||
-recipe [Make]
|
||||
set: $MAKERSPACE = $PATH/$CASE
|
||||
set: $INWEB = ../inweb/Tangled/inweb
|
||||
|
||||
set: $LOG = $MAKERSPACE/build_log.txt
|
||||
set: $RLOG = $MAKERSPACE/actual_output.txt
|
||||
set: $ILOG = $MAKERSPACE/ideal_output.txt
|
||||
set: $INWEBOUTPUT = $MAKERSPACE/inweb_output.txt
|
||||
|
||||
step: $INWEB -prototype $MAKERSPACE/$CASE.mkscript -makefile $MAKERSPACE/makefile >$INWEBOUTPUT
|
||||
or: 'failed to construct a makefile using inweb'
|
||||
|
||||
step: make -C $MAKERSPACE -s clean
|
||||
or: 'failed to clean example make'
|
||||
|
||||
set: $LOG = $MAKERSPACE/build_log.txt
|
||||
set: $RLOG = $MAKERSPACE/actual_output.txt
|
||||
set: $ILOG = $MAKERSPACE/ideal_output.txt
|
||||
|
||||
step: make -C $MAKERSPACE >$LOG 2>&1
|
||||
or: 'failed to build example make' $LOG
|
||||
step: make -C $MAKERSPACE `$$MAKEFLAGS run >$RLOG 2>&1
|
||||
|
|
|
@ -43,6 +43,7 @@ Tests/Test Externals/_Build/
|
|||
Tests/Test Externals/_Executables/
|
||||
Tests/Test Externals/_Textual/
|
||||
Tests/Test Makes/Eg?-C/Eg?
|
||||
Tests/Test Makes/Eg?-C/makefile
|
||||
Tests/Test Makes/Eg?-C/Eg?-I.[co]
|
||||
Tests/Test Makes/Eg?-C/Eg?-C.o
|
||||
Tests/Test Makes/Eg?-C/actual_output.txt
|
||||
|
|
Loading…
Reference in a new issue