From: Rudolf Polzer Date: Fri, 15 Jan 2016 15:59:26 +0000 (+0100) Subject: Fix "make clean" on Debian (dash). Use cpp's file lists for check-translations.sh. X-Git-Tag: xonotic-v0.8.2~1235 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f287e05f7e7715842779b17e2f44151172a53dd2;p=xonotic%2Fxonotic-data.pk3dir.git Fix "make clean" on Debian (dash). Use cpp's file lists for check-translations.sh. --- diff --git a/check-translations.sh b/check-translations.sh index a7406532d..6b59b853a 100755 --- a/check-translations.sh +++ b/check-translations.sh @@ -29,8 +29,33 @@ case "$1" in esac if [ x"$mode" = x"pot" ]; then + make QCC="../../../../gmqcc/gmqcc" clean + make QCC="../../../../gmqcc/gmqcc" { - find qcsrc -type f -name \*.\* -not -name \*.po -not -name \*.txt + grep -h '^\.' qcsrc/tmp/*_includes.txt | cut -d ' ' -f 2 | sed -e 's,^,qcsrc/,' | while IFS= read -r name; do + while :; do + case "$name" in + */./*) + name=${name%%/./*}/${name#*/./} + ;; + ./*) + name=${name#./} + ;; + */*/../*) + before=${name%%/../*} + before=${before%/*} + name=$before/${name#*/../} + ;; + */../*) + name=${name#*/../} + ;; + *) + break + ;; + esac + done + echo "$name" + done | sort -u | tee lst } | xgettext -LC -k_ -f- --from-code utf-8 -F -o common.pot >&2 fi diff --git a/qcsrc/Makefile b/qcsrc/Makefile index 45360c60c..f6c67bbeb 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -41,8 +41,12 @@ qc: $(PROGS_OUT)/menu.dat $(PROGS_OUT)/progs.dat $(PROGS_OUT)/csprogs.dat .PHONY: clean clean: - rm -f $(PROGS_OUT)/{csprogs,progs,menu}.dat - rm -f ../.tmp/*.{qc,d,txt} + rm -f $(PROGS_OUT)/csprogs.dat + rm -f $(PROGS_OUT)/progs.dat + rm -f $(PROGS_OUT)/menu.dat + rm -f ../.tmp/*.qc + rm -f ../.tmp/*.d + rm -f ../.tmp/*.txt $(QCCVERSIONFILE): $(RM) qccversion.*