diff --git a/Makefile.am b/Makefile.am index 637f3509..28d6cef9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,12 @@ EXTRA_DIST = m4/expansions.m4 -SUBDIRS = src examples qt +SUBDIRS = src if ENABLE_DEBUG SUBDIRS += tests endif + +if ENABLE_EXAMPLES + SUBDIRS += examples +endif diff --git a/configure.ac b/configure.ac index 3045c816..ee5a55bd 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,11 @@ if test -z "$CONFIG_REQUESTED" ; then enable_debug=yes fi +AC_ARG_ENABLE(examples, + AC_HELP_STRING([--enable-examples], + [Build examples [default=NO]]), + enable_examples=yes, enable_examples=no) +AM_CONDITIONAL(ENABLE_EXAMPLES, test x$enable_examples = xyes) dnl package checks, common for all configs @@ -66,10 +71,10 @@ src/Mono.Cxxi/Makefile src/generator/generator src/generator/Makefile src/Makefile -qt/Makefile tests/Makefile examples/Makefile examples/Hello/Makefile +examples/qt/Makefile Makefile ]) diff --git a/examples/Makefile.am b/examples/Makefile.am index c746218c..ec20122b 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS = Hello +SUBDIRS = Hello qt diff --git a/qt/Makefile.am b/examples/qt/Makefile.am similarity index 100% rename from qt/Makefile.am rename to examples/qt/Makefile.am diff --git a/qt/demos/hello.cs b/examples/qt/demos/hello.cs similarity index 100% rename from qt/demos/hello.cs rename to examples/qt/demos/hello.cs diff --git a/qt/qt-gui-filters.xml b/examples/qt/qt-gui-filters.xml similarity index 100% rename from qt/qt-gui-filters.xml rename to examples/qt/qt-gui-filters.xml diff --git a/qt/qt-gui.cpp b/examples/qt/qt-gui.cpp similarity index 100% rename from qt/qt-gui.cpp rename to examples/qt/qt-gui.cpp diff --git a/qt/qt-gui.h b/examples/qt/qt-gui.h similarity index 100% rename from qt/qt-gui.h rename to examples/qt/qt-gui.h diff --git a/qt/src/QApplication.cs b/examples/qt/src/QApplication.cs similarity index 100% rename from qt/src/QApplication.cs rename to examples/qt/src/QApplication.cs diff --git a/qt/src/QCoreApplication.cs b/examples/qt/src/QCoreApplication.cs similarity index 100% rename from qt/src/QCoreApplication.cs rename to examples/qt/src/QCoreApplication.cs diff --git a/qt/src/QFlags.cs b/examples/qt/src/QFlags.cs similarity index 100% rename from qt/src/QFlags.cs rename to examples/qt/src/QFlags.cs diff --git a/qt/src/QPoint.cs b/examples/qt/src/QPoint.cs similarity index 100% rename from qt/src/QPoint.cs rename to examples/qt/src/QPoint.cs diff --git a/qt/src/QPushButton.cs b/examples/qt/src/QPushButton.cs similarity index 100% rename from qt/src/QPushButton.cs rename to examples/qt/src/QPushButton.cs diff --git a/qt/src/QSize.cs b/examples/qt/src/QSize.cs similarity index 100% rename from qt/src/QSize.cs rename to examples/qt/src/QSize.cs diff --git a/qt/src/QString.cs b/examples/qt/src/QString.cs similarity index 100% rename from qt/src/QString.cs rename to examples/qt/src/QString.cs diff --git a/qt/src/QWidget.cs b/examples/qt/src/QWidget.cs similarity index 100% rename from qt/src/QWidget.cs rename to examples/qt/src/QWidget.cs diff --git a/tests/Makefile.am b/tests/Makefile.am index 63d2b3c5..4761da44 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -42,6 +42,7 @@ generated: $(addsuffix .xml,$(NATIVE)) $(foreach X,$?, \ mono --debug $(BUILD_DIR)/generator.exe -o=$@ -ns=Tests -lib=Test -inline=surrogatelib $(X) && \ ) \ + $(RM) generated/__*.cs && \ echo Bindings generated successfully. $(TEST_DLL): generated $(MANAGED) $(BUILD_DIR)/libTest.so $(BUILD_DIR)/libTest-inline.so