[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080912101840.e0b6dd8c.randy.dunlap@oracle.com>
Date: Fri, 12 Sep 2008 10:18:40 -0700
From: Randy Dunlap <randy.dunlap@...cle.com>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
akpm <akpm@...ux-foundation.org>, samr <sam@...nborg.org>
Subject: [RFC/PATCH] dontdiff: generate from gitignore
From: Randy Dunlap <randy.dunlap@...cle.com>
Generate the "dontdiff" file from the .gitignore files.
Save it in scripts/dontdiff.
Signed-off-by: Randy Dunlap <randy.dunlap@...cle.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists