URL: <http://savannah.gnu.org/bugs/?45438>
Summary: -include file prerequisites not found, give no error Project: make Submitted by: ultrajoe Submitted on: Mon 29 Jun 2015 06:15:42 PM GMT Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.81 Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Details: Consider the following makefile: # Remove ALL default rules .SUFFIXES: (%): % %.out: % %.c: %.w %.ch %.tex: %.w %.ch %:: %.v %:: RCS/%,v %:: RCS/% %:: s.% %:: SCCS/s.% SOURCES = a.c b.c OBJS = $(SOURCES:%.c=%.o) DEPFILES = $(SOURCES:%.c=%.c.d) EXE = a .PHONY: all all: $(EXE) $(DEPFILES): %.c.d : %.c @echo "Determining dependencies for $(<F)" @$(CC) -E -MM -MF$@ -MP $< $(OBJS): %.o: %.c @echo "Compiling $(<F)" @$(CC) -c $< -o $@ $(EXE): $(OBJS) @echo "Linking $(@F)" @$(CC) $+ -o $@ # This seems to be the troublemaking line! -include $(DEPFILES) If one or both source files do not exist, processing for the -include directive notices this, but generates no error, I suppose because of the -include. By the time it gets to the other targets, however, the already-processed files are "Pruned." The end result is no generated error message, but make exits with a status of 2. (Sorry, I'd love to give the output of a make -d on this, but my Linux machine is on an isolated secured network. For similar reasons I am unable to see if this has been fixed in later versions, though perusing the bug list tells me it has not.) _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?45438> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make