Date: Fri, 01 Jan 1999 20:05:46 +0800 From: Peter Wemm <peter@netplex.com.au> To: Bruce Evans <bde@zeta.org.au> Cc: luigi@labinfo.iet.unipi.it, mike@smith.net.au, current@FreeBSD.ORG Subject: Re: -DKERNEL option when compiling kernels ? Message-ID: <199901011205.UAA96067@spinner.netplex.com.au> In-Reply-To: Your message of "Fri, 01 Jan 1999 22:15:09 %2B1100." <199901011115.WAA22595@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote:
> >well it is just a very minor thing, anyways. Now if there was a
> >way to put all compile options somewhere so that the make output
> >does not show three lines for each file...
> >
> >cc -c -O -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit -Wnested-exter
ns
> >-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline
> >-Wuninitialized -Wformat -Wunused -fformat-extensions -ansi -nostdinc -I-
> >-I. -I../.. -I../../../include -DKERNEL -include opt_global.h -aout vers.
c
>
> If you can solve that, then -DKERNEL is worth hiding too.
>
> I have a few options in /etc/make.conf that give another 2 lines of
> output.
Hmm.. As well as everything depending on opt_global.h, how about having
it depend on something like ./compile, and build it along the lines of:
./compile: mumble
echo "#! /bin/sh" > compile.new
echo "exec ${CC} -c ${CFLAGS} ${PROF} $$*" >> compile.new
chmod a+x compile.new
move-if-change compile.new compile
./assemble: mumble
...
And then:
NORMAL_C= ./compile $<
..
NORMAL_S= ./assemble $<
etc.
The trick would be to keep ./compile and ./assemble up to date. Doing a
cmp and change or something might be enough since it would be evaluated at
each startup..
Then, the average compile output lines would look like this:
....
./compile kern_exec.c
./compile kern_fork.c
....
./assemble support.s
Of course, this would cost a shell startup for each file, but on the grand
scheme of things I'd be suprised if it was reliably measurable considering
all the nesting, recursion and other horrid things that happen in the make
environment.
> Bruce
Cheers,
-Peter
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901011205.UAA96067>
