LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* makei: shell script for building .i files
@ 2006-12-04 9:20 Chuck Ebbert
2006-12-05 18:53 ` Jan Engelhardt
0 siblings, 1 reply; 2+ messages in thread
From: Chuck Ebbert @ 2006-12-04 9:20 UTC (permalink / raw)
To: Willy Tarreau; +Cc: linux-kernel, Andrew Morton
On Fri, 24 Nov 2006 22:23:06 +0100, Willy Tarreau wrote:
> BTW, has anyone a good idea on how to make gcc dump the preprocessed files
> for everything it builds ? I mean, just by changing some variables in the
> Makefile.
I came up with this. Separate output directory option is untested.
It's not quite what you wanted but this is as close as I could get.
#!/bin/bash
#
# scripts/makei
#
# Make .i files in Linux kernel tree. You must first build a
# working kernel so this script knows which files to make.
#
# usage:
# scripts/makei [subdir]
#
# Use the optional subdir parameter to build .i files
# for just part of the source tree.
#
# Set the shell variables MAKE and OBJDIR if necessary.
#
# Examples
# If:
# Your output dir is ~/build,
# you are building the UML arch
# and you only want to build .i files in drivers/base/
# Then use:
# OBJDIR=~/build MAKE='make O=~/build ARCH=um' scripts/makei drivers/base
OBJDIR=${OBJDIR:=.}
MAKE=${MAKE:=make}
OBJDIR=${OBJDIR%/}/
find $OBJDIR$1 -type f -name \*.o |
while read fullname
do
fullname=${fullname#$OBJDIR}
name=${fullname%.o}
[ -f $name.c -o -f $name.S ] && $MAKE $name.i
done
--
Chuck
"Even supernovas have their duller moments."
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: makei: shell script for building .i files
2006-12-04 9:20 makei: shell script for building .i files Chuck Ebbert
@ 2006-12-05 18:53 ` Jan Engelhardt
0 siblings, 0 replies; 2+ messages in thread
From: Jan Engelhardt @ 2006-12-05 18:53 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: Willy Tarreau, linux-kernel, Andrew Morton
>#!/bin/bash
>#
># scripts/makei
>#
># Make .i files in Linux kernel tree. You must first build a
># working kernel so this script knows which files to make.
Would -fsave-temps of gcc do the same? (Half the answer: no, it saves
the temp files in $KSRC rather than $O)
-`J'
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-05 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-04 9:20 makei: shell script for building .i files Chuck Ebbert
2006-12-05 18:53 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).