help-gnu-utils
[Top][All Lists]
Advanced

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

make: variable assignment after target?


From: Brian K. Michalk
Subject: make: variable assignment after target?
Date: 26 Aug 2004 15:19:46 -0700

I want to do something like this:

----------------
INCLUDEDIR = $(KERNELDIR)/include
all: module
module: dm5806_20040322.o dm5806_20040820.o
dm5806_20040322.o: dm5806.c
KERNELDIR := /usr/src/20040322
     gcc $(CFLAGS) -o dm5806_20040322.o dm5806.c

dm5806_20040820.o: dm5806.c
KERNELDIR := /usr/src/20040820
     gcc $(CFLAGS) -o dm5806_20040820.o dm5806.c
----------------

I want to have several kernel source trees, and compile modules
against the various trees, where INCLUDEDIR is deferred, and then
KERNELDIR is set after the target is known, however this is not
allowed.

I've tried canned sequences, but can't seem to get them to work. 
Ideas?


reply via email to

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