lkml.org 
[lkml]   [2002]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH for 2.4] fix find to not stumble over BK
    Marcelo,

    here's a backport of the patch I did for 2.5 which fixes up all the targets
    in the top level Makefile which do things like

    find dir dir2 -name '*.h' | xargs etags -

    Note that common usage

    find . -name '*.[chS]' | whatever

    becomes

    find . -name SCCS -prune -o -name BitKeeper -prune -o \
    -name '*.[chS]' -print | whatever
    ^^^^^^

    The -print is needed or find will produce nothing, it's now multiple clauses.

    Please pull

    bk pull bk://linux.bkbits.net/lm-2.4

    Here are the diffs:

    # This is a BitKeeper generated patch for the following project:
    # Project Name: Linux kernel tree
    # This patch format is intended for GNU patch command version 2.5 or higher.
    # This patch includes the following deltas:
    # ChangeSet 1.620 -> 1.621
    # Makefile 1.174 -> 1.175
    #
    # The following is the BitKeeper ChangeSet Log
    # --------------------------------------------
    # 02/07/16 lm@disks.bitmover.com 1.621
    # Do not descend into BitKeeper/SCCS directories when running find
    # to generate lists of files.
    # --------------------------------------------
    #
    diff -Nru a/Makefile b/Makefile
    --- a/Makefile Tue Jul 16 16:57:21 2002
    +++ b/Makefile Tue Jul 16 16:57:21 2002
    @@ -367,16 +367,25 @@
    $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)

    TAGS: dummy
    - { find include/asm-${ARCH} -name '*.h' -print ; \
    - find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
    - find $(SUBDIRS) init arch/${ARCH} -name '*.[chS]' ; } | grep -v SCCS | etags -
    + { find include/asm-${ARCH} \
    + -name SCCS -prune -o -name BitKeeper -prune -o \
    + -name '*.h' -print ; \
    + find include -name SCCS -prune -o -name BitKeeper -prune -o \
    + -type d \( -name "asm-*" -o -name config \) -prune -o \
    + -name '*.h' -print ; \
    + find $(SUBDIRS) init arch/${ARCH} \
    + -name SCCS -prune -o -name BitKeeper -prune -o \
    + -name '*.[chS]' -print ; } | etags -

    # Exuberant ctags works better with -I
    tags: dummy
    CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
    - ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
    - find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
    - find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
    + ctags $$CTAGSF `find include/asm-$(ARCH) -name SCCS -prune -o -name BitKeeper -prune -o -name '*.h' -print` && \
    + find include -name SCCS -prune -o -name BitKeeper -prune -o \
    + -type d \( -name "asm-*" -o -name config \) -prune -o \
    + -name '*.h' -print | xargs ctags $$CTAGSF -a && \
    + find $(SUBDIRS) init -name SCCS -prune -o -name BitKeeper -prune -o \
    + -name '*.[ch]' -print | xargs ctags $$CTAGSF -a

    ifdef CONFIG_MODULES
    ifdef CONFIG_MODVERSIONS
    @@ -440,23 +449,29 @@
    endif

    clean: archclean
    - find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
    + find . -name SCCS -prune -o -name BitKeeper -prune -o \
    + \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) \
    + -type f -print \
    | grep -v lxdialog/ | xargs rm -f
    rm -f $(CLEAN_FILES)
    rm -rf $(CLEAN_DIRS)
    $(MAKE) -C Documentation/DocBook clean

    mrproper: clean archmrproper
    - find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
    + find . -name SCCS -prune -o -name BitKeeper -prune -o \
    + \( -size 0 -o -name .depend \) \
    + -type f -print | xargs rm -f
    rm -f $(MRPROPER_FILES)
    rm -rf $(MRPROPER_DIRS)
    $(MAKE) -C Documentation/DocBook mrproper

    distclean: mrproper
    - rm -f core `find . \( -not -type d \) -and \
    + @find . -name SCCS -prune -o -name BitKeeper -prune -o \
    + \( -not -type d \) -and \
    \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
    -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
    - -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
    + -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f \
    + -print | xargs rm -f

    backup: mrproper
    cd .. && tar cf - linux/ | gzip -9 > backup.gz
    @@ -483,11 +498,12 @@
    $(MAKE) -C Documentation/DocBook man

    sums:
    - find . -type f -print | sort | xargs sum > .SUMS
    + find . -name SCCS -prune -o -name BitKeeper -prune -o \
    + -type f -print | sort | xargs sum > .SUMS

    dep-files: scripts/mkdep archdep include/linux/version.h
    scripts/mkdep -- init/*.c > .depend
    - scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
    + scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -name BitKeeper -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
    $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
    ifdef CONFIG_MODVERSIONS
    $(MAKE) update-modverfile
    @@ -503,13 +519,19 @@
    depend dep: dep-files

    checkconfig:
    - find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
    + find * -name SCCS -prune -o -name BitKeeper -prune -o \
    + -name '*.[hcS]' -type f -print \
    + | sort | xargs $(PERL) -w scripts/checkconfig.pl

    checkhelp:
    - find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl
    + find * -name SCCS -prune -o -name BitKeeper -prune -o \
    + -name [cC]onfig.in -print \
    + | sort | xargs $(PERL) -w scripts/checkhelp.pl

    checkincludes:
    - find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
    + find * -name SCCS -prune -o -name BitKeeper -prune -o \
    + -name '*.[hcS]' -type f -print \
    + | sort | xargs $(PERL) -w scripts/checkincludes.pl

    ifdef CONFIGURATION
    ..$(CONFIGURATION):
    @@ -559,7 +581,9 @@
    # will become invalid
    #
    rpm: clean spec
    - find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
    + find . -name SCCS -prune -o -name BitKeeper -prune -o \
    + \( -size 0 -o -name .depend -o -name .hdepend \) \
    + -type f -print | xargs rm -f
    set -e; \
    cd $(TOPDIR)/.. ; \
    ln -sf $(TOPDIR) $(KERNELPATH) ; \
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 13:27    [W:2.635 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site