[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make inconsistent

From: Paul D. Smith
Subject: Re: make inconsistent
Date: Tue, 29 Jun 2004 17:30:17 -0400

%% Sebastian Neuper <address@hidden> writes:

  sn> #I had some problems with this Makefile.
  sn> #make printed always the error:
  sn> #warning: overriding commands for target xxx
  sn> #warning: ignoring old commands for target xxx
  sn> #Circular xxx <- yyy dependency dropped.
  sn> #
  sn> #I asked my teachers and other students, but
  sn> #nobody found a mistake. 
  sn> #Then I changed the 
  sn> #SOURCE = $(PROJ).c to SOURCE = xxx.c
  sn> #and it worked. I undo this changed and it
  sn> #still worked. Now I have no idea, why.
  sn> #I cannot reproduce this 'bug' anymore.
  sn> #Can the same Makefile be treated differently?

This doesn't ring any bells for me as a known bug.

However, if in the version that failed you had accidentally had this

    SOURCE = $(PROJ)

Instead of what you have below (SOURCE = $(PROJ).c) then you would
very likely have gotten the errors you describe above.  Maybe it was a
typo that no one noticed?

  sn> PROJ = xxx
  sn> SOURCE = $(PROJ).c
  sn> OBJS = $(SOURCE:%.c=%.o)
  sn> HEADER = $(PROJ).h
  sn> CC = gcc
  sn> CFLAGS = -ansi -pedantic -D_XOPEN_SOURCE=500 -Wall -Werror -g

  sn> all: $(PROJ)
  sn> $(PROJ): $(OBJS)
  sn> $(OBJS): $(SOURCE)

 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]