[Top][All Lists]

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

[bug #29074] -include target fails to issue Error in 3.81

From: dave kerns
Subject: [bug #29074] -include target fails to issue Error in 3.81
Date: Wed, 13 Feb 2013 16:30:05 +0000
User-agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5

Follow-up Comment #6, bug #29074 (project make):

I have a slight variation of this "bug"; when the included file (included with
the -include) runs into a rule problem, make silently stops and does nothing.
I argue it should give the same error that it does without the "-".

this make file will demonstrate the issue:

to test, do this:

$ make fix # restores all files
$ make # builds correctly
$ make break # remove .h file
$ make # demonstrates silent failure
$ make PRE381=1 # demonstrates desired failure message

<code save_as=Makefile>

all: app

app: x.o
        $(CC) -o $@ $<

%.d: %.c
        $(CC) -MM $< | sed -e 's,($*).o[ :]*,1.o $@ : ,g' > $@; test $$? != 0
&& $(RM) $@

        $(RM) x.o app

clobber: clean
        $(RM) x.?

break: clean
        $(RM) x.h

fix: clobber x.c
        touch x.h

        @echo making $@
        @printf "#include <stdio.h>n#include <stdlib.h>nn#include "x.h"nnint
main(int argc, char **argv)n{ntprintf("hello world\\n");n}" > x.c

ifneq ($(filter-out fix clean clobber,$(or $(MAKECMDGOALS),all)),)
ifeq ($(PRE381),1)
$(info using include)
include x.d
$(info using -include)
-include x.d



Reply to this item at:


  Message sent via/by Savannah

reply via email to

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