From: Adam Dickmeiss Date: Tue, 9 Jan 1996 10:46:48 +0000 (+0000) Subject: New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile. X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=129b920a3019c8cfcb8ed37b20b1b49fd557b100;p=egate.git New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile. --- diff --git a/www/Makefile b/www/Makefile index 7b2a2b5..8f8307b 100644 --- a/www/Makefile +++ b/www/Makefile @@ -2,7 +2,10 @@ # Europagate, 1995 # # $Log: Makefile,v $ -# Revision 1.20 1996/01/03 15:19:35 adam +# Revision 1.21 1996/01/09 10:46:48 adam +# New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile. +# +# Revision 1.20 1996/01/03 15:19:35 adam # Improved history. # Better working scan. # New maintanance function to print contact info, etc. @@ -79,7 +82,7 @@ SHELL=/bin/sh # ZDEFS= #ZINC=-I../../yaz/include -ZLIB=-lyaz +ZLIB=../../yaz/lib/libyaz.a MOSILIB=../../xtimosi/src/libmosi.a -lrfc LIBIRTCL=/usr/local/lib/libirtcl.a $(ZLIB) $(MOSILIB) #NETLIB=-lnsl -lsocket @@ -98,16 +101,19 @@ P1=wcgi.o P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o P3=wproto.o wtest.o CPP=$(CC) -E -# -INCLUDE=-I../include $(ZINC) -DEFS=$(INCLUDE) $(ZDEFS) HTTPDDIR=/usr/local/etc/httpd -CGIBIN=$(HTTPDDIR)/cgi-bin +CGIDIR=$(HTTPDDIR)/cgi-bin HTDOCS=$(HTTPDDIR)/htdocs CONFDIR=$(HTTPDDIR)/conf +EGWDIR=$(HTTPDDIR)/egw +LOGDIR=$(HTTPDDIR)/egw GIFDIR=$(HTDOCS)/gif +INCLUDE=-I../include $(ZINC) +DEFS=$(INCLUDE) $(ZDEFS) -DCGIDIR=\"$(CGIDIR)\" -DEGWDIR=\"$(EGWDIR)\" \ + -DLOGDIR=\"$(LOGDIR)\" + all: $(TPROG1) $(TPROG2) $(TPROG1): $(P1) @@ -125,18 +131,22 @@ install: install.prog install.script install.prog: $(TPROG1) $(TPROG2) @for x in $(TPROG1) $(TPROG2); do \ echo Installing $$x; \ - cp $$x $(CGIBIN); \ - chmod +x $(CGIBIN)/$$x; \ + cp $$x $(CGIDIR); \ + chmod +x $(CGIDIR)/$$x; \ done; \ for p in egwtcl egwirtcl egwhtml; do \ - rm -f $(CGIBIN)/$$p; \ - ln $(CGIBIN)/$(TPROG2) $(CGIBIN)/$$p; \ + rm -f $(CGIDIR)/$$p; \ + ln $(CGIDIR)/$(TPROG2) $(CGIDIR)/$$p; \ done install.script: + @if [ ! -d $(EGWDIR) ]; then \ + echo "Making directory $(EGWDIR)"; \ + mkdir $(EGWDIR); \ + fi @for x in $(WSCRIPTS); do \ echo Installing $$x; \ - cp $$x $(CGIBIN); \ + cp $$x $(EGWDIR)/$$x; \ done @for x in $(HSCRIPTS); do \ echo Installing $$x; \ diff --git a/www/wcgi.c b/www/wcgi.c index 722d109..9653642 100644 --- a/www/wcgi.c +++ b/www/wcgi.c @@ -41,7 +41,10 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. * * $Log: wcgi.c,v $ - * Revision 1.11 1996/01/08 08:42:19 adam + * Revision 1.12 1996/01/09 10:46:49 adam + * New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile. + * + * Revision 1.11 1996/01/08 08:42:19 adam * Handles method GET. * * Revision 1.10 1996/01/05 16:21:20 adam @@ -100,8 +103,6 @@ the server, please reload the server's 'front page'." #include #include "wproto.h" -#define CGIDIR "/usr/local/etc/httpd/cgi-bin" - static char *prog = "cgi"; static char serverp[256] = {'\0'}; @@ -170,7 +171,7 @@ int main() chdir ("/usr/local/etc/httpd/cgi-bin"); gw_log_init ("egw"); - gw_log_file (GW_LOG_ALL, "/usr/local/etc/httpd/logs/egwcgi_log"); + gw_log_file (GW_LOG_ALL, LOGDIR "/egwcgi_log"); gw_log_level (GW_LOG_ALL); gw_log (GW_LOG_STAT, prog, "Europagate www cgi server"); @@ -207,7 +208,7 @@ int main() path_info++; if (*path_info) *(path_info++) = '\0'; - if (!(gw_db = gw_db_open ("www.db", 1, 1))) + if (!(gw_db = gw_db_open (EGWDIR "/www.db", 1, 1))) { gw_log (GW_LOG_FATAL, prog, "gw_db_open"); exit (1); diff --git a/www/wirtcl.c b/www/wirtcl.c index 9939df8..28f9dee 100644 --- a/www/wirtcl.c +++ b/www/wirtcl.c @@ -41,7 +41,10 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. * * $Log: wirtcl.c,v $ - * Revision 1.9 1995/11/07 14:56:59 adam + * Revision 1.10 1996/01/09 10:46:50 adam + * New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile. + * + * Revision 1.9 1995/11/07 14:56:59 adam * Work on search in multiple targets. * New wtcl command: wlog. * Optional timeout parameter to zwait. @@ -166,7 +169,7 @@ static void *do_create (WCLIENT wcl, void *args) gw_log (GW_LOG_FATAL, mod, "Cannot make Irtcl_Interp"); exit (1); } - log_init(LOG_ALL, "irtcl", "/usr/local/etc/httpd/logs/irtcl_log"); + log_init(LOG_ALL, "irtcl", LOGDIR "/irtcl_log"); /* initialize irtcl */ Tcl_CreateCommand (p->interp, "zwait", proc_zwait_invoke, p, NULL); for (i=0; i