bugmake - Bugs: bug #112, Rules cannot cope with colons in...

 
 

bug #112: Rules cannot cope with colons in directory names

Submitted by:  Paul D. Smith <psmith>
Submitted on:  Sat 20 Apr 2002 09:08:39 PM UTC  
 
Severity: 1 - WishItem Group: Enhancement
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 3.79.1Operating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 11 Feb 2014 03:48:13 PM UTC, comment #5:

Ok, so with my hack this doesn't work:

something: a\\\:b

Thinks I want to make a\\:b

This doesn't work:

something: a\\:b

core dump

John Hughes <johnhughes>
Tue 11 Feb 2014 01:18:03 PM UTC, comment #4:

An absolutely trivial way to "fix" this bug is to change:

#ifdef VMS
/* VMS filenames can have a ':' in them but they have to be '\'ed but we need

  • to remove this '\' before we can use the filename.
  • Savestring called because q may be read-only string constant.

*/

to:

#if 1

in the parse_files_seq routine in read.c

(doesn't quite do it right as it mishandles "\\").

John Hughes <johnhughes>
Wed 07 May 2003 10:00:44 AM UTC, comment #3:

I re-tested two different builds of GNU Make 3.79.1 and
found that the one in the stock MinGW distro turns out
to be very subtly broken. The one distributed with
MSYS runs cleanly through the problematic section of a
configure script that MinGW chokes on.

The short version of what's happening:
> eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
> sh: unexpected EOF while looking for matching `"'
> sh: syntax error: unexpected end of file
and
> eval `${MAKE-make} -f conftestmake`
> sh: unexpected EOF while looking for matching `"'
> sh: syntax error: unexpected end of file

MinGW's make chokes when it hits this line in conftestmake:

> @echo 'ac_maketemp="${MAKE}"'

Somehow the sequence =" is not being parsed properly.

Note the original command with no space, here:

> $ cat conftestmake.SAV
> all:
> @echo 'ac_maketemp="${MAKE}"'
>
> $ ${MAKE-make} -f conftestmake.SAV
> ac_maketemp=\c:/Dev-Cpp/bin/make.exe"
>
> $ ^^^^ it eats the quote

versus a tweaked command with a space, here:

> $ cat conftestmake.SAV
> all:
> @echo 'ac_maketemp= "${MAKE}"'
>
> $ ${MAKE-make} -f conftestmake.SAV
> ac_maketemp= "c:/Dev-Cpp/bin/make.exe"
>
> $

For reference:

*BAD* MINGW /mingw/bin/mingw32-make.exe:
$ /mingw/bin/mingw32-make.exe --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for mingw32 ...

*GOOD* MSYS 1.0.8 /bin/make.exe:
$ /bin/make.exe --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-msys ...

f97b4a805d7ec4c63ad829c822c4c42b */mingw/bin/mingw32-make.exe
74669d64322783e14b8b3b1ed697f855 */bin/make.exe

-rwxr-xr-x 124416 Sep 7 2002 /mingw/bin/mingw32-make.exe
-rwxr-xr-x 1125488 Dec 9 07:57 /bin/make.exe

Anonymous
Mon 06 Jan 2003 07:53:29 PM UTC, comment #2:

I have experienced a similar problem trying to build manpages for Perl modules. I would like to do something like

man/MCB\:\:NTWho.3pm : perlmod/MCB/NTWho.pm
pod2man $< $@

install-man-ntwho.pm : man/MCB\:\:NTWho.3pm
gzip -c $+ > $(mandir)/man3/MCB::NTWho.3pm.gz

Escaping the colons in the target appears to work correctly. Escaping the colons in the prerequisite does prevent 'make' treating this as a pattern rule, however I get the output
make: *** No rule to make target `man/MCB\:\:NTWho.3pm', needed by `install-man-ntwho.pm'. Stop.

Anonymous
Thu 16 May 2002 10:38:59 AM UTC, comment #1:

There is also a problem with space characters in directories or filenames:

foo=some dir/with spaces/foo.o

all: $(foo)
@run some command to make all

$(foo):
@run some command to make $(foo)

I would like to be able to quote the expansions of $(foo)
by using "$(foo)" or something similar. To be really
useful it would help if the text functions had the ability
to treat strings with embedded spaces as one word rather than automatically splitting them into words on space boundaries as they currently do.

--
-unavailable-

Anonymous
Sat 20 Apr 2002 09:08:39 PM UTC, original submission:

I am trying to work with a rule that uses a directory that has a colon in it. I've read through the make 3.79 docs (as posted at http://www.gnu.org), and I don't see that this is unacceptable behaviour. So, this is appears to be a bug (although maybe a documentation bug... <grin>).

This came up because I'm running an autobuilder for Debian, and it untars packages by their version number, which can include a colon.

Here is the simplified test case:

#!/bin/sh
mkdir 1\:1
touch 1\:1/test.txt
cat <<EOF >Makefile
all: 1:1/test.txt
EOF

then run 'make':

Makefile:1: *** target pattern contains no `%'. Stop.

Paul D. Smith <psmith>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by johnhughes (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup