[darwinbuild-changes] [46] trunk/darwinxref

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 4 01:41:34 PDT 2006


Revision: 46
          http://trac.macosforge.org/projects/darwinbuild/changeset/46
Author:   kevin
Date:     2006-10-04 01:41:33 -0700 (Wed, 04 Oct 2006)

Log Message:
-----------
- added DARWINXREF_DB_FILE env var and DEFAULT_DB_FILE cpp macro

Modified Paths:
--------------
    trunk/darwinxref/Makefile
    trunk/darwinxref/main.c

Modified: trunk/darwinxref/Makefile
===================================================================
--- trunk/darwinxref/Makefile	2005-07-09 00:11:42 UTC (rev 45)
+++ trunk/darwinxref/Makefile	2006-10-04 08:41:33 UTC (rev 46)
@@ -9,7 +9,9 @@
 PLUGIN_OBJECTS=$(wildcard plugins/*.so) $(wildcard plugins/*.tcl)
 
 ### todo: --with-plugin-path configuration
-CFLAGS+=-DDEFAULT_PLUGIN_PATH=\"$(DATDIR)/plugins\"
+CFLAGS+= \
+	-DDEFAULT_DB_FILE=\".xref.db\" \
+	-DDEFAULT_PLUGIN_PATH=\"$(DATDIR)/plugins\"
 
 ### todo: --with-tcl-plugins configuration
 TCL_CFLAGS=-DHAVE_TCL_PLUGINS=1

Modified: trunk/darwinxref/main.c
===================================================================
--- trunk/darwinxref/main.c	2005-07-09 00:11:42 UTC (rev 45)
+++ trunk/darwinxref/main.c	2006-10-04 08:41:33 UTC (rev 46)
@@ -49,13 +49,12 @@
 
 int main(int argc, char* argv[]) {
 	char* progname = argv[0];
-	char* dbfile = "/var/tmp/darwinxref.db";
+	char* dbfile = getenv("DARWINXREF_DB_FILE");
 	char* build = getenv("DARWINBUILD_BUILD");
 	const char* plugins = getenv("DARWINXREF_PLUGIN_PATH");
 	
-	if (plugins == NULL) {
-		plugins = DEFAULT_PLUGIN_PATH;
-	}
+	if (dbfile == NULL) dbfile = DEFAULT_DB_FILE;
+	if (plugins == NULL) plugins = DEFAULT_PLUGIN_PATH;
 
 	int ch;
 	while ((ch = getopt(argc, argv, "f:b:")) != -1) {

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20061004/b5215e97/attachment.html


More information about the darwinbuild-changes mailing list