From: <no...@so...> - 2002-08-05 16:42:07
|
Bugs item #491549, was opened at 2001-12-11 08:46 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=491549&group_id=2435 Category: binutils Group: None >Status: Closed >Resolution: Out of Date Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Earnie Boyd (earnie) Summary: make doesn't work Initial Comment: The Makefile in the attachment works well with Cygwin's make while MinGW shows the following error- message: MinGW_make: *** No rule to make target `make_test.a (make_test.o)', needed by `make_test.a'. Stop. both make.exe are GNU Make Version 3.79.1 MinGW_make_test.zip contains the following files: Makefile : Makefile that produces the error make_test.c : Simple Source processed by Makefile Cygwin_make.exe : Copy of Cygwin's make.exe MinGW_make.exe : Copy of MinGW's make.exe README.txt : This description Copy of the Makefile: # EXECUTABLE NAME(S) GIVEN BELOW EXEFILE = make_test # TARGETLIBRARY NAME GIVEN BELOW TARGETLIB= make_test.a # OBJECTS GIVEN BELOW OBJMAIN = make_test.o OBJS= $(TARGETLIB)($(OBJMAIN)) #------------------------------------------ $(EXEFILE): $(TARGETLIB) $(AR) -x $(TARGETLIB) $(OBJMAIN) $(CC) -o $@ $(OBJMAIN) $(TARGETLIB) $(RM) $(OBJMAIN) $(TARGETLIB): $(OBJS) @echo library $(TARGETLIB) is now up-to-date ---------------------------------------------------------------------- Comment By: Luke Dunstan (infidel) Date: 2002-05-23 22:31 Message: Logged In: YES user_id=30442 Ah... Ignore me then :) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-05-23 09:30 Message: Logged In: NO Answer to infidel: You should have a sourcefile named 'make_test.c' in your folder to get the behavior I described. make_test.a(make_test.o) doesn't have a special meaning besides of that documented in the make.html#Archives section. ---------------------------------------------------------------------- Comment By: Luke Dunstan (infidel) Date: 2002-05-22 10:09 Message: Logged In: YES user_id=30442 Why is this a bug? Is make_test.a(make_test.o) supposed to have some special meaning? I get the same error with Mingw, MSYS and Cygwin make: make: *** No rule to make target `make_test.a(make_test.o)', needed by `make_test.a'. Stop. ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2001-12-12 17:52 Message: Logged In: YES user_id=11494 I have an updated make-3.79 which incorporates some of the recent Cygwin patches. It fixes this specific bug. It also has better detection of OS, so can make allowances for command.com vs cmd.exe if /bin/sh.exe not found. Would you care to help test before I make a beta release. If so, please send me your email address (privately) and I will post binary. Danny Smith ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-12-12 16:21 Message: Logged In: NO > The "circular dependency" warning in your comment comes > from an extra blank at the END of the line: > TARGETLIB= make_test.a Good catch! Okay, I'll look at the problem when I have some time. Thanks for simplifying it to a nice simple testcase. Danny ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-12-12 07:36 Message: Logged In: NO I reduced the problem to a makefile containing the single line: make_test.a: make_test.a(make_test.o) This produces the "no rule to make target" error-message show in my initial report. ------------ The "circular dependency" warning in your comment comes from an extra blank at the END of the line: TARGETLIB= make_test.a In the Makefile this translates to: make_test.a: make_test.a (make_test.o) or with your proposal to: make_test.a: make_test.a make_test.o The later works identical on both mingw and cygwin but donesn't produce the library. Only make_test.o is build. ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2001-12-11 16:06 Message: Logged In: YES user_id=11494 with your example, I get make: Circular make_test.a <- make_test.a dependency dropped. make: *** No rule to make target `(make_test.o', needed by `make_test.a'. Stop. with both cygwin amd mingw builds of make. If i change OBJS= $(TARGETLIB)($(OBJMAIN)) to OBJS= $(TARGETLIB)$(OBJMAIN) I get succesful make on both, with the warning about circular dependency. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=491549&group_id=2435 |