Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Obscure (?) Makefile syntax

9 views
Skip to first unread message

Robert Riebisch

unread,
Mar 13, 2022, 2:27:14 PM3/13/22
to
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

Robert Riebisch

unread,
Mar 13, 2022, 2:29:37 PM3/13/22
to
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

Robert Riebisch

unread,
Mar 13, 2022, 3:10:07 PM3/13/22
to
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
0 new messages