[aravis] build: make API incompatible version parallel installable.



commit 4fe949845be8365469e28265689dd3472b2b1a88
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Mon Apr 18 10:13:06 2011 +0200

    build: make API incompatible version parallel installable.

 .gitignore                        |    2 +-
 Makefile.am                       |    7 ++++-
 aravis.pc.in                      |    4 +-
 configure.ac                      |    4 ++-
 docs/reference/aravis/Makefile.am |    4 +-
 src/.gitignore                    |    4 +-
 src/Makefile.am                   |   42 ++++++++++++++++++------------------
 tests/Makefile.am                 |    2 +-
 viewer/.gitignore                 |    2 +-
 viewer/Makefile.am                |   10 ++++----
 10 files changed, 43 insertions(+), 38 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 49df54a..ce94adc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,7 +11,7 @@
 Makefile
 Makefile.in
 aclocal.m4
-aravis.pc
+aravis-*.pc
 config.guess
 config.log
 config.status
diff --git a/Makefile.am b/Makefile.am
index 406becd..e54133e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,7 +12,7 @@ if ARAVIS_VIEWER
 SUBDIRS += viewer
 endif
 
-aravisdocdir = ${prefix}/doc/aravis
+aravisdocdir = ${prefix}/doc/aravis- ARAVIS_API_VERSION@
 aravisdoc_DATA = 	\
 	README		\
 	COPYING		\
@@ -32,4 +32,7 @@ dist-hook:
 	done
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = aravis.pc
+pkgconfig_DATA = aravis- ARAVIS_API_VERSION@.pc
+
+%- ARAVIS_API_VERSION@.pc: %.pc
+	cp $< $@
diff --git a/aravis.pc.in b/aravis.pc.in
index ba5db69..f4c8d15 100644
--- a/aravis.pc.in
+++ b/aravis.pc.in
@@ -7,5 +7,5 @@ Name: Aravis
 Description: Camera control and image acquisition library
 Version: @VERSION@
 Requires: glib-2.0 gobject-2.0
-Libs: -L${libdir} -laravis
-Cflags: -I${includedir}/aravis
+Libs: -L${libdir} -laravis- ARAVIS_API_VERSION@
+Cflags: -I${includedir}/aravis- ARAVIS_API_VERSION@
diff --git a/configure.ac b/configure.ac
index fbbd4da..2146a8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,8 @@ AC_CONFIG_MACRO_DIR([m4])
 
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
+AC_SUBST([ARAVIS_API_VERSION], [0.2])
+
 AC_SEARCH_LIBS([strerror],[cposix])
 AC_PROG_CC
 
@@ -85,7 +87,7 @@ else
 fi
 AC_SUBST(gstplugindir)
 
-AC_SUBST(aravis_datadir, '$(datadir)/aravis')
+AC_SUBST(aravis_datadir, '$(datadir)/aravis-$(ARAVIS_API_VERSION)')
 
 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
 AC_SUBST(GST_PLUGIN_LDFLAGS)
diff --git a/docs/reference/aravis/Makefile.am b/docs/reference/aravis/Makefile.am
index e8e5bf7..00b6d42 100644
--- a/docs/reference/aravis/Makefile.am
+++ b/docs/reference/aravis/Makefile.am
@@ -14,7 +14,7 @@ AUTOMAKE_OPTIONS = 1.6
 DOC_MODULE=aravis
 
 # Uncomment for versioned docs and specify the version of the module, e.g. '2'.
-#DOC_MODULE_VERSION=2
+DOC_MODULE_VERSION= ARAVIS_API_VERSION@
 
 
 # The top-level SGML file. You can change this if you want to.
@@ -86,7 +86,7 @@ expand_content_files= \
 # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
 # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
 GTKDOC_CFLAGS=-I$(top_srcdir)/src $(ARAVIS_CFLAGS)
-GTKDOC_LIBS=$(top_builddir)/src/libaravis.la $(ARAVIS_LIBS)
+GTKDOC_LIBS=$(top_builddir)/src/libaravis- ARAVIS_API_VERSION@.la $(ARAVIS_LIBS)
 
 # This includes the standard gtk-doc make rules, copied by gtkdocize.
 include $(top_srcdir)/gtk-doc.make
diff --git a/src/.gitignore b/src/.gitignore
index 85aedbd..6a677fd 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,5 +1,5 @@
-arv-fake-gv-camera
-arv-show-devices
+arv-fake-gv-camera-*.*
+arv-show-devices-*.*
 arvenumtypes.c
 arvenumtypes.h
 arvconfig.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 28f48fb..32e0479 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,17 +16,17 @@ INCLUDES = \
 
 AM_CFLAGS = -Wall
 
-lib_LTLIBRARIES = libaravis.la
+lib_LTLIBRARIES = libaravis- ARAVIS_API_VERSION@.la
 
 BUILT_SOURCES = arvenumtypes.h arvenumtypes.c
 
 EXTRA_DIST += arvenumtypes.h.template \
 	      arvenumtypes.c.template
 
-libaravis_la_LIBADD = 				\
+libaravis_ ARAVIS_API_VERSION@_la_LIBADD = 				\
 	$(ARAVIS_LIBS)
 
-libaravis_la_SOURCES =				\
+libaravis_ ARAVIS_API_VERSION@_la_SOURCES =				\
 	arvenums.c				\
 	arvenumtypes.c				\
 	arvdebug.c				\
@@ -110,38 +110,38 @@ arv_fake_camera_DATA = arv-fake-camera.xml
 
 EXTRA_DIST += arv-fake-camera.xml
 
-libaravis_ladir = $(includedir)/aravis
-libaravis_la_HEADERS = $(ARAVIS_HDRS)
-libaravis_la_HEADERS += arvenumtypes.h arvconfig.h
+libaravis_ ARAVIS_API_VERSION@_ladir = $(includedir)/aravis- ARAVIS_API_VERSION@
+libaravis_ ARAVIS_API_VERSION@_la_HEADERS = $(ARAVIS_HDRS)
+libaravis_ ARAVIS_API_VERSION@_la_HEADERS += arvenumtypes.h arvconfig.h
 
 arvenumtypes.h: arvenumtypes.h.template $(ARAVIS_HDRS) $(GLIB_MKENUMS)
-	$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template arvenumtypes.h.template $(libaravis_la_HEADERS)) > $@
+	$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template arvenumtypes.h.template $(libaravis_ ARAVIS_API_VERSION@_la_HEADERS)) > $@
 
 arvenumtypes.c: arvenumtypes.c.template $(ARAVIS_HDRS) $(GLIB_MKENUMS)
-	$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template arvenumtypes.c.template $(libaravis_la_HEADERS)) > $@
+	$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template arvenumtypes.c.template $(libaravis_ ARAVIS_API_VERSION@_la_HEADERS)) > $@
 
-bin_PROGRAMS = arv-fake-gv-camera arv-show-devices
+bin_PROGRAMS = arv-fake-gv-camera- ARAVIS_API_VERSION@ arv-show-devices- ARAVIS_API_VERSION@
 
-arv_fake_gv_camera_SOURCES = arvfakegvcamera.c
-arv_fake_gv_camera_LDADD = $(ARAVIS_LIBS) libaravis.la
+arv_fake_gv_camera_ ARAVIS_API_VERSION@_SOURCES = arvfakegvcamera.c
+arv_fake_gv_camera_ ARAVIS_API_VERSION@_LDADD = $(ARAVIS_LIBS) libaravis- ARAVIS_API_VERSION@.la
 
-arv_show_devices_SOURCES = arvshowdevices.c
-arv_show_devices_LDADD = $(ARAVIS_LIBS) libaravis.la
+arv_show_devices_ ARAVIS_API_VERSION@_SOURCES = arvshowdevices.c
+arv_show_devices_ ARAVIS_API_VERSION@_LDADD = $(ARAVIS_LIBS) libaravis- ARAVIS_API_VERSION@.la
 
 CLEANFILES = $(BUILT_SOURCES)
 
 if HAVE_INTROSPECTION
 
-introspection_files = $(libaravis_la_SOURCES) \
+introspection_files = $(libaravis_ ARAVIS_API_VERSION@_la_SOURCES) \
 		      $(ARAVIS_HDRS)
 
-Aravis-1.0.gir: $(INTROSPECTION_SCANNER) libaravis.la Makefile
-Aravis_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0
-Aravis_1_0_gir_SCANNERFLAGS = --identifier-prefix=Arv
-Aravis_1_0_gir_CFLAGS = $(INCLUDES) -I$(top_srcdir)/src
-Aravis_1_0_gir_LIBS = libaravis.la
-Aravis_1_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_files))
-INTROSPECTION_GIRS += Aravis-1.0.gir
+Aravis- ARAVIS_API_VERSION@.gir: $(INTROSPECTION_SCANNER)
+Aravis_0_2_gir_INCLUDES = GObject-2.0 Gio-2.0
+Aravis_0_2_gir_SCANNERFLAGS = --identifier-prefix=Arv
+Aravis_0_2_gir_CFLAGS = $(INCLUDES) -I$(top_srcdir)/src
+Aravis_0_2_gir_LIBS = libaravis- ARAVIS_API_VERSION@.la
+Aravis_0_2_gir_FILES = $(addprefix $(srcdir)/,$(introspection_files))
+INTROSPECTION_GIRS += Aravis- ARAVIS_API_VERSION@.gir
 
 girdir = $(datadir)/gir-1.0
 dist_gir_DATA = $(INTROSPECTION_GIRS)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index deca643..6e05b26 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
 INCLUDES = -g -I$(top_srcdir)/src/ $(ARAVIS_EXTRA_CFLAGS)
 
 test_progs_ldadd = 					\
-	$(top_builddir)/src/libaravis.la		\
+	$(top_builddir)/src/libaravis- ARAVIS_API_VERSION@.la		\
 	$(ARAVIS_EXTRA_LIBS)
 
 noinst_PROGRAMS = arv-test arv-genicam-test arv-evaluator-test arv-zip-test arv-camera-test
diff --git a/viewer/.gitignore b/viewer/.gitignore
index c0e04c2..f1d72a1 100644
--- a/viewer/.gitignore
+++ b/viewer/.gitignore
@@ -1 +1 @@
-arv-viewer
+arv-viewer-*.*
diff --git a/viewer/Makefile.am b/viewer/Makefile.am
index c9f2893..c0a2896 100644
--- a/viewer/Makefile.am
+++ b/viewer/Makefile.am
@@ -12,15 +12,15 @@ INCLUDES = \
 
 AM_CFLAGS = -Wall -lm
 
-bin_PROGRAMS = arv-viewer
+bin_PROGRAMS = arv-viewer- ARAVIS_API_VERSION@
 
-arv_viewer_SOURCES = arvviewer.c	\
+arv_viewer_ ARAVIS_API_VERSION@_SOURCES = arvviewer.c	\
 		     arvfeaturewidget.c \
 		     arvfeaturewidget.h
 
-arv_viewer_LDADD = $(ARAVIS_EXTRA_LIBS) $(top_builddir)/src/libaravis.la
-arv_viewerdir = $(aravis_datadir)
-arv_viewer_DATA = arv-viewer.ui
+arv_viewer_ ARAVIS_API_VERSION@_LDADD = $(ARAVIS_EXTRA_LIBS) $(top_builddir)/src/libaravis- ARAVIS_API_VERSION@.la
+arv_viewer_ ARAVIS_API_VERSION@dir = $(aravis_datadir)
+arv_viewer_ ARAVIS_API_VERSION@_DATA = arv-viewer.ui
 
 EXTRA_DIST += $(arv_viewer_DATA)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]