help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: repost - target with a colon in the name


From: Asperheim, Eric
Subject: RE: repost - target with a colon in the name
Date: Mon, 28 Jun 2004 12:06:52 -0700

Paul, Anyone,

Any idea on colon in prereq name issue detailed below?

Thanks,

Eric

-----Original Message-----
From: Asperheim, Eric 
Sent: Tuesday, June 22, 2004 11:24 PM
To: Asperheim, Eric; 'Paul D. Smith'
Cc: 'address@hidden'
Subject: RE: repost - target with a colon in the name

Paul,

Now I'm having trouble with the : in the prereq name. Below are 3 test
Makefiles and gmake output that illustrate the issue. I've tried this
with both 3.79.1 and 3.80. It appears that the escaping works as
expected with in the target. But, the backslash is taken literally when
in the prereq. 

-----------------------------
# Good Makefile

b.mdb\:1 : 
        @ echo $@

a.mdb\:1 : a.vhdl
        @ echo $@
-----------------------------
filc2519:easperhe gmake
b.mdb:1


-----------------------------
# Bad Makefile #1

b.mdb\:1 : a.mdb\:1
        @ echo $@

a.mdb\:1 : a.vhdl
        @ echo $@
-----------------------------
filc2519:easperhe gmake
gmake: *** No rule to make target `a.mdb\:1', needed by `b.mdb:1'.
Stop.


-----------------------------
# Bad Makefile #2 (removed \ from prereq)

b.mdb\:1 : a.mdb:1
        @ echo $@

a.mdb\:1 : a.vhdl
        @ echo $@
-----------------------------
filc2519:easperhe gmake
Makefile:2: *** target pattern contains no `%'.  Stop.



Eric

-----Original Message-----
From: Asperheim, Eric 
Sent: Tuesday, June 22, 2004 10:53 PM
To: 'Paul D. Smith'
Cc: address@hidden
Subject: RE: repost - target with a colon in the name


Paul,

Thanks! I did try escaping before but didn't do it in all parts of
Makefile. Thus, it didn't appear to work. After escaping all : in the
Makefile, it worked. Glad it's that simple.

Eric

-----Original Message-----
From: Paul Smith [mailto:address@hidden On Behalf Of Paul D.
Smith
Sent: Tuesday, June 22, 2004 9:05 PM
To: Asperheim, Eric
Cc: address@hidden
Subject: Re: repost - target with a colon in the name


%% "Asperheim, Eric" <address@hidden> writes:

  ae> Is there anyway to have a gmake target with a colon in the name?
For
  ae> example:

  ae> a.mdb:1 : a.vhdl

  ae>         @ echo $@

  ae> I've tried this and gmake doesn't appear to like it. 

a.mdb\:1 : a.vhdl
        @echo $@

-- 
------------------------------------------------------------------------
-------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad
Scientist





reply via email to

[Prev in Thread] Current Thread [Next in Thread]