[PATCH v2 evemu 15/16] python: move event-names.py generation into the toplevel python makefile

Peter Hutterer peter.hutterer at who-t.net
Wed Aug 13 16:57:32 PDT 2014


Just to have things together

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
Changes to v1:
- rebased for master

This is the only patch that had notable changes after the rebase, so I'll
skip re-sending the others. I've pushed them all to 
http://github.com/whot/evemu master

Top commit is 947a5e3fe03623497d8a6eeef6b25a1ef1c802cf, that branch is
missing the InputEvent.matches() patch as said in the other email.

 configure.ac             |  2 +-
 python/Makefile.am       | 12 ++++++++----
 python/evemu/Makefile.am |  6 ------
 3 files changed, 9 insertions(+), 11 deletions(-)
 delete mode 100644 python/evemu/Makefile.am

diff --git a/configure.ac b/configure.ac
index 19e1828..fcfa991 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,7 @@ AC_PROG_LIBTOOL
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_INSTALL
+AC_PROG_MKDIR_P
 AM_PATH_PYTHON([2.6])
 
 PKG_CHECK_MODULES([LIBEVDEV], [libevdev >= 0.5])
@@ -62,7 +63,6 @@ AC_SUBST(AM_CFLAGS,
 AC_CONFIG_FILES([Makefile
                  src/Makefile
                  python/Makefile
-                 python/evemu/Makefile
                  tools/Makefile
                  test/Makefile
                  evemu.pc])
diff --git a/python/Makefile.am b/python/Makefile.am
index 77eb576..d0bf3f6 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -16,8 +16,6 @@
 # You should have received a copy of the GNU General Public License along 
 # with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-SUBDIRS = evemu
-
 nobase_python_PYTHON = \
 	evemu/__init__.py \
 	evemu/base.py \
@@ -35,6 +33,12 @@ test_sources = \
 	       evemu/tests/test_base.py \
 	       evemu/tests/test_device.py
 
+$(builddir)/evemu/event_names.py: Makefile $(srcdir)/evemu/make-event-names.py
+	$(MKDIR_P) evemu/
+	$(PYTHON) $(srcdir)/evemu/make-event-names.py > $@
+
+BUILT_SOURCES = $(builddir)/evemu/event_names.py
+
 if BUILD_TESTS
 check_SCRIPTS = evemu-test-runner
 
@@ -49,8 +53,8 @@ evemu-test-runner: evemu-test-runner.in Makefile
 	  $< >$@
 	chmod +x $@
 
-BUILT_SOURCES = evemu-test-runner
+BUILT_SOURCES += evemu-test-runner
 endif
 
-EXTRA_DIST =  evemu-test-runner.in $(test_sources)
+EXTRA_DIST =  evemu-test-runner.in $(test_sources) $(srcdir)/evemu/make-event-names.py
 CLEANFILES = $(BUILT_SOURCES)
diff --git a/python/evemu/Makefile.am b/python/evemu/Makefile.am
deleted file mode 100644
index 17b1462..0000000
--- a/python/evemu/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-event_names.py: Makefile make-event-names.py
-	$(PYTHON) $(srcdir)/make-event-names.py > $@
-
-BUILT_SOURCES = event_names.py
-CLEANFILES = event_names.py event_names.pyc
-EXTRA_DIST = make-event-names.py
-- 
1.9.3



More information about the Input-tools mailing list