From 14e637a8d015911c5c60b07fdb34b9ba091bdeb6 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 14 Mar 2023 08:49:38 +0100 Subject: Enable out-of-tree builds --- tools/MocList | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/MocList b/tools/MocList index 8111e37..cbbec60 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 -m1 "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 -m1 "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 -m1 "Q_OBJECT" $1/*.h | LC_ALL=C sort | cut -d: -f1 | cut -d'/' -f3 | xargs echo; fi -- cgit v1.2.3