Mail Archives: cygwin/1997/07/01/19:47:14
Hello all,
I'm having a problem with the GNU make from b18...
My makefiles use gcc to build .d files and then include them into the
make. I also use pattern matching to build the object files.
Here's a cut from the makefiles:
%.o: %.c
$(GREPSTRING)
$(CC) $(CFLAGS) $(INC) -c $< -o $@
%.o: %.s
$(GREPSTRING)
$(CC) $(CFLAGS) $(INC) -c $< -o $@
%.o: %.cxx
$(CC) $(CFLAGS) $(INC) -c $< -o $@
%.d: %.cxx
(trap 'rm $@' 2; $(ECHO) "$@ " | tr -d '\012' > $@ ; \
$(DCC) $(CFLAGS) $(INC) -M -DDEPCHK $< >> $@ || rm $@ )
%.d: %.c
(trap 'rm $@' 2; $(ECHO) "$@ " | tr -d '\012' > $@ ; \
$(DCC) $(CFLAGS) $(INC) -M -DDEPCHK $< >> $@ || rm $@ )
include $(OBJS:.o=.d)
So my .d files end up looking something like this:
hdrgen.d hdrgen.o: hdrgen.c hdrgen.h (more random header files)
Now when I run make, it complains about the multiple header files (I
think)
hdrgen.d:1: *** multiple target patterns. Stop.
gmake: *** [apps] Error 2
gmake: *** [all] Error 2
gmake: *** [tools] Error 2
Compilation exited abnormally with code 2 at Tue Jul 01 16:09:06
I've manually edited my .d file to this
hdrgen.o: hdrgen.c
which works, but as soon as I add a header file dependency, it fails
hdrgen.o: hdrgen.c hdrgen.h
BTW, this all works fine with make v3.70 on UNIX
Anybody of any insights?
Thanks,
Yung Hsien
yung AT connectinc DOT com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -