Changeset 8002


Ignore:
Timestamp:
2007-07-16T09:19:45+02:00 (11 years ago)
Author:
nbd
Message:

detect whether the find command supports -L or -follow

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/host.mk

    r7096 r8002  
    66# 
    77 
    8 include $(TMP_DIR)/.host.mk 
     8-include $(TMP_DIR)/.host.mk 
    99 
    1010export TAR 
     
    3030                echo "TAR:=$$TAR" >> $@; \ 
    3131                echo "BASH:=$(shell which bash)" >> $@; \ 
     32                if find -L /tmp -maxdepth 0 >/dev/null 2>/dev/null; then \ 
     33                        echo 'FIND_L=find -L $$(1)' >>$@; \ 
     34                else \ 
     35                        echo 'FIND_L=find $$(1) -follow' >> $@; \ 
     36                fi; \ 
    3237        ) 
    3338 
  • trunk/include/scan.mk

    r8000 r8002  
    11include $(TOPDIR)/include/verbose.mk 
     2TMP_DIR:=$(TOPDIR)/tmp 
    23 
    34all: tmp/.$(SCAN_TARGET) 
     5 
     6include $(TOPDIR)/include/host.mk 
    47 
    58SCAN_TARGET ?= packageinfo 
     
    3235$(FILELIST): 
    3336        rm -f tmp/info/.files-$(SCAN_TARGET)-* 
    34         find -follow $(SCAN_DIR) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|KernelPackage|Build(Package|Kernel))' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@ 
     37        $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|KernelPackage|Build(Package|Kernel))' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@ 
    3538 
    3639tmp/info/.files-$(SCAN_TARGET).mk: $(FILELIST) 
Note: See TracChangeset for help on using the changeset viewer.