• Re: Obscure (?) Makefile syntax

    From Robert Riebisch@21:1/5 to Robert Riebisch on Sun Mar 13 20:10:05 2022
    Robert Riebisch wrote:

    In a Makefile I found this line:
    copy /B $(DJGPP:\DJGPP.ENV=)\bin\pmodstub.exe+a foo.exe

    This fails with 'Path not found' on my Windows XP system, because it
    resolves to:
    copy /B c:\djgpp\djgpp.env\bin\pmodstub.exe+a foo.exe

    That 'djgpp.env\' is the culprit.

    I mean, it's clear, what this line is intended to do, but I've never
    seen this line before.

    Why does it not work on my system?
    How to make it work? Do I need the change some setting on my system?
    (Yes, I already know how to work around, but I'm curious.)

    C. Masloch ("ecm") pointed me to <https://www.gnu.org/software/make/manual/html_node/Substitution-Refs.html#Substitution-Refs>.

    Of course, this works case-sensitive.

    When I call 'make DJGPP=C:\DJGPP\DJGPP.ENV' it works fine. :-)

    --
    Robert Riebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Riebisch@21:1/5 to Robert Riebisch on Sun Mar 13 19:29:36 2022
    Robert Riebisch wrote:

    In a Makefile I found this line:
    copy /B $(DJGPP:\DJGPP.ENV=)\bin\pmodstub.exe+a foo.exe

    This fails with 'Path not found' on my Windows XP system, because it
    resolves to:
    copy /B c:\djgpp\djgpp.env\bin\pmodstub.exe+a foo.exe

    That 'djgpp.env\' is the culprit.

    I forgot: My system has DJGPP=c:\DJGPP\djgpp.env

    --
    Robert Riebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Riebisch@21:1/5 to All on Sun Mar 13 19:27:10 2022
    Hi all,

    let's go a "few" years back in time... into 2002. *g*

    In a Makefile I found this line:
    copy /B $(DJGPP:\DJGPP.ENV=)\bin\pmodstub.exe+a foo.exe

    This fails with 'Path not found' on my Windows XP system, because it
    resolves to:
    copy /B c:\djgpp\djgpp.env\bin\pmodstub.exe+a foo.exe

    That 'djgpp.env\' is the culprit.

    I mean, it's clear, what this line is intended to do, but I've never
    seen this line before.

    Why does it not work on my system?
    How to make it work? Do I need the change some setting on my system?
    (Yes, I already know how to work around, but I'm curious.)

    --
    Robert Riebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)