--- tests/Makefile.am | 5 ++++ tests/Makefile.in | 5 ++++ tests/qt.test | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/qt2.test | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/qt3.test | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/qt4.test | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/qt5.test | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 295 insertions(+), 0 deletions(-) create mode 100755 tests/qt.test create mode 100755 tests/qt2.test create mode 100755 tests/qt3.test create mode 100755 tests/qt4.test create mode 100755 tests/qt5.test
diff --git a/tests/Makefile.am b/tests/Makefile.am index 62529a6..01989f6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -559,6 +559,11 @@ python9.test \ python10.test \ python11.test \ python12.test \ +qt.test \ +qt2.test \ +qt3.test \ +qt4.test \ +qt5.test \ recurs.test \ recurs2.test \ remake.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a494feb..72b7706 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -792,6 +792,11 @@ python9.test \ python10.test \ python11.test \ python12.test \ +qt.test \ +qt2.test \ +qt3.test \ +qt4.test \ +qt5.test \ recurs.test \ recurs2.test \ remake.test \ diff --git a/tests/qt.test b/tests/qt.test new file mode 100755 index 0000000..f42aa02 --- /dev/null +++ b/tests/qt.test @@ -0,0 +1,55 @@ +#! /bin/sh +# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009 +# Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# Test to make sure that _QTSOURCES is handled well. + +. ./defs || Exit 1 +set -e + +# fixme: instead of this, use AM_PROG_MOC +cat >> 'configure.in' << 'END' +AC_PROG_CXX +AC_SUBST([MOC], [/usr/bin/moc-qt4]) +AC_OUTPUT +END + +cat > 'Makefile.am' <<'END' +bin_PROGRAMS = foo +foo_QTSOURCES = foo.h foo.cpp src/bar.h +foo_SOURCES = main.cpp $(foo_QTSOURCES) +END + +: > ltmain.sh +: > config.sub +: > config.guess + +$ACLOCAL +$AUTOMAKE -a + +grep 'MOC' Makefile.in +grep '^moc_foo.cpp: foo.h' Makefile.in +grep '^moc_bar.cpp: src/bar.h' Makefile.in +grep 'foo.moc: foo.cpp' Makefile.in +grep 'rm.* moc_foo.cpp' Makefile.in +grep 'rm.* moc_bar.cpp' Makefile.in +grep 'rm.*foo.moc' Makefile.in +grep -i 'objects.* moc_foo' Makefile.in +grep -i 'objects.* moc_bar' Makefile.in diff --git a/tests/qt2.test b/tests/qt2.test new file mode 100755 index 0000000..33befd8 --- /dev/null +++ b/tests/qt2.test @@ -0,0 +1,56 @@ +#! /bin/sh +# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009 +# Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# Test to make sure that _QTSOURCES is handled well with subdir-objects. + +. ./defs || Exit 1 +set -e + +# fixme: instead of this, use AM_PROG_MOC +cat >> 'configure.in' << 'END' +AC_PROG_CXX +AC_SUBST([MOC], [/usr/bin/moc-qt4]) +AC_OUTPUT +END + +cat > 'Makefile.am' <<'END' +AUTOMAKE_OPTIONS = subdir-objects +bin_PROGRAMS = foo +foo_QTSOURCES = foo.h foo.cpp src/bar.h +foo_SOURCES = main.cpp $(foo_QTSOURCES) +END + +: > ltmain.sh +: > config.sub +: > config.guess + +$ACLOCAL +$AUTOMAKE -a + +grep 'MOC' Makefile.in +grep '^moc_foo.cpp: foo.h' Makefile.in +grep '^src/moc_bar.cpp: src/bar.h' Makefile.in +grep 'foo.moc: foo.cpp' Makefile.in +grep 'rm.* moc_foo.cpp' Makefile.in +grep 'rm.* src/moc_bar.cpp' Makefile.in +grep 'rm.*foo.moc' Makefile.in +grep -i 'objects.* moc_foo' Makefile.in +grep -i 'objects.* src/moc_bar' Makefile.in diff --git a/tests/qt3.test b/tests/qt3.test new file mode 100755 index 0000000..0155d58 --- /dev/null +++ b/tests/qt3.test @@ -0,0 +1,57 @@ +#! /bin/sh +# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009 +# Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# Test to make sure that _QTSOURCES is handled well with multiple targets. + +. ./defs || Exit 1 +set -e + +# fixme: instead of this, use AM_PROG_MOC +cat >> 'configure.in' << 'END' +AC_PROG_CXX +AC_SUBST([MOC], [/usr/bin/moc-qt4]) +AC_OUTPUT +END + +cat > 'Makefile.am' <<'END' +bin_PROGRAMS = foo bar +foo_QTSOURCES = foo.h foo.cpp +foo_SOURCES = main.cpp $(foo_QTSOURCES) +bar_QTSOURCES = foo.h src/bar.h +bar_SOURCES = main.cpp $(bar_QTSOURCES) +END + +: > ltmain.sh +: > config.sub +: > config.guess + +$ACLOCAL +$AUTOMAKE -a + +grep 'MOC' Makefile.in +[ `grep -c '^moc_foo.cpp:' Makefile.in` -eq 1 ] +grep '^moc_bar.cpp: src/bar.h' Makefile.in +grep 'foo.moc: foo.cpp' Makefile.in +grep 'rm.* moc_foo.cpp' Makefile.in +grep 'rm.* moc_bar.cpp' Makefile.in +grep 'rm.*foo.moc' Makefile.in +grep -i 'objects.* moc_foo' Makefile.in +grep -i 'objects.* moc_bar' Makefile.in diff --git a/tests/qt4.test b/tests/qt4.test new file mode 100755 index 0000000..9ccf5fb --- /dev/null +++ b/tests/qt4.test @@ -0,0 +1,60 @@ +#! /bin/sh +# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009 +# Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# Test to make sure that _QTSOURCES is handled well with per-exec flags. + +. ./defs || Exit 1 +set -e + +# fixme: instead of this, use AM_PROG_MOC +cat >> 'configure.in' << 'END' +AC_PROG_CXX +AC_SUBST([MOC], [/usr/bin/moc-qt4]) +AC_OUTPUT +END + +cat > 'Makefile.am' <<'END' +bin_PROGRAMS = foo bar +foo_QTSOURCES = foo.h foo.cpp +foo_SOURCES = main.cpp $(foo_QTSOURCES) +bar_QTSOURCES = foo.h src/bar.h +bar_SOURCES = main.cpp $(bar_QTSOURCES) +bar_CXXFLAGS = -Wall +END + +: > ltmain.sh +: > config.sub +: > config.guess + +$ACLOCAL +$AUTOMAKE -a + +grep 'MOC' Makefile.in +grep '^moc_foo.cpp: foo.h' Makefile.in +grep '^moc_bar.cpp: src/bar.h' Makefile.in +grep 'foo.moc: foo.cpp' Makefile.in +grep 'rm.* moc_foo.cpp' Makefile.in +grep 'rm.* moc_bar.cpp' Makefile.in +grep 'rm.*foo.moc' Makefile.in +grep -i 'objects.* moc_foo' Makefile.in +grep -i 'objects.* bar-moc_foo' Makefile.in +! grep -i 'objects.* moc_bar' Makefile.in +grep -i 'objects.* bar-moc_bar' Makefile.in diff --git a/tests/qt5.test b/tests/qt5.test new file mode 100755 index 0000000..c9c9977 --- /dev/null +++ b/tests/qt5.test @@ -0,0 +1,57 @@ +#! /bin/sh +# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009 +# Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# Test to make sure that _QTSOURCES is handled well with libtool. + +required="libtool" +. ./defs || Exit 1 +set -e + +# fixme: instead of this, use AM_PROG_MOC +cat >> 'configure.in' << 'END' +AC_PROG_CXX +AC_PROG_LIBTOOL +AC_SUBST([MOC], [/usr/bin/moc-qt4]) +AC_OUTPUT +END + +cat > 'Makefile.am' <<'END' +lib_LTLIBRARIES = libfoo.la +libfoo_la_QTSOURCES = foo.h foo.cpp src/bar.h +libfoo_la_SOURCES = main.cpp $(libfoo_la_QTSOURCES) +END + +: > ltmain.sh +: > config.sub +: > config.guess + +$ACLOCAL +$AUTOMAKE -a + +grep 'MOC' Makefile.in +grep '^moc_foo.cpp: foo.h' Makefile.in +grep '^moc_bar.cpp: src/bar.h' Makefile.in +grep 'foo.moc: foo.cpp' Makefile.in +grep 'rm.* moc_foo.cpp' Makefile.in +grep 'rm.* moc_bar.cpp' Makefile.in +grep 'rm.*foo.moc' Makefile.in +grep -i 'objects.* moc_foo.lo' Makefile.in +grep -i 'objects.* moc_bar.lo' Makefile.in -- 1.6.3.3