summaryrefslogtreecommitdiff
path: root/tools/MocList
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2023-03-14 08:49:38 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-03-14 08:49:38 +0100
commit329110e3230a6518f024c612842b04afdea1cd03 (patch)
treeb96bc7ec2b4f7b8bc676c62fb9e41599db795bab /tools/MocList
parentb08347e31619f88969879abe21683bc42fb31100 (diff)
Enable out-of-tree builds
Diffstat (limited to 'tools/MocList')
-rwxr-xr-xtools/MocList12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/MocList b/tools/MocList
index 8111e37..6aff3ee 100755
--- a/tools/MocList
+++ b/tools/MocList
@@ -1,9 +1,9 @@
# -*- mode: shell-script; sh-shell: bash; sh-indentation: 2 -*-
-if [ "$1" = "cc" ]; then
- grep "Q_OBJECT" *.h | LC_ALL=C sort | cut -d: -f1 | sed -e 's/^//g;s/\.h/\.moc.cc/g'| xargs echo;
-elif [ "$1" = "o" ]; then
- grep "Q_OBJECT" *.h | LC_ALL=C sort | cut -d: -f1 | sed -e 's/^//g;s/\.h/\.moc.o/g'| xargs echo;
-elif [ "$1" = "h" ]; then
- grep "Q_OBJECT" *.h | LC_ALL=C sort | cut -d: -f1 | cut -d'/' -f3 | xargs echo;
+if [ "$2" = "cc" ]; then
+ grep "Q_OBJECT" $1/*.h | LC_ALL=C sort | cut -d: -f1 | sed -e 's/^//g;s/\.h/\.moc.cc/g'| xargs echo;
+elif [ "$2" = "o" ]; then
+ grep "Q_OBJECT" $1/*.h | LC_ALL=C sort | cut -d: -f1 | sed -e 's/^//g;s/\.h/\.moc.o/g'| xargs echo;
+elif [ "$2" = "h" ]; then
+ grep "Q_OBJECT" $1/*.h | LC_ALL=C sort | cut -d: -f1 | cut -d'/' -f3 | xargs echo;
fi