[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make cannot handle prerequisites that contain a colon
From: |
Markus Kuhn |
Subject: |
make cannot handle prerequisites that contain a colon |
Date: |
Sun, 17 Oct 2004 17:27:28 +0100 |
GNU Make 3.80 (as shipped with SuSE Linux 9.1)
BUG1:
The GNU make 3.80 manual lacks a section on quoting of special
characters that describes how any arbitrary byte sequence can be
provided as a prerequisite or a target in a rule. There are only brief
discussions on how to quote % and $, but not on how to quote other
bytes.
BUG2:
I tried to specify a target named 'a::b':
all: a::b
a\:\:b:
touch $@
This leads (presumably correctly) to the error
Makefile:1: *** target pattern contains no `%'. Stop.
So I have to escape the :: somehow. But how? I did not succeed in
getting past the syntactic restrictions of make. I tried both
all: a\:\:b
which let to
make: *** No rule to make target `a\:\:b', needed by `all'. Stop.
as well as
TARGET=a::b
all: $(TARGET)
which led again to
Makefile:2: *** target pattern contains no `%'. Stop.
Giving up ... Is there a way to specify an arbitrary sequence of 8-bit
bytes (other than those containing \0) as a target?
I'm apparently not alone with this problem:
http://lists.gnu.org/archive/html/help-make/2004-06/msg00138.html
Having :: as part of a target is a perfectly normal thing under Unix,
e.g. for man pages of Perl classes.
I believe that the ability to specify any arbitrary filename in a Make
file is so important that any esoteric backwards compatibility problems
that a solution to this problem might create would be quite justifyable.
Fundamental tools, including make, really need 100% filename
transparency using a simple and well-documented quoting mechanism.
The obvious suggestion would be to use either \ or $ as an escape
symbol, and to provide a command-line option for backwards
compatibility.
Markus
--
Markus Kuhn, Computer Laboratory, University of Cambridge
http://www.cl.cam.ac.uk/~mgk25/ || CB3 0FD, Great Britain
- make cannot handle prerequisites that contain a colon,
Markus Kuhn <=