[valencia] Makefile can target diff. versions of valac/libvala: Closes bgo#724249



commit a668a7bca5c431d42d356875e141390512f7c33e
Author: Jim Nelson <jim yorba org>
Date:   Tue Feb 18 12:38:18 2014 -0800

    Makefile can target diff. versions of valac/libvala: Closes bgo#724249
    
    VALAC and LIBVALA environment variables respected by Makefile.

 INSTALL  |   11 +++++++++--
 Makefile |   11 +++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/INSTALL b/INSTALL
index bec2449..8e28451 100644
--- a/INSTALL
+++ b/INSTALL
@@ -10,9 +10,16 @@ To build and install Valencia, type the following commands:
 Do *not* make install as root; Valencia installs in your ~/.gnome2/gedit 
 directory, and if you install as root the file permissions will be wrong.
 
+Valencia defaults to a specific version of Vala when building (depending on
+the last time Valencia was updated).  If you wish to build Valencia against
+a specific verison of Vala, use the VALAC and LIBVALA environment variables.
+For example:
+
+    $ VALAC=valac-0.20 LIBVALA=libvala-0.20 make
+
 To enable Valencia in gedit, select Edit->Preferences and the click on the 
-Plugins tab. Find Valencia in the plugin list and check its checkbox, then click
-Close.
+Plugins tab. Find Valencia in the plugin list and check its checkbox, then
+click Close.
 
 Copyright 2009-2014 Yorba Foundation
 
diff --git a/Makefile b/Makefile
index 3bd2d28..2e6ecfd 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,14 @@ PLUGIN = valencia
 # The version number appears here and also in valencia.plugin.
 VERSION = 0.5.0
 
+ifndef VALAC
 VALAC = valac
+endif
+
+ifndef LIBVALA
+LIBVALA=libvala-0.24
+endif
+
 VALAC_VERSION := `$(VALAC) --version | awk '{print $$2}'`
 MIN_VALAC_VERSION := 0.20.1
 
@@ -11,14 +18,14 @@ SOURCES = autocomplete.vala browser.vala expression.vala gtk_util.vala parser.va
           scanner.vala settings.vala util.vala valencia.vala
  
 PACKAGES = --pkg gedit --pkg gee-0.8 --pkg gtk+-3.0 --pkg gtksourceview-3.0 \
-           --pkg libpeas-1.0 --pkg libvala-0.24 --pkg vte-2.90
+           --pkg libpeas-1.0 --pkg $(LIBVALA) --pkg vte-2.90
 
 PACKAGE_VERSIONS = \
     gedit >= 2.91.0 \
     gee-0.8 >= 0.8.6 \
     gtksourceview-3.0 >= 3.0.0 \
     gtk+-3.0 >= 3.0.0 \
-    libvala-0.24 >= 0.23.1 \
+    $(LIBVALA) \
     vte-2.90 >= 0.27.90
 
 OUTPUTS = libvalencia.so valencia.plugin


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