]> git.neil.brown.name Git - history.git/commit
kbuild: Add rules for compiling programs on the host
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Thu, 6 Jun 2002 07:53:03 +0000 (02:53 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Thu, 6 Jun 2002 07:53:03 +0000 (02:53 -0500)
commitf99e6d1e70ed0cc0fc0153156858ddb439d1c574
treed691a7abb8c999eb9e25d3ca15a1aaf26f1c4fc3
parentf56dec0252d197c3796f3f932eeea1f29a499505
kbuild: Add rules for compiling programs on the host

At a couple of places, we need to build programs which run on the
compile host during building the kernel.

Add a new variable "host-progs" to declare such programs. Rules.make will
automatically provide rules to compile these programs with appropriate
command lines etc.

Compared to having explicit rules spread around for doing so, this has
the following advantages:

o shorter
o automatically figures out dependencies and handles changing command
  lines
o Nicer output in quiet mode ;-)

Compiling host programs from multiple sources is also possible, analogous
to multi-part objects. E.g. scripts/Makefile has

host-progs := tkparse
tkparse-objs := tkparse.o tkcond.o tkgen.o
Rules.make
drivers/atm/Makefile
drivers/char/Makefile
drivers/net/hamradio/soundmodem/Makefile
drivers/pci/Makefile
drivers/video/Makefile
drivers/zorro/Makefile
net/khttpd/Makefile
scripts/Makefile
scripts/lxdialog/Makefile
sound/oss/Makefile