Permalink
Browse files

Define CHICKENLIBHOME on the tool.

darcs-hash:20051102161203-71b0c-eec83153077433500fee44111f9e7e0acb170246.gz
  • Loading branch information...
1 parent 7801c7f commit 2ba91fc68dec3493a14f6e65e7653648df50c3de @pupeno committed Nov 2, 2005
Showing with 7 additions and 9 deletions.
  1. +4 −2 chicken.py
  2. +3 −7 examples/library/SConstruct
View
@@ -8,6 +8,8 @@
# You should have received a copy of the GNU General Public License along with scons-chicken; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
import SCons.Tool
+import os
+from string import strip
def generate(env):
c_file, cxx_file = SCons.Tool.createCFileBuilders(env)
@@ -17,8 +19,8 @@ def generate(env):
env['CHICKEN'] = env.Detect('chicken') or 'chicken'
env['CHICKENFLAGS'] = SCons.Util.CLVar('')
env['CHICKENCOM'] = '$CHICKEN $SOURCE -output-file $TARGET'
-
-
+
+ env['CHICKENLIBHOME'] = strip(os.popen('chicken-config -lib-home').read().split('=', 1)[1]) + '/'
def exists(env):
return env.Detect(['chicken'])
@@ -7,15 +7,11 @@
# scons-chicken is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along with scons-chicken; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-import os
-from string import strip
-
-lib = Environment(tools = ['default', 'chicken'], toolpath = ['../'])
+lib = Environment(tools = ['default', 'chicken'], toolpath = ['../../'])
lib.ParseConfig('chicken-config -libs -cflags -shared')
scle = lib.SharedLibrary('scons-chicken-library-example.scm', SHLIBPREFIX = '')
-chickenLibHome = strip(os.popen('chicken-config -lib-home').read().split('=', 1)[1]) + '/'
-lib.Install(chickenLibHome, scle)
-lib.Alias('install', chickenLibHome)
+lib.Install(lib['CHICKENLIBHOME'], scle)
+lib.Alias('install', lib['CHICKENLIBHOME'])

0 comments on commit 2ba91fc

Please sign in to comment.