[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
error messages from including files
From: |
Arthur Davis |
Subject: |
error messages from including files |
Date: |
Tue, 08 Apr 2003 16:07:39 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 |
A snippet from a posting to the help-make list on 25 Oct 2002 by Paul
D. Smith:
$ cat Makefile
%.mk : %.mk.in ; cp $< $@
include one.mk
all:;@echo $(FOO)
$ cat one.mk.in
FOO = one
include two.mk
$ cat two.mk.in
FOO = two
$ make
Makefile:2: one.mk: No such file or directory
cp one.mk.in one.mk
one.mk:2: two.mk: No such file or directory
cp two.mk.in two.mk
two
$ make
two
Can the two error messages that make prints stating that it can't find
the included make files be supressed? Could the include be surrounded
with a conditional of some sort that would check and build the included
files when needed? I unsuccessfully tried different variations of the
following:
ifeq ($(shell test -f one.mk || echo no),)
include one.mk
else
<different things here - none worked>
endif
I've also tried to come up with a rule that would solve this, but
haven't had any success. Any suggestions? Am I close? Can it be dome?
- error messages from including files,
Arthur Davis <=