[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Query regarding make error [target pattern contains no `%']
From: |
Paul D. Smith |
Subject: |
RE: Query regarding make error [target pattern contains no `%'] |
Date: |
Sun, 18 Jan 2004 21:41:44 -0500 |
%% address@hidden writes:
j> Thank you for the info.
j> There are two errors I feel are unclear. could they be
j> clarified/improved if possible please. I have two examples :
These are both specific to the Windows port of GNU make.
j> makefile
j> ------------
j> CC = ee-g++
j> LD = ee-g++
j> OBJS = "z:/test.o"
j> TARGET = test.elf
j> all: $(TARGET)
j> $(TARGET): $(OBJS)
j> $(LD) $(OBJS) -o $@
j> %.cpp %.o:
j> $(CC) -c $< -o $*.o
j> ----------
j> Having quotes around this OBJ causes the following error:
j> makefile3:10: *** target pattern contains no `%'. Stop.
j> Does not indicate that the problem is actually the quotes. Removing the
j> quotes lets it proccess ok.
If you were running on a UNIX machine then you'd get this error
regardless of whether or not you had quotes.
When you don't have quotes, the Windows port of GNU make has special
code that recognizes drive letters and doesn't consider the ":" in a
drive letter to be a special character. The algorithm for testing for
drive letters does not understand quoted strings: it basically looks to
see if the first character is alphabetic and the second character is a
colon.
I don't have any great ideas as to the best way to resolve this: adding
a special additional line to the error message only if you're on a
Windows system doesn't seem like a good idea.
Maybe the algorithm for detecting drive letters on Windows should be
enhanced to allow for quoted filenames. Folks on this list will need to
make that determination.
j> If quotes are not suitable for OBJ, could a clearer error message be
j> displayed..?
As above, the quotes are not the problem, except insofar as they defeat
the Windows-specific algorithms for detecting drive letters in
pathnames.
--
-------------------------------------------------------------------------------
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