Skip to content
This repository

Showing 2 changed files with 102 additions and 99 deletions. Show diff stats Hide diff stats

  1. 115  configure
  2. 86  configure-gyp
115  configure
... ...
@@ -1,104 +1,21 @@
1  
-#!/usr/bin/env python
  1
+#! /bin/sh
2 2
 
3  
-import optparse
4  
-import os
5  
-import sys
6  
-import json
  3
+# v8 doesn't like ccache
  4
+if [ ! -z "`echo $CC | grep ccache`" ]; then
  5
+  echo "Error: V8 doesn't like cache. Please set your CC env var to 'gcc'"
  6
+  echo "  (ba)sh: export CC=gcc"
  7
+  exit 1
  8
+fi
7 9
 
8  
-root_dir = os.path.dirname(__file__)
9  
-os.chdir(root_dir)
  10
+CUR_DIR=$PWD
10 11
 
11  
-use_gyp = False
  12
+#possible relative path
  13
+WORKINGDIR=`dirname $0`
  14
+cd "$WORKINGDIR"
  15
+#abs path
  16
+WORKINGDIR=`pwd`
  17
+cd "$CUR_DIR"
12 18
 
13  
-for a in sys.argv:
14  
-  if a == '--use-gyp':
15  
-    use_gyp = True
16  
-    break
17  
-
18  
-# Default to the old WAF system
19  
-if not use_gyp:
20  
-  r = os.system("./tools/waf-light --jobs=1 configure " + ' '.join(sys.argv[1:]))
21  
-  exit(r)
22  
-
23  
-# GYP specific configure script
24  
-
25  
-# parse our options
26  
-parser = optparse.OptionParser()
27  
-
28  
-parser.add_option("--use-gyp", action="store_true", help="placeholder")
29  
-
30  
-parser.add_option("--debug", action="store_true", dest="debug",
31  
-    default=False, help="Also build debug build")
32  
-
33  
-parser.add_option("--prefix", action="store", dest="prefix",
34  
-    help="Select the install prefix (defaults to /usr/local)")
35  
-
36  
-# TODO options to support for backwards compatibility
37  
-#
38  
-#  --without-snapshot
39  
-#    Build without snapshotting V8 libraries. You might want to set this for
40  
-#    cross-compiling.  [Default: False]
41  
-#
42  
-#  --without-ssl
43  
-#    Build without SSL
44  
-#
45  
-#  --shared-v8
46  
-#    Link to a shared V8 DLL instead of static linking
47  
-#
48  
-#  --shared-v8-includes=SHARED_V8_INCLUDES
49  
-#    Directory containing V8 header files
50  
-#
51  
-#  --shared-v8-libpath=SHARED_V8_LIBPATH
52  
-#    A directory to search for the shared V8 DLL
53  
-#
54  
-#  --shared-v8-libname=SHARED_V8_LIBNAME
55  
-#    Alternative lib name to link to (default: 'v8')
56  
-#
57  
-#  --openssl-includes=OPENSSL_INCLUDES
58  
-#    A directory to search for the OpenSSL includes
59  
-#
60  
-#  --openssl-libpath=OPENSSL_LIBPATH
61  
-#    A directory to search for the OpenSSL libraries
62  
-#
63  
-#  --no-ssl2
64  
-#    Disable OpenSSL v2
65  
-#
66  
-#  --gdb
67  
-#    add gdb support
68  
-#
69  
-#  --shared-cares
70  
-#    Link to a shared C-Ares DLL instead of static linking
71  
-#
72  
-#  --shared-cares-includes=SHARED_CARES_INCLUDES
73  
-#    Directory containing C-Ares header files
74  
-#
75  
-#  --shared-cares-libpath=SHARED_CARES_LIBPATH
76  
-#    A directory to search for the shared C-Ares DLL
77  
-#
78  
-#  --with-dtrace
79  
-#    Build with DTrace (experimental)
80  
-#
81  
-#  --dest-cpu=DEST_CPU
82  
-#    CPU architecture to build for. Valid values are: arm, ia32, x64
83  
-
84  
-
85  
-(options, args) = parser.parse_args()
86  
-
87  
-print "configure options:", options
88  
-
89  
-output = {
90  
-  'variables': {
91  
-    'node_debug': 'true' if options.debug else 'false',
92  
-    'node_prefix': options.prefix if options.prefix else ''
93  
-  }
94  
-}
95  
-
96  
-fn = os.path.join(root_dir, 'options.gypi')
97  
-print "creating ", fn
98  
-
99  
-f = open(fn, 'w+')
100  
-f.write("# Do not edit. Generated by the configure script.\n")
101  
-json.dump(output, f, indent=2, skipkeys=True)
102  
-f.write("\n")
103  
-f.close()
  19
+"${WORKINGDIR}/tools/waf-light" --jobs=1 configure $*
104 20
 
  21
+exit $?
86  configure-gyp
... ...
@@ -0,0 +1,86 @@
  1
+#!/usr/bin/env python
  2
+
  3
+import optparse
  4
+import os
  5
+import json
  6
+
  7
+root_dir = os.path.dirname(__file__)
  8
+
  9
+# parse our options
  10
+parser = optparse.OptionParser()
  11
+
  12
+parser.add_option("--debug", action="store_true", dest="debug",
  13
+    default=False, help="Also build debug build")
  14
+
  15
+parser.add_option("--prefix", action="store", dest="prefix",
  16
+    help="Select the install prefix (defaults to /usr/local)")
  17
+
  18
+# TODO options to support for backwards compatibility
  19
+#
  20
+#  --without-snapshot
  21
+#    Build without snapshotting V8 libraries. You might want to set this for
  22
+#    cross-compiling.  [Default: False]
  23
+#
  24
+#  --without-ssl
  25
+#    Build without SSL
  26
+#
  27
+#  --shared-v8
  28
+#    Link to a shared V8 DLL instead of static linking
  29
+#
  30
+#  --shared-v8-includes=SHARED_V8_INCLUDES
  31
+#    Directory containing V8 header files
  32
+#
  33
+#  --shared-v8-libpath=SHARED_V8_LIBPATH
  34
+#    A directory to search for the shared V8 DLL
  35
+#
  36
+#  --shared-v8-libname=SHARED_V8_LIBNAME
  37
+#    Alternative lib name to link to (default: 'v8')
  38
+#
  39
+#  --openssl-includes=OPENSSL_INCLUDES
  40
+#    A directory to search for the OpenSSL includes
  41
+#
  42
+#  --openssl-libpath=OPENSSL_LIBPATH
  43
+#    A directory to search for the OpenSSL libraries
  44
+#
  45
+#  --no-ssl2
  46
+#    Disable OpenSSL v2
  47
+#
  48
+#  --gdb
  49
+#    add gdb support
  50
+#
  51
+#  --shared-cares
  52
+#    Link to a shared C-Ares DLL instead of static linking
  53
+#
  54
+#  --shared-cares-includes=SHARED_CARES_INCLUDES
  55
+#    Directory containing C-Ares header files
  56
+#
  57
+#  --shared-cares-libpath=SHARED_CARES_LIBPATH
  58
+#    A directory to search for the shared C-Ares DLL
  59
+#
  60
+#  --with-dtrace
  61
+#    Build with DTrace (experimental)
  62
+#
  63
+#  --dest-cpu=DEST_CPU
  64
+#    CPU architecture to build for. Valid values are: arm, ia32, x64
  65
+
  66
+
  67
+(options, args) = parser.parse_args()
  68
+
  69
+print "configure options:", options
  70
+
  71
+output = {
  72
+  'variables': {
  73
+    'node_debug': 'true' if options.debug else 'false',
  74
+    'node_prefix': options.prefix if options.prefix else ''
  75
+  }
  76
+}
  77
+
  78
+fn = os.path.join(root_dir, 'options.gypi')
  79
+print "creating ", fn
  80
+
  81
+f = open(fn, 'w+')
  82
+f.write("# Do not edit. Generated by the configure script.\n")
  83
+json.dump(output, f, indent=2, skipkeys=True)
  84
+f.write("\n")
  85
+f.close()
  86
+

0 notes on commit 9e5cd01

Please sign in to comment.
Something went wrong with that request. Please try again.