help-make
[Top][All Lists]
Advanced

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

Re:


From: Kaz Kylheku (gmake)
Subject: Re:
Date: Tue, 16 Jun 2020 10:55:50 -0700
User-agent: Roundcube Webmail/0.9.2

On 2020-06-15 16:53, Budi wrote:
How can we have make's 'include' command in makefile not to precede
the first/default target in the actual processes?
I found it always processed the earliest, how to solve this?

E.g. in Vi type "dd" on the include line, move the cursor somewhere
below the first target/rule, then paste with "p". :)

include directives can appear anywhere in the Makefile (except, of course,
in the middle of syntax that would break due to their presence).

A rule can refer to variables that are defined later, possibly via
inclusion:

$ cat Makefile
.PHONY: foo
foo: $(OBJS)
        echo update $(OBJS)

OBJS = a b c   # this could come from an include!

$ make
echo update a b c
update a b c




reply via email to

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