Inweb Makefile Question - Error on Making a C Program

Greetings all. I’m shifting gears a little and looking at the wider ecosystem for Inform 7. I’ve been looking at Inweb first. I can get all the tangling and weaving to work with the examles, like The Goldbach Conjecture. However, I find the makefile that gets generated does not seem to work.

Specifically here’s what I get:

There is a The Goldbach Conjecture.c file in the Tangled directory. I’m not sure what else to really check for here. I’m also not entirely clear why we’re making a goldback.c since we seem to already have a C program (The Goldback Conjecture.c).

I should also note the Inweb documentation itself seems wrong. It suggests using this command:

inweb/Examples/goldbach -makefile 

But if you do that, you get an error.

inweb: fatal error: no argument X for -makefile X

You to specify the name of the makefile you want to generate. So I’m not sure if I’m running into something else here that the documentation is perhaps leading me astray on in terms of how to generate a working makefile.

1 Like

I think the problem is the mismatch between the directory name goldbach and the web’s title The Goldbach Conjecture.

I suspect this isn’t the correct solution, but if you change the first line of goldbach/Contents.w to Title: goldbach, then the -tangle command will output a file goldbach.c instead of The Goldbach Conjecture.c and subsequently the generated makefile works:

inweb inweb/Examples/goldbach -import-from modules -tangle
web "goldbach": 2 sections : 8 paragraphs : 119 lines
  tangling <inweb/Examples/goldbach/Tangled/goldbach.c> (written in C)
clang [...] -o inweb/Examples/goldbach/Tangled/goldbach.o inweb/Examples/goldbach/Tangled/goldbach.c
clang [...] -o inweb/Examples/goldbach/Tangled/goldbach inweb/Examples/goldbach/Tangled/goldbach.o
1 Like