rmyorston / pdpmake

Public domain POSIX make
https://frippery.org/make
Other
106 stars 11 forks source link

[QUESTION] Correct way to pass env vars? #58

Closed ale5000-git closed 1 month ago

ale5000-git commented 1 month ago

I have a problem: when using pdpmake the shell script correctly see the env var but when using GNU make the env var isn't set although it display the command correctly.

So is this way to set env vars not portable?

Example:

./Makefile

runscript:
    MY_CUSTOM_VAR=1 ./script.sh
rmyorston commented 1 month ago

Which GNU make are you using?

I can't reproduce this either. Both mingw32-make.exe from w64devkit and GNU make from MSYS2 print the value of the variable.

ale5000-git commented 1 month ago

It is:

GNU Make 4.3
Built for x86_64-pc-msys

It is the one bundled inside ruby for Windows: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]

rmyorston commented 1 month ago

Sorry, I don't think I can help with that.

ale5000-git commented 1 month ago

Thank you all the same. I will close it for now, I will write again in this ticket if I find a solution for this problem.

ale5000-git commented 1 month ago

I have found GNU Make 3.81 and it works, so the other was probably a broken one.