From: Randy Dunlap <randy.dunlap@oracle.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
akpm <akpm@linux-foundation.org>, samr <sam@ravnborg.org>
Subject: [RFC/PATCH] dontdiff: generate from gitignore
Date: Fri, 12 Sep 2008 10:18:40 -0700 [thread overview]
Message-ID: <20080912101840.e0b6dd8c.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20080901231419.GA5602@x200.localdomain>
From: Randy Dunlap <randy.dunlap@oracle.com>
Generate the "dontdiff" file from the .gitignore files.
Save it in scripts/dontdiff.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
Makefile | 10 +++++++++-
scripts/.gitignore | 1 +
scripts/mkdontdiff | 23 +++++++++++++++++++++++
3 files changed, 33 insertions(+), 1 deletion(-)
--- linux-2.6.27-rc6-git2.orig/Makefile
+++ linux-2.6.27-rc6-git2/Makefile
@@ -398,7 +398,7 @@ endif
no-dot-config-targets := clean mrproper distclean \
cscope TAGS tags help %docs check% \
include/linux/version.h headers_% \
- kernelrelease kernelversion
+ kernelrelease kernelversion dontdiff
config-targets := 0
mixed-targets := 0
@@ -1251,6 +1251,7 @@ help:
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[ois] - Build specified target only'
@echo ' dir/file.ko - Build module including final link'
+ @echo ' dontdiff - Create a "dontdiff" file'
@echo ' prepare - Set up for building external modules'
@echo ' tags/TAGS - Generate tags file for editors'
@echo ' cscope - Generate cscope index'
@@ -1519,6 +1520,13 @@ endef
tags: FORCE
$(call cmd,tags)
+quiet_cmd_dontdiff = MAKE dontdiff
+ cmd_dontdiff = $(shell $(CONFIG_SHELL) \
+ $(srctree)/scripts/mkdontdiff $(srctree))
+
+dontdiff: FORCE
+ $(call cmd,dontdiff)
+
# Scripts to check various things for consistency
# ---------------------------------------------------------------------------
--- /dev/null
+++ linux-2.6.27-rc6-git2/scripts/mkdontdiff
@@ -0,0 +1,23 @@
+#! /bin/sh
+set -f
+
+TMPFILE=`mktemp ./.tmpdd.XXXXXX`
+srctree=$1
+DDFILE=$srctree/scripts/dontdiff
+
+find . -name .gitignore | xargs cat | grep -v '^[#!]' | grep -v '^[:space:]*$' | sort | uniq > $TMPFILE
+
+rm -f $DDFILE
+touch $DDFILE
+
+while read PATTERN ; do
+ if echo "$PATTERN" | grep -q '/' ; then
+ filename=`basename $PATTERN`
+ else
+ filename="$PATTERN"
+ fi
+
+ echo $filename >> $DDFILE
+done < $TMPFILE
+
+rm $TMPFILE
--- linux-2.6.27-rc6-git2.orig/scripts/.gitignore
+++ linux-2.6.27-rc6-git2/scripts/.gitignore
@@ -2,6 +2,7 @@
# Generated files
#
conmakehash
+dontdiff
kallsyms
pnmtologo
bin2c
next prev parent reply other threads:[~2008-09-12 17:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-01 22:09 [path] don't diff generated firmware files Arjan van de Ven
2008-09-01 23:14 ` Alexey Dobriyan
2008-09-12 17:17 ` Randy Dunlap
2008-09-12 17:17 ` [PATCH] dontdiff: more updates to be closer to gitignore Randy Dunlap
2008-09-12 17:18 ` Randy Dunlap [this message]
2008-09-12 17:36 ` [RFC/PATCH] dontdiff: generate from gitignore Linus Torvalds
2008-09-12 17:41 ` Randy Dunlap
2008-09-12 20:32 ` Kai Henningsen
[not found] <e2e108260809130052u454b6920h9745c27eb2f4b20c@mail.gmail.com>
2008-09-14 18:23 ` [RFC PATCH] Script for generating Documentation/dontdiff from .gitignore files Eduard - Gabriel Munteanu
2008-09-15 15:34 ` Randy Dunlap
2008-09-16 3:26 ` [RFC PATCH] Script for generating Documentation/dontdiff from .gitignore files. (was Re: [RFC/PATCH] dontdiff: generate from gitignore) Eduard - Gabriel Munteanu
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=20080912101840.e0b6dd8c.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=torvalds@linux-foundation.org \
/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®