lkml.org 
[lkml]   [2008]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[RFC/PATCH] dontdiff: generate from gitignore
    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


    \
     
     \ /
      Last update: 2008-09-12 19:23    [W:0.030 / U:28.984 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site