From e0ffde7bc216083966ed575902513e6f06d9bafc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Wed, 28 Sep 2016 11:45:33 +0200 Subject: [PATCH] [build] use git ls-files so we only include tracked files --- scripts/generate-core-files.sh | 2 +- scripts/generate-test-files.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate-core-files.sh b/scripts/generate-core-files.sh index a14239b8f..27754306e 100755 --- a/scripts/generate-core-files.sh +++ b/scripts/generate-core-files.sh @@ -7,7 +7,7 @@ echo "# Do not edit. Regenerate this with ./scripts/generate-core-files.sh" > cm echo "" >> cmake/core-files.cmake echo "set(MBGL_CORE_FILES" >> cmake/core-files.cmake PREFIX= -for FILE in $(find include src -type f -a \( -name "*.hpp" -o -name "*.cpp" -o -name "*.h" -o -name "*.c" \) | perl -p -e "s/^((src|include)\/(mbgl\/)?(.+)\/\w+\.\w+)$/\$4#\$1/g" | sort) ; do +for FILE in $(git ls-files "include/*.hpp" "include/*.h" "src/*.hpp" "src/*.cpp" "src/*.h" "src/*.c" | perl -p -e "s/^((src|include)\/(mbgl\/)?(.+)\/\w+\.\w+)$/\$4#\$1/g" | sort) ; do CURRENT_PREFIX="${FILE%#*}" if [ "${PREFIX}" != "${CURRENT_PREFIX}" ]; then if [ ! -z "${PREFIX}" ]; then echo "" >> cmake/core-files.cmake ; fi diff --git a/scripts/generate-test-files.sh b/scripts/generate-test-files.sh index 0af6828c6..5f507d3ed 100755 --- a/scripts/generate-test-files.sh +++ b/scripts/generate-test-files.sh @@ -7,7 +7,7 @@ echo "# Do not edit. Regenerate this with ./scripts/generate-test-files.sh" > cm echo "" >> cmake/test-files.cmake echo "set(MBGL_TEST_FILES" >> cmake/test-files.cmake PREFIX= -for FILE in $(find test -type f -a \( -name "*.hpp" -o -name "*.cpp" -o -name "*.h" -o -name "*.c" \) | sort) ; do +for FILE in $(git ls-files "test/*.hpp" "test/*.cpp" "test/*.h" "test/*.c" | sort) ; do CURRENT_PREFIX=$(dirname ${FILE#test/}) if [ "${PREFIX}" != "${CURRENT_PREFIX}" ]; then if [ ! -z "${PREFIX}" ]; then echo "" >> cmake/test-files.cmake ; fi