Closed mingodad closed 4 months ago
What made you think that tpc can emit C with line numbers? You asked it to emit C code (-q4 -A) not object code.
The original Makefile-C
have this TPCFLAGS = -O
and tpc -h
shows this -O : Do not emit run time line numbering and checking code.
.
The original
Makefile-C
have thisTPCFLAGS = -O
andtpc -h
shows this-O : Do not emit run time line numbering and checking code.
.
Doesn't apply to -q4 -A
.
So I can remove -q4 -A
and get line numbering ?
So I can remove
-q4 -A
and get line numbering ?
Just use make clean
followed by make
in the main directory instead of make csrc
to get the default run-time line numbering and checking of the compiled Turing+ source code. That's how we maintain and debug Turing+ and TXL.
The generated csrc
version, which you get from make csrc
is to generate optimized code for the C machine in order to have both good performance and portability at the same time. Nothing in the generated csrc
directory is for human consumption.
Thank you again for reply !
On my computer I need to replace pushd/popd
in Makefile
because by default it doesn't uses bash:
# Bootstrap
src/bootgrm.i : src/bootstrap/bootgrm.i
- pushd src/bootstrap; make; popd
+ cd src/bootstrap; make; cd ../..
cp src/bootstrap/bootgrm.i src/bootgrm.i
On my computer I need to replace
pushd/popd
inMakefile
because by default it doesn't uses bash:
Thanks! What is your platform? On all of the portability test platforms (MacOS Sonoma, Ubuntu Linux 20.04 LTS, Cygwin64/WIndows, Msys64/WIndows) the Makefile works fine.
Note to maintainer:
# Bootstrap
src/bootgrm.i : src/bootstrap/bootgrm.i
(cd src/bootstrap; make)
cp src/bootstrap/bootgrm.i src/bootgrm.i
While testing building
OpenTxl
I removed the-O
option to get line numbers in the generatedC
code but no line numbers info is emitted: