help-make
[Top][All Lists]
Advanced

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

Not to stop make when encounter error


From: Peng Yu
Subject: Not to stop make when encounter error
Date: Wed, 7 Mar 2007 11:05:53 -0600

Hi,

I have the following Makefile. However, the "make" program will stop
if it encounters any error when compiling the .c file. I'm wondering
if it is possible to compile the next file without stopping even if it
encounters an error.

Thanks,
Peng

.PHONY: all clean
MAINS = $(wildcard *.c)
TARGETS = $(subst .c,.exe,$(MAINS))

all:    $(TARGETS)

$(TARGETS): %.exe : %.c
       gcc $< -o $@

clean:
       @$(RM) *.o *.exe




reply via email to

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