[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [st-hackers] Re: makefile mysteries
- To: Tzafrir Cohen <tzafrir(at-nospam)technion.ac.il>
- Subject: Re: [st-hackers] Re: makefile mysteries
- From: mulix <mulix(at-nospam)actcom.co.il>
- Date: Sat, 8 Sep 2001 17:41:06 +0300 (IDT)
- Cc: st-hackers <syscalltrack-hackers(at-nospam)lists.sourceforge.net>, <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <Pine.GSO.4.33_heb2.09.0109081551520.16642-100000@techunix.technion.ac.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
On Sat, 8 Sep 2001, Tzafrir Cohen wrote:
> On Sat, 8 Sep 2001, mulix wrote:
>
> > we want to check if an environemnt variable is set, and if not, die.
> > simple, eh? not. if i do the obvious
> >
> > ifeq ($(strip $(KERNEL_DIR)),)
> > @echo bla bla
> > @exit 1
> > endif
> >
> > at the top of the Makefile, make complains loudly about "*** commands
> > commence before first target.Stop.". there must be some simple
> > solution to this (adding a phony target?), but i couldnt find it. for
> > now, i implemented an extra level of indirection, but it's pretty ugly.
> > help?
>
> Makefiles only execute commands within makefile commands (that are part of
> rules).
> In the make info file I see a reference to the function '$(error TEXT...)'
oh, this could be exactly what i need (couldn't find something like this
earlier). let's see... nope, cant find it. where exactly did you see it?
it's not under 'Functions' or in the index. i'm using the info pages
from make-3.77.
> maybe you should set here the default to some sane default (perhaps
> '/usr/src/linux')
no, i want to force the user to set the right kernel, since compiling
the module with the wrong kernel version will work but give subtle and
annoying errors later. maybe later we chould use /lib/modules/`uname
-r`/build as a sane default, but at least when using uml (user mode
linux) the running kernel is not the kernel you want to compile against.
--
mulix
http://www.advogato.com/person/mulix
http://www.sf.net/projects/syscalltrack
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il