bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Colon in Directory causes make to fail


From: MduaneH
Subject: Re: Colon in Directory causes make to fail
Date: Thu, 26 Apr 2001 19:17:21 GMT

So far this is the best workaround that I've found.
Replace the ":" with "?".  This causes the problem of possibly an
unnecessary rebuild.
I'm still using the TEST2 arguement to actually build off of, since there is
only one file listed.

 TEST1 = dependency.txt
 TEST2 = ${PWD}/${TEST1}
 TEST3 = ${substr :,?,${TEST2}}
 TARGET = output.filea output.fileb

     #This was my original code which produces the following error:
 ifndef ATTEMPTED_FIX
 ${TARGET} : ${TEST2}
 else
     #The line using TEST3 was my proposed solution
     # escape out all of the : to \: (see TEST3 def above)
 ${TARGET} : ${TEST3}
 endif
         echo ${TARGET} depends on ${TEST2}




<address@hidden> wrote in message
news:address@hidden
> I'm working on AIX and Linux.
> I'm using 3.79.1 gmake
>
> My directory name has ":" in it, but I can't change it because this is
> an
> enhancement to
> an automated system(the automated part is someone else's work)
>
> Directory Structure:
>
> >ls -l Loadl.Apr_25_12:26:00.TEST
> total 4
> -rw-r--r--   1 mhale    staff        322 Apr 25 12:53 README
> -rw-r--r--   1 mhale    staff          0 Apr 25 12:48 dependency.txt
> -rw-r--r--   1 32766    staff        421 Apr 25 12:48 makefile
>
> I simplied touched the dependency.txt file for this example.
>
> First run:
> gmake
>         You'll get " *** target pattern contains no `%'"
>         gmake seems to think that the directory name with : is the
> directive(understandably so)
>
> I attempted a fix by escaping all of the :, so : becomes \:
>
> Now run:
> gmake ATTEMPTED_FIX=1
>         You'll get a message stating that the dependency file can not
> be found.
>
>
>
>
>
> my makefile is below:
> TEST1 = dependency.txt
> TEST2 = ${PWD}/${TEST1}
> TEST3 = ${shell echo ${TEST2} | sed "s/:/\\\\:/g"}
> TARGET = output.filea output.fileb
>
>     #This was my original code which produces the following error:
> ifndef ATTEMPTED_FIX
> ${TARGET} : ${TEST2}
> else
>     #The line using TEST3 was my proposed solution
>     # escape out all of the : to \: (see TEST3 def above)
> ${TARGET} : ${TEST3}
> endif
>         echo ${TARGET} depends on ${TEST2}
>
>
>
>
>
>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the
eb  -----
>   http://newsone.net/ -- Free reading and anonymous posting to 60,000+
groups
>    NewsOne.Net prohibits users from posting spam.  If this or other posts
> made through NewsOne.Net violate posting guidelines, email
address@hidden




reply via email to

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