From: Chuck Ebbert <76306.1226@compuserve.com>
To: Willy Tarreau <w@1wt.eu>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: makei: shell script for building .i files
Date: Mon, 4 Dec 2006 04:20:37 -0500 [thread overview]
Message-ID: <200612040423_MC3-1-D3DD-B749@compuserve.com> (raw)
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."
next reply other threads:[~2006-12-04 9:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-04 9:20 Chuck Ebbert [this message]
2006-12-05 18:53 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200612040423_MC3-1-D3DD-B749@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®