Browse Source

Remove --lib option since there is no more libnode

v0.7.4-release
Ryan 16 years ago
parent
commit
ed9c3362ee
  1. 24
      src/node.cc
  2. 2
      src/node.pc.in
  3. 1
      src/node_version.h.in

24
src/node.cc

@ -326,7 +326,6 @@ PrintHelp ( )
{ {
printf("Usage: node [switches] script.js [arguments] \n" printf("Usage: node [switches] script.js [arguments] \n"
" -v, --version print node's version\n" " -v, --version print node's version\n"
" --libs print linker flags for modules\n"
" --cflags print pre-processor and compiler flags\n" " --cflags print pre-processor and compiler flags\n"
" --v8-options print v8 command line options\n"); " --v8-options print v8 command line options\n");
} }
@ -334,18 +333,14 @@ PrintHelp ( )
static void static void
ParseArgs (int *argc, char **argv) ParseArgs (int *argc, char **argv)
{ {
bool cflags = false, libs = false;
for (int i = 1; i < *argc; i++) { for (int i = 1; i < *argc; i++) {
const char *arg = argv[i]; const char *arg = argv[i];
if (strcmp(arg, "--version") == 0 || strcmp(arg, "-v") == 0) { if (strcmp(arg, "--version") == 0 || strcmp(arg, "-v") == 0) {
printf("%s\n", NODE_VERSION); printf("%s\n", NODE_VERSION);
exit(0); exit(0);
} else if (strcmp(arg, "--cflags") == 0) { } else if (strcmp(arg, "--cflags") == 0) {
cflags = true; printf("%s\n", NODE_CFLAGS);
continue; exit(0);
} else if (strcmp(arg, "--libs") == 0) {
libs = true;
continue;
} else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) { } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {
PrintHelp(); PrintHelp();
exit(0); exit(0);
@ -353,21 +348,6 @@ ParseArgs (int *argc, char **argv)
argv[i] = (char*)"--help"; argv[i] = (char*)"--help";
} }
} }
/* XXX Wow this is terrible code. */
bool should_exit = false;
if (cflags) {
should_exit = true;
printf("%s ", NODE_CFLAGS);
}
if (libs) {
should_exit = true;
printf("%s ", NODE_LIBFLAGS);
}
if (should_exit) {
printf("\n");
exit(0);
}
} }
int int

2
src/node.pc.in

@ -1,9 +1,7 @@
prefix=@PREFIX@ prefix=@PREFIX@
libdir=${prefix}/lib
includedir=${prefix}/include/node includedir=${prefix}/include/node
Name: node Name: node
Description: v8 powered non-browser javascript Description: v8 powered non-browser javascript
Version: @VERSION@ Version: @VERSION@
Libs: @LIBFLAGS@ -R${libdir}
Cflags: @CCFLAGS@ @CPPFLAGS@ -I${includedir} Cflags: @CCFLAGS@ @CPPFLAGS@ -I${includedir}

1
src/node_version.h.in

@ -7,6 +7,5 @@
# define NODE_VERSION "@VERSION@ (debug)" # define NODE_VERSION "@VERSION@ (debug)"
#endif #endif
#define NODE_CFLAGS "@CCFLAGS@ @CPPFLAGS@ -I@PREFIX@/include/node" #define NODE_CFLAGS "@CCFLAGS@ @CPPFLAGS@ -I@PREFIX@/include/node"
#define NODE_LIBFLAGS "@LIBFLAGS@ -R@PREFIX@/lib"
#endif /* node_version_h */ #endif /* node_version_h */

Loading…
Cancel
Save