[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
strange results with include (probable user error)
From: |
Mike Castle |
Subject: |
strange results with include (probable user error) |
Date: |
Sun, 20 May 2001 14:23:38 -0700 |
User-agent: |
Mutt/1.3.18i |
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
I expected an include directive to behave exactly as if the contents of the
included file was inline in the Makefile. But I'm seeing a case where it's
not.
I'm wondering if I'm doing something wrong, having the wrong expectations,
or it's a bug.
As the following shows, when using an include, I get an extra "Nothing to
be done for `all'." At least, I wasn't expecting it.
It's almost like, after processing the include, and performing the action,
make reinvokes itself.
Oh. Just did a test, and if I put a dummy command in for all:
all: second-all
:
Then it works as expected.
Comments?
Thanks,
mrc
address@hidden:16pm]/usr/src/.sbuild(788) cat Makefile
all: second-all
include foo.mak
second-all: $(ALL)
address@hidden:17pm]/usr/src/.sbuild(789) cat foo.mak
ALL+=foo.mak
foo.mak: foo.src
touch foo.mak
address@hidden:18pm]/usr/src/.sbuild(790) touch foo.src
address@hidden:18pm]/usr/src/.sbuild(791) make
touch foo.mak
make: Nothing to be done for `all'.
address@hidden:19pm]/usr/src/.sbuild(795) cat Makefile.2
all: second-all
ALL+=foo.mak
foo.mak: foo.src
touch foo.mak
second-all: $(ALL)
address@hidden:19pm]/usr/src/.sbuild(796) !tou
touch foo.src
address@hidden:19pm]/usr/src/.sbuild(797) make -f Makefile.2
touch foo.mak
--
Mike Castle Life is like a clock: You can work constantly
address@hidden and be right all the time, or not work at all
www.netcom.com/~dalgoda/ and be right at least twice a day. -- mrc
We are all of us living in the shadow of Manhattan. -- Watchmen
- strange results with include (probable user error),
Mike Castle <=