]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix "make clean" on Debian (dash). Use cpp's file lists for check-translations.sh.
authorRudolf Polzer <divVerent@xonotic.org>
Fri, 15 Jan 2016 15:59:26 +0000 (16:59 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Fri, 15 Jan 2016 15:59:26 +0000 (16:59 +0100)
check-translations.sh
qcsrc/Makefile

index a7406532d8d61829e952a19d91ccc5ccb0e28494..6b59b853aa9a743bac21b6874ac6a2056e5a8d1c 100755 (executable)
@@ -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
 
index 45360c60c19ff9ae2799e8aecb0c8ee20ada8b36..f6c67bbebcd708c9546928c01ca83f1c8612a202 100644 (file)
@@ -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.*