Page 1 of 1

make is not recognised

Posted: 02 Mar 2017 02:58
by Erato
Around October last year, I last used the make command using the exact setup that I have now. It worked back then, but now, I get this message instead:

Code: Select all

'make' is not recognized as an internal or external command,
operable program or batch file.
I tried reinstalling nml, I tried reinstalling Makefile. I tried using commands like "Makefile" instead of "make", but alas, 'twas not to be.

What could be the cause of this?

Re: make is not recognised

Posted: 02 Mar 2017 06:43
by planetmaker
you need to install make

Re: make is not recognised

Posted: 02 Mar 2017 07:11
by Supercheese
Makefiles are black magick and wizardry anyway. :twisted:

Re: make is not recognised

Posted: 02 Mar 2017 18:29
by Erato
planetmaker wrote:you need to install make
Could you elaborate on this answer?
As far as I' concerned, I have make installed.

Re: make is not recognised

Posted: 02 Mar 2017 19:23
by Alberth
Well, your first post suggests your installed 'make' is not found then. Does the directory with the make executable appear in the PATH environment variable?

Re: make is not recognised

Posted: 02 Mar 2017 20:07
by Transportman
Erato wrote:Around October last year, I last used the make command using the exact setup that I have now. It worked back then, but now, I get this message instead:

Code: Select all

'make' is not recognized as an internal or external command,
operable program or batch file.
I tried reinstalling nml, I tried reinstalling Makefile. I tried using commands like "Makefile" instead of "make", but alas, 'twas not to be.

What could be the cause of this?
Could you describe your setup? It sounds like you are using Windows, while make is a Linux-program, which means you either should have something like Cygwin or MinGW/MSYS to have the make program available, or use the Windows Subsystem for Linux on Windows 10 (but then you would be running an actual Bash-shell).

Re: make is not recognised

Posted: 02 Mar 2017 22:11
by Erato
Transportman wrote:Could you describe your setup? It sounds like you are using Windows, while make is a Linux-program, which means you either should have something like Cygwin or MinGW/MSYS to have the make program available, or use the Windows Subsystem for Linux on Windows 10 (but then you would be running an actual Bash-shell).
I am using Windows 10, Python 2.7.11. As far as I know, I do not have Cygwin, MinGW or MSYS. I am using cmd to run make and to compile the resulting nml file.
This exact setup has been used a few months prior to successfully call the make command.

Re: make is not recognised

Posted: 03 Mar 2017 03:35
by wallyweb
Erato wrote:This exact setup has been used a few months prior to successfully call the make command.
This suggests that the issue lies not in Erato's set up but rather lies in the code he wants to compile.

Re: make is not recognised

Posted: 03 Mar 2017 15:25
by Erato
wallyweb wrote:
Erato wrote:This exact setup has been used a few months prior to successfully call the make command.
This suggests that the issue lies not in Erato's set up but rather lies in the code he wants to compile.
In that case: by all means, please check for any flaws in my code that would cause make to be not recognised.
https://www.dropbox.com/s/yutfnpenjqeun ... e.rar?dl=0

Re: make is not recognised

Posted: 03 Mar 2017 18:36
by Transportman
Erato wrote:
Transportman wrote:Could you describe your setup? It sounds like you are using Windows, while make is a Linux-program, which means you either should have something like Cygwin or MinGW/MSYS to have the make program available, or use the Windows Subsystem for Linux on Windows 10 (but then you would be running an actual Bash-shell).
I am using Windows 10, Python 2.7.11. As far as I know, I do not have Cygwin, MinGW or MSYS. I am using cmd to run make and to compile the resulting nml file.
This exact setup has been used a few months prior to successfully call the make command.
make is not a standard Windows command, so if it was working before, you have had to set that up yourself. Did you follow a guide back then?
wallyweb wrote:
Erato wrote:This exact setup has been used a few months prior to successfully call the make command.
This suggests that the issue lies not in Erato's set up but rather lies in the code he wants to compile.
It is in the set up, as not recognizing a command is not a code issue, but the system not being able to find the program it should execute to compile that code.

Re: make is not recognised

Posted: 03 Mar 2017 19:56
by Erato
Transportman wrote:
Erato wrote:
Transportman wrote:Could you describe your setup? It sounds like you are using Windows, while make is a Linux-program, which means you either should have something like Cygwin or MinGW/MSYS to have the make program available, or use the Windows Subsystem for Linux on Windows 10 (but then you would be running an actual Bash-shell).
I am using Windows 10, Python 2.7.11. As far as I know, I do not have Cygwin, MinGW or MSYS. I am using cmd to run make and to compile the resulting nml file.
This exact setup has been used a few months prior to successfully call the make command.
make is not a standard Windows command, so if it was working before, you have had to set that up yourself. Did you follow a guide back then?
I did follow a guide. IIRC. It's the whole reason I have Python after all.
A quick search gives me a guide that looks oddly familiar to me: http://dev.openttdcoop.org/projects/hom ... nvironment
This guide does not cover installing MakeFile. For makefile, I just downloaded the files and put it in my nml folder, as is seen here: http://dev.openttdcoop.org/projects/make-nml/repository and I used this: http://dev.openttdcoop.org/projects/hom ... a_Makefile .

I would like to stress the fact that compiling nml does work perfectly. (last checked 2 minutes ago, as I wasn't sure)
Transportman wrote:
wallyweb wrote:
Erato wrote:This exact setup has been used a few months prior to successfully call the make command.

This suggests that the issue lies not in Erato's set up but rather lies in the code he wants to compile.
It is in the set up, as not recognizing a command is not a code issue, but the system not being able to find the program it should execute to compile that code.
That's what I thought as well.

Re: make is not recognised

Posted: 03 Mar 2017 20:48
by Transportman
Compiling NML and using make is not the same. Make does several things depending on the makefile used, and compiling your NML is one of those things, and generating the .nml file from .pnml files can also be a step in it (and that generated file is then compiled into a GRF).

But if you did follow the guide you linked to, you should also have MinGW and MSYS (which provide the make command to Windows). But I would suggest, since you are using Windows 10 (and I assume it is up to date and 64bits), to follow this guide to set up a new environment. I have got much faster compile times with it.

Re: make is not recognised

Posted: 19 Mar 2017 16:19
by Erato
Transportman wrote:Compiling NML and using make is not the same. Make does several things depending on the makefile used, and compiling your NML is one of those things, and generating the .nml file from .pnml files can also be a step in it (and that generated file is then compiled into a GRF).

But if you did follow the guide you linked to, you should also have MinGW and MSYS (which provide the make command to Windows). But I would suggest, since you are using Windows 10 (and I assume it is up to date and 64bits), to follow this guide to set up a new environment. I have got much faster compile times with it.
Thanks a lot! This finally works. Well... make now works like a charm. Nml broke tho :\
NML no longer recognises things such as "cargo_allow_refit" and "default_cargo-type", "effect_spawn_model_and_powered" and "length" for any of my trains.

Re: make is not recognised

Posted: 19 Mar 2017 18:33
by Transportman
Which version of NML do you have? It sounds like you got an ancient version like 0.2.x. You can check with nmlc --version.

Re: make is not recognised

Posted: 19 Mar 2017 22:45
by Erato
Transportman wrote:Which version of NML do you have? It sounds like you got an ancient version like 0.2.x. You can check with nmlc --version.
You're right; it's 0.2.4. I thought I had used version 0.4.4

Reinstalling nml will reinstall 0.2.4 again. How would I go about installing 0.4.4?

Re: make is not recognised

Posted: 20 Mar 2017 17:56
by Transportman
Erato wrote:
Transportman wrote:Which version of NML do you have? It sounds like you got an ancient version like 0.2.x. You can check with nmlc --version.
You're right; it's 0.2.4. I thought I had used version 0.4.4

Reinstalling nml will reinstall 0.2.4 again. How would I go about installing 0.4.4?
That depends on your system. If you are on pure Windows, it would simply be extracting the latest version from the DevZone, if you are running Linux (or the Linux commandline inside Windows), you will need to install it using python and the setup.py file that is in the download.

Re: make is not recognised

Posted: 20 Mar 2017 19:24
by Erato
Transportman wrote:
Erato wrote:
Transportman wrote:Which version of NML do you have? It sounds like you got an ancient version like 0.2.x. You can check with nmlc --version.
You're right; it's 0.2.4. I thought I had used version 0.4.4

Reinstalling nml will reinstall 0.2.4 again. How would I go about installing 0.4.4?
That depends on your system. If you are on pure Windows, it would simply be extracting the latest version from the DevZone, if you are running Linux (or the Linux commandline inside Windows), you will need to install it using python and the setup.py file that is in the download.
Achso. I got it fixed. I don't know what changed. 12th time's the charm, I guess.

Thanks for your help. I finally got it fixed.