diff --git a/make/defs.mk b/make/defs.mk index 7e778b07..b5d38455 100644 --- a/make/defs.mk +++ b/make/defs.mk @@ -113,7 +113,7 @@ reverse = $(if $(wordlist 2,2,$(1)),$(call reverse,$(wordli make_subdirs = set -e; for D in $(SUBDIRS) ; do make -C $$D ; done make_subdirs_target = set -e; for D in $(SUBDIRS) ; do make -C $$D $@; done install_local_cfg = $(INSTALL) -p -o $(CFGOWNER) -g $(CFGGROUP) -m $(CFGMODE) $< $@ -cvs_files = sh $(JWB_SCRIPT_DIR)/scm.sh ls-files -f +cvs_files = sh $(JWB_SCRIPT_DIR)/scm.sh ls-files add_flavour_prefix = $(SED) "s/\([^ ][^ ]*\) *\([<>=]*\) *\([^ ]*\)/$(FLAVOUR_PREFIX)\1 \2 \3/g" beautify_lib_path = $(SED) 's/:/\n + /g' find_files = $(wildcard $(addsuffix /$(1),$(patsubst :, ,$(2)))) diff --git a/make/list-files.mk b/make/list-files.mk index 681c5724..ff9b6dd5 100644 --- a/make/list-files.mk +++ b/make/list-files.mk @@ -10,9 +10,9 @@ list-text-files echo-text-files: $(Q)$(LIST_VCS_FILES) -ft tar-files: - $(Q)$(LIST_VCS_FILES) $(TOPDIR) -f | xargs tar -C $(TOPDIR) -cf - + $(Q)$(LIST_VCS_FILES) $(TOPDIR) | xargs tar -C $(TOPDIR) -cf - cpio-files: - $(Q)$(LIST_VCS_FILES) $(TOPDIR) -f | cpio --directory=$(TOPDIR) -o -H newc + $(Q)$(LIST_VCS_FILES) $(TOPDIR) | cpio --directory=$(TOPDIR) -o -H newc endif # ifndef LIST_FILES_MK_INCLUDED diff --git a/scripts/pkg.sh b/scripts/pkg.sh index 39adaf3b..38ff7c35 100644 --- a/scripts/pkg.sh +++ b/scripts/pkg.sh @@ -101,7 +101,7 @@ scm_files() { ( cd $TOPDIR - /bin/bash $JWB_SCRIPT_DIR/scm.sh ls-files -f "$@" + /bin/bash $JWB_SCRIPT_DIR/scm.sh ls-files "$@" ) } diff --git a/scripts/scm.sh b/scripts/scm.sh index 5dfbf80e..c359b489 100644 --- a/scripts/scm.sh +++ b/scripts/scm.sh @@ -121,7 +121,17 @@ cmd_ls_files() local opts="$git_ls_files_opts" git --version | grep -q "version *1" && opt_no_submodules=1 [ "$opt_no_submodules" = 1 ] || opts="$opts --recurse-submodules" - git ls-files --recurse-submodules $opts $1 + if [ "$opt_only_regular_files" != 1 ]; then + git ls-files --recurse-submodules $opts $1 + else + local entry meta + while IFS= read -r -d '' entry; do + meta=${entry%%$'\t'*} + case ${meta%% *} in + 100644|100755) output "${entry#*$'\t'}" ;; + esac + done < <(git ls-files -s -z --recurse-submodules $opts $1) + fi if [ "$include_vcs_files" = 1 -a -d .git ]; then output_find .git fi