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"
" -v, --version print node's version\n"
" --libs print linker flags for modules\n"
" --cflags print pre-processor and compiler flags\n"
" --v8-options print v8 command line options\n");
}
@ -334,18 +333,14 @@ PrintHelp ( )
static void
ParseArgs (int *argc, char **argv)
{
bool cflags = false, libs = false;
for (int i = 1; i < *argc; i++) {
const char *arg = argv[i];
if (strcmp(arg, "--version") == 0 || strcmp(arg, "-v") == 0) {
printf("%s\n", NODE_VERSION);
exit(0);
} else if (strcmp(arg, "--cflags") == 0) {
cflags = true;
continue;
} else if (strcmp(arg, "--libs") == 0) {
libs = true;
continue;
printf("%s\n", NODE_CFLAGS);
exit(0);
} else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {
PrintHelp();
exit(0);
@ -353,21 +348,6 @@ ParseArgs (int *argc, char **argv)
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

2
src/node.pc.in

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

1
src/node_version.h.in

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

Loading…
Cancel
Save