extensions: Fix substitution of paths into Seed.js
authorTim Horton <hortont424@gmail.com>
Thu, 31 Dec 2009 10:36:09 +0000 (05:36 -0500)
committerTim Horton <hortont424@gmail.com>
Thu, 31 Dec 2009 10:36:09 +0000 (05:36 -0500)
This fixes the failure to find native modules when installing to unexpected
prefixes.

configure.ac
extensions/Makefile.am
extensions/Seed.js.in

index aaa3718..b184519 100644 (file)
@@ -377,7 +377,6 @@ doc/mapping/mapping.html
 libseed/Makefile
 po/Makefile.in
 src/Makefile
-extensions/Seed.js
 extensions/Makefile
 tests/Makefile
 tests/javascript/Makefile
index 64ae652..2ead093 100644 (file)
@@ -5,3 +5,6 @@ extension_DATA = Gio.js Seed.js Gtk.js GObject.js Clutter.js Gst.js
 
 repldir=$(datadir)/seed
 repl_DATA = repl.js
+
+Seed.js: Seed.js.in
+       $(AM_V_GEN) $(SED) -e "s|%pkglibdir%|$(pkglibdir)|" -e "s|%pkgdatadir%|$(pkgdatadir)|" $< > $@
\ No newline at end of file
index 0740bd0..93671cb 100644 (file)
@@ -174,8 +174,8 @@ Seed.printf = function () { print(Seed.sprintf.apply(this, arguments)) };
 if(!imports.searchPath || (imports.searchPath.length == 0))
 {
        imports.searchPath = [ "@GNOME_JS_DIR@",
-                              "@libdir@/seed",
-                              "@prefix@/share/seed",
+                              "%pkglibdir%",
+                              "%pkgdatadir%",
                               "/usr/local/lib/seed",
                               "/usr/local/share/seed",
                               "/usr/lib/seed",