# 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.
#
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
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)
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; \
* 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
#include <gw-db.h>
#include "wproto.h"
-#define CGIDIR "/usr/local/etc/httpd/cgi-bin"
-
static char *prog = "cgi";
static char serverp[256] = {'\0'};
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");
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);
* 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.
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<MAX_CALLBACK; i++)
* USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $Log: wsh.c,v $
- * Revision 1.8 1995/12/20 16:31:33 adam
+ * Revision 1.9 1996/01/09 10:46:51 adam
+ * New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile.
+ *
+ * Revision 1.8 1995/12/20 16:31:33 adam
* Bug fix: shell might terminate even though new request was initiated
* by the cgi interface program.
* Work on more simple user interface and Europagate buttons.
W_Interp w_interp;
GW_DB gw_db;
- chdir("/usr/local/etc/httpd/cgi-bin");
+ chdir (EGWDIR);
gw_log_init (*argv);
- gw_log_file (GW_LOG_ALL, "/usr/local/etc/httpd/logs/egwsh_log");
+ gw_log_file (GW_LOG_ALL, LOGDIR "/egwsh_log");
gw_log_level (GW_LOG_ALL);
gw_log (GW_LOG_STAT, mod, "Europagate www shell: %s", *argv);
* USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $Log: wtest.c,v $
- * Revision 1.1 1995/10/20 11:49:28 adam
+ * Revision 1.2 1996/01/09 10:46:51 adam
+ * New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile.
+ *
+ * Revision 1.1 1995/10/20 11:49:28 adam
* First version of www gateway.
*
*/
int counter = 0;
int i;
- chdir ("/usr/local/etc/httpd/cgi-bin");
+ chdir (CGIDIR);
gw_log_init ("egw");
gw_log_level (GW_LOG_ALL);
- gw_log_file (GW_LOG_ALL, "/usr/local/etc/httpd/logs/wtest_log");
+ gw_log_file (GW_LOG_ALL, LOGDIR "/wtest_log");
gw_log (GW_LOG_STAT, mod, "Europagate www test");
if (!(wcl = wproto_init ()))