Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Remove --lib option since there is no more libnode
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Sep 1, 2009
1 parent 8152f9c commit ed9c336
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
24 changes: 2 additions & 22 deletions src/node.cc
Expand Up @@ -326,48 +326,28 @@ 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");
}

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);
} else if (strcmp(arg, "--v8-options") == 0) {
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
Expand Down
2 changes: 0 additions & 2 deletions 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 change: 0 additions & 1 deletion src/node_version.h.in
Expand Up @@ -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 */

0 comments on commit ed9c336

Please sign in to comment.