Page 1 of 1

[NML] Only two railtypes showing up.

Posted: 07 Jun 2017 12:19
by Erato
I'm currently working on a track set for maglev trains, which will contain 5 railtypes. When I compile the code, however. At most 2 tracks will show up in the game. I can only get the other one to show up if I comment out one of the ones that did show up.
Am I missing something?

Source in the attachments.

Re: [NML] Only two railtypes showing up.

Posted: 07 Jun 2017 21:23
by Erato
Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.

Re: [NML] Only two railtypes showing up.

Posted: 09 Jun 2017 16:34
by Transportman
Erato wrote:Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.

Re: [NML] Only two railtypes showing up.

Posted: 09 Jun 2017 19:14
by Erato
Transportman wrote:
Erato wrote:Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.
I was told that the -B turns the .pnml file with all it's imports into one big .nml file, overwriting the .nml file that's already there.
This didn't happen when I had -b instead.

Re: [NML] Only two railtypes showing up.

Posted: 09 Jun 2017 21:40
by Transportman
Erato wrote:
Transportman wrote:
Erato wrote:Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.
I was told that the -B turns the .pnml file with all it's imports into one big .nml file, overwriting the .nml file that's already there.
This didn't happen when I had -b instead.
There is no need to use the -B flag to do that, make without any flags also recreates the .nml file from your .pnml-files, and creates a .grf for it.

Re: [NML] Only two railtypes showing up.

Posted: 09 Jun 2017 21:43
by Leanden
My makefile is just a .bat with the following command lines:

Code: Select all

gcc -C -E -nostdinc -x c-header -o BRTrains.nml BRTrains.pnml
nmlc BRTrains.nml 
PAUSE

Re: [NML] Only two railtypes showing up.

Posted: 09 Jun 2017 22:16
by Erato
Transportman wrote:
Erato wrote:
Transportman wrote: But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.
I was told that the -B turns the .pnml file with all it's imports into one big .nml file, overwriting the .nml file that's already there.
This didn't happen when I had -b instead.
There is no need to use the -B flag to do that, make without any flags also recreates the .nml file from your .pnml-files, and creates a .grf for it.
Thing is, if I do that, it doesn't overwrite the .nml file that's already there, and instead chooses to instead compile the .nml that's already there. Only if I remove the .nml file will it recreate a .nml file. Or at least, that's the case on my machine. And I know that for a fact because I went ahead and just tested it: a new NML file did not get made.

Re: [NML] Only two railtypes showing up.

Posted: 10 Jun 2017 17:09
by rowdog
Transportman wrote:
Erato wrote:Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.

Code: Select all

       -B, --always-make
            Unconditionally make all targets.
I would guess that the makefile isn't set up with proper dependencies to support an incremental build. Or maybe it's a "make on windows" thing.

Re: [NML] Only two railtypes showing up.

Posted: 10 Jun 2017 18:10
by Transportman
rowdog wrote:
Transportman wrote:
Erato wrote:Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.

Code: Select all

       -B, --always-make
            Unconditionally make all targets.
I would guess that the makefile isn't set up with proper dependencies to support an incremental build. Or maybe it's a "make on windows" thing.
I think it would then be in the makefile, as I never had to use the -B flag, not on Windows using MinGW or WSL