10 # use context to work around cmake issue #12619
12 echo '// generated file; do not modify' > ${MOD}.inc
13 echo '// generated file; do not modify' > ${MOD}.qh
14 for f in $(ls | sort -k 1,1 -t .); do
15 if [[ "$f" == cl_* ]]; then if [[ -f "${f#cl_}" ]]; then continue; fi; fi
16 if [[ "$f" == sv_* ]]; then if [[ -f "${f#sv_}" ]]; then continue; fi; fi
17 if [[ "$f" == ui_* ]]; then if [[ -f "${f#ui_}" ]]; then continue; fi; fi
18 if [[ "$f" == *.qc ]]; then
19 echo "#include <${CTX}$f>" >> ${MOD}.inc
20 echo "#include <${CTX}${f%.qc}.qh>" >> ${MOD}.qh
21 if [[ -f "cl_$f" ]]; then echo -e "#ifdef CSQC\n #include <${CTX}cl_$f>\n#endif" >> ${MOD}.inc; fi
22 if [[ -f "sv_$f" ]]; then echo -e "#ifdef SVQC\n #include <${CTX}sv_$f>\n#endif" >> ${MOD}.inc; fi
23 if [[ -f "ui_$f" ]]; then echo -e "#ifdef MENUQC\n #include <${CTX}ui_$f>\n#endif" >> ${MOD}.inc; fi
27 for f in *; do if [ -d "$f" ]; then
28 (cd -- "$f" && genmod)
29 # echo "#include \"$f/MOD\"" >> ${MOD}