From 33eb18305d9a53791afb80b975ab0eff22cda89e Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Fri, 7 Aug 2009 03:16:32 +0200 Subject: Finally, also merge gudev into the top-level Makefile.am. The Introspection rules are not tested yet; more touch-ups have been made for them. --- Makefile.am | 114 ++++++++++++++++++++++++++++++++++++++++++++-- configure.ac | 1 - extras/gudev/Makefile.am | 115 ----------------------------------------------- 3 files changed, 110 insertions(+), 120 deletions(-) delete mode 100644 extras/gudev/Makefile.am diff --git a/Makefile.am b/Makefile.am index cc5c49ad6f..e18c121c24 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,7 +8,10 @@ dist_udevconf_DATA = \ EXTRA_DIST = \ autogen.sh \ - libudev/exported_symbols + libudev/exported_symbols \ + extras/gudev/gudevmarshal.list \ + extras/gudev/gudevenumtypes.h.template \ + extras/gudev/gudevenumtypes.c.template CLEANFILES = \ udev-$(VERSION).tar.gz udev-$(VERSION).tar.bz2 @@ -99,6 +102,45 @@ libudev_libudev_private_la_SOURCES =\ libudev_libudev_private_la_LIBADD = +extras_gudev_libgudev_1_0_la_SOURCES = \ + extras/gudev/gudevenums.h \ + extras/gudev/gudevenumtypes.h \ + extras/gudev/gudevenumtypes.h\ + extras/gudev/gudevtypes.h \ + extras/gudev/gudevclient.h \ + extras/gudev/gudevclient.c \ + extras/gudev/gudevdevice.h \ + extras/gudev/gudevdevice.c \ + extras/gudev/gudevprivate.h + +dist_extras_gudev_libgudev_1_0_la_SOURCES = \ + extras/gudev/gudevmarshal.h \ + extras/gudev/gudevmarshal.c \ + extras/gudev/gudevenumtypes.h \ + extras/gudev/gudevenumtypes.c + +extras_gudev_libgudev_1_0_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -I$(top_builddir)/extras \ + -I$(top_srcdir)/extras \ + -I$(top_builddir)/extras/gudev \ + -I$(top_srcdir)/extras/gudev \ + -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \ + -D_GUDEV_COMPILATION \ + -DG_UDEV_API_IS_SUBJECT_TO_CHANGE \ + -DG_LOG_DOMAIN=\"GUdev\" +extras_gudev_libgudev_1_0_la_CFLAGS = $(GLIB_CFLAGS) +extras_gudev_libgudev_1_0_la_LIBADD = libudev/libudev.la $(GLIB_LIBS) + +LIBGUDEV_CURRENT=0 +LIBGUDEV_REVISION=1 +LIBGUDEV_AGE=0 + +extras_gudev_libgudev_1_0_la_LDFLAGS = \ + -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \ + -export-dynamic -no-undefined \ + -export-symbols-regex '^g_udev_.*' + # ------------------------------------------------------------------------------ # Programs # ------------------------------------------------------------------------------ @@ -305,6 +347,8 @@ endif if ENABLE_EXTRAS INSTALL_EXEC_HOOKS += udevacl-install-hook +lib_LTLIBRARIES += extras/gudev/libgudev-1.0.la + dist_udevrules_DATA += \ rules/rules.d/75-net-description.rules \ rules/rules.d/75-tty-description.rules \ @@ -326,8 +370,8 @@ dist_libexec_SCRIPTS += \ extras/keymap/findkeyboards BUILT_SOURCES += \ - extras/keymap/keys-from-name.h \ - extras/keymap/keys-to-name.h + $(nodist_extras_keymap_keymap_SOURCES) \ + $(dist_extras_gudev_libgudev_1_0_la_SOURCES) TESTS += extras/keymap/check-keymaps.sh @@ -384,10 +428,32 @@ dist_udevkeymap_DATA = \ extras/keymap/keymaps/toshiba-satellite_a110 \ extras/keymap/keymaps/zepto-znote +libgudev_includedir=$(includedir)/gudev-1.0/gudev +libgudev_include_HEADERS = \ + extras/gudev/gudev.h \ + extras/gudev/gudevenums.h \ + extras/gudev/gudevenumtypes.h \ + extras/gudev/gudevtypes.h \ + extras/gudev/gudevclient.h \ + extras/gudev/gudevdevice.h + +pkgconfig_DATA += extras/gudev/gudev-1.0.pc + SUBDIRS += \ - extras/gudev + extras/gudev/docs endif +if ENABLE_INTROSPECTION +girdir = $(GIRDIR) +gir_DATA = extras/gudev/GUdev-1.0.gir + +typelibsdir = $(GIRTYPELIBDIR) +typelibs_DATA = extras/gudev/GUdev-1.0.typelib + +EXTRA_DIST += GUdev-1.0.gir +CLEANFILES += $(gir_DATA) $(typelibs_DATA) +endif # ENABLE_INTROSPECTION + # ------------------------------------------------------------------------------ # Install and uninstall hooks # ------------------------------------------------------------------------------ @@ -427,3 +493,43 @@ extras/keymap/keys-from-name.h: extras/keymap/keys-from-name.gperf Makefile extras/keymap/keys-to-name.h: extras/keymap/keys.txt Makefile $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@ + +extras/gudev/gudevmarshal.h: extras/gudev/gudevmarshal.list + glib-genmarshal $< --prefix=g_udev_marshal --header > $@ + +extras/gudev/gudevmarshal.c: extras/gudev/gudevmarshal.list + echo "#include \"gudevmarshal.h\"" > $@ && \ + glib-genmarshal $< --prefix=g_udev_marshal --body >> $@ + +extras/gudev/gudevenumtypes.h: extras/gudev/gudevenumtypes.h.template extras/gudev/gudevenums.h + glib-mkenums --template $^ > \ + gudevenumtypes.h.tmp && mv gudevenumtypes.h.tmp gudevenumtypes.h + +extras/gudev/gudevenumtypes.c: extras/gudev/gudevenumtypes.c.template extras/gudev/gudevenums.h + glib-mkenums --template $^ > \ + gudevenumtypes.c.tmp && mv gudevenumtypes.c.tmp gudevenumtypes.c + +extras/gudev/GUdev-1.0.gir: extras/gudev/libgudev-1.0.la $(G_IR_SCANNER) Makefile.am + PKG_CONFIG_PATH=$(top_builddir)/data:$$PKG_CONFIG_PATH \ + $(G_IR_SCANNER) -v \ + --namespace GUdev \ + --nsversion=1.0 \ + --include=GObject-2.0 \ + --library=gudev-1.0 \ + --output $@ \ + --pkg=glib-2.0 \ + --pkg=gobject-2.0 \ + -I$(top_srcdir)/extras \ + -D_GUDEV_COMPILATION \ + -DG_UDEV_API_IS_SUBJECT_TO_CHANGE \ + $(top_srcdir)/extras/gudev/gudev.h \ + $(top_srcdir)/extras/gudev/gudevtypes.h \ + $(top_srcdir)/extras/gudev/gudevenums.h \ + $(top_srcdir)/extras/gudev/gudevenumtypes.h \ + $(top_srcdir)/extras/gudev/gudevclient.h \ + $(top_srcdir)/extras/gudev/gudevdevice.h \ + $(top_srcdir)/extras/gudev/gudevclient.c \ + $(top_srcdir)/extras/gudev/gudevdevice.c + +extras/gudev/GUdev-1.0.typelib: extras/gudev/GUdev-1.0.gir $(G_IR_COMPILER) + g-ir-compiler $< -o $@ diff --git a/configure.ac b/configure.ac index 83e7a052fe..a38fd82075 100644 --- a/configure.ac +++ b/configure.ac @@ -105,7 +105,6 @@ AC_CONFIG_FILES([ libudev/docs/Makefile libudev/docs/version.xml udev/udev.pc - extras/gudev/Makefile extras/gudev/gudev-1.0.pc extras/gudev/docs/Makefile extras/gudev/docs/version.xml diff --git a/extras/gudev/Makefile.am b/extras/gudev/Makefile.am deleted file mode 100644 index 71565e2a48..0000000000 --- a/extras/gudev/Makefile.am +++ /dev/null @@ -1,115 +0,0 @@ -include $(top_srcdir)/Makefile.am.inc - -# putting ‘.’ first causes prefix ordering of directories -SUBDIRS = \ - . \ - docs - -AM_CPPFLAGS += \ - -I$(top_builddir)/extras \ - -I$(top_srcdir)/extras \ - -I$(top_builddir)/extras/gudev \ - -I$(top_srcdir)/extras/gudev \ - -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \ - -D_GUDEV_COMPILATION \ - -DG_UDEV_API_IS_SUBJECT_TO_CHANGE \ - -DG_LOG_DOMAIN=\"GUdev\" - -BUILT_SOURCES = \ - gudevmarshal.h gudevmarshal.c \ - gudevenumtypes.h gudevenumtypes.c - -gudevmarshal.h: gudevmarshal.list - glib-genmarshal $< --prefix=g_udev_marshal --header > $@ - -gudevmarshal.c: gudevmarshal.list - echo "#include \"gudevmarshal.h\"" > $@ && \ - glib-genmarshal $< --prefix=g_udev_marshal --body >> $@ - -gudevenumtypes.h: $(srcdir)/gudevenumtypes.h.template gudevenums.h - glib-mkenums --template $(srcdir)/gudevenumtypes.h.template gudevenums.h > \ - gudevenumtypes.h.tmp && mv gudevenumtypes.h.tmp gudevenumtypes.h - -gudevenumtypes.c: $(srcdir)/gudevenumtypes.c.template gudevenums.h - glib-mkenums --template $(srcdir)/gudevenumtypes.c.template gudevenums.h > \ - gudevenumtypes.c.tmp && mv gudevenumtypes.c.tmp gudevenumtypes.c - -lib_LTLIBRARIES = libgudev-1.0.la - -libgudev_1_0_includedir=$(includedir)/gudev-1.0/gudev -libgudev_1_0_include_HEADERS = \ - gudev.h \ - gudevenums.h \ - gudevenumtypes.h \ - gudevtypes.h \ - gudevclient.h \ - gudevdevice.h - -libgudev_1_0_la_SOURCES = \ - gudevenums.h \ - gudevenumtypes.h gudevenumtypes.h\ - gudevtypes.h \ - gudevclient.h gudevclient.c \ - gudevdevice.h gudevdevice.c \ - gudevprivate.h \ - $(BUILT_SOURCES) - -libgudev_1_0_la_CFLAGS = $(GLIB_CFLAGS) - -libgudev_1_0_la_LIBADD = $(top_builddir)/libudev/libudev.la $(GLIB_LIBS) - -LT_CURRENT=0 -LT_REVISION=1 -LT_AGE=0 -libgudev_1_0_la_LDFLAGS = \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ - -export-dynamic -no-undefined \ - -export-symbols-regex '^g_udev_.*' - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = gudev-1.0.pc - -EXTRA_DIST = \ - gudev-1.0.pc.in \ - gudevmarshal.list \ - gudevenumtypes.h.template \ - gudevenumtypes.c.template - -CLEANFILES = $(BUILT_SOURCES) - -if ENABLE_INTROSPECTION -GUdev-1.0.gir: libgudev-1.0.la $(G_IR_SCANNER) Makefile.am - PKG_CONFIG_PATH=$(top_builddir)/data:$$PKG_CONFIG_PATH \ - $(G_IR_SCANNER) -v \ - --namespace GUdev \ - --nsversion=1.0 \ - --include=GObject-2.0 \ - --library=gudev-1.0 \ - --output $@ \ - --pkg=glib-2.0 \ - --pkg=gobject-2.0 \ - -I$(top_srcdir)/extras \ - -D_GUDEV_COMPILATION \ - -DG_UDEV_API_IS_SUBJECT_TO_CHANGE \ - $(top_srcdir)/extras/gudev/gudev.h \ - $(top_srcdir)/extras/gudev/gudevtypes.h \ - $(top_srcdir)/extras/gudev/gudevenums.h \ - $(top_srcdir)/extras/gudev/gudevenumtypes.h \ - $(top_srcdir)/extras/gudev/gudevclient.h \ - $(top_srcdir)/extras/gudev/gudevdevice.h \ - $(top_srcdir)/extras/gudev/gudevclient.c \ - $(top_srcdir)/extras/gudev/gudevdevice.c - -girdir = $(GIRDIR) -gir_DATA = GUdev-1.0.gir - -typelibsdir = $(GIRTYPELIBDIR) -typelibs_DATA = GUdev-1.0.typelib - -GUdev-1.0.typelib: GUdev-1.0.gir $(G_IR_COMPILER) - g-ir-compiler GUdev-1.0.gir -o GUdev-1.0.typelib - -EXTRA_DIST += GUdev-1.0.gir -CLEANFILES += $(gir_DATA) $(typelibs_DATA) - -endif # ENABLE_INTROSPECTION -- cgit v1.2.3-54-g00ecf