# Makefile for www gateway utility
# Europagate, 1995
#
-# $Log: Makefile,v $
-# 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.
-#
-# Revision 1.19 1996/01/02 10:52:25 adam
-# In images Alt=... are defined.
-#
-# Revision 1.18 1995/12/20 16:31:30 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.
-#
-# Revision 1.17 1995/11/14 16:31:35 adam
-# Temporary remove of ccl entry.
-#
-# Revision 1.16 1995/11/14 16:01:50 adam
-# Bug fix: didn't use correct database(s) when 'all' checkbox was selected.
-#
-# Revision 1.15 1995/11/13 18:17:46 adam
-# Better error handling.
-#
-# Revision 1.14 1995/11/13 15:41:40 adam
-# Arrow gifs.
-# Gateway uses record element set names B(rief) and F(ull).
-# Bug fix. Didn't save idAuthentication correctly.
-#
-# Revision 1.13 1995/11/08 18:07:22 adam
-# Minor changes.
-#
-# Revision 1.12 1995/11/08 16:14:32 adam
-# Many improvements and bug fixes.
-# First version that ran on dtbsun.
-#
-# Revision 1.11 1995/11/07 14:56:58 adam
-# Work on search in multiple targets.
-# New wtcl command: wlog.
-# Optional timeout parameter to zwait.
-#
-# Revision 1.10 1995/11/07 10:44:29 adam
-# Work on search in multiple targets.
-#
-# Revision 1.9 1995/11/06 17:44:20 adam
-# State reestablised when shell restarts. History of previous
-# result sets.
-#
-# Revision 1.8 1995/11/06 10:51:14 adam
-# End of response marker in response from wsh/wproto to wcgi.
-# Shells are respawned when necessary.
-#
-# Revision 1.7 1995/10/31 16:56:23 adam
-# Record presentation.
-#
-# Revision 1.6 1995/10/27 17:30:15 adam
-# First search request/response that works.
-#
-# Revision 1.5 1995/10/27 15:12:02 adam
-# IrTcl incorporated in the gateway.
-# Better separation of script types.
-# Z39.50 gateway scripts entered.
-#
-# Revision 1.4 1995/10/23 17:04:16 adam
-# Added some initial z39 gateway scripts.
-#
-# Revision 1.3 1995/10/23 16:55:33 adam
-# A lot of changes - really.
-#
-# Revision 1.2 1995/10/20 14:02:40 adam
-# First version of WWW gateway with embedded Tcl.
-#
-# Revision 1.1 1995/10/20 11:49:24 adam
-# First version of www gateway.
+# $Id: Makefile,v 1.33 1996/03/05 18:50:24 adam Exp $
#
SHELL=/bin/sh
-#
-ZDEFS=
-#ZINC=-I../../yaz/include
+
ZLIB=../../yaz/lib/libyaz.a
-MOSILIB=../../xtimosi/src/libmosi.a -lrfc
-LIBIRTCL=/usr/local/lib/libirtcl.a $(ZLIB) $(MOSILIB)
+
+IRTCLDIR=../../ir-tcl
+IRTCLLIB=$(IRTCLDIR)/libirtcl.a
+IRTCLINC=-I$(IRTCLDIR)
+
+#MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
#NETLIB=-lnsl -lsocket
-#
+
OLIB=../lib/util.a ../lib/libres+log.a
-TCLLIB=/usr/local/lib/libtcl7.4.a
-#
+TCLLIB=/usr/local/lib/libtcl7.5.a
+TCLINC=
+
WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \
- mtargets.egw mquery.egw msearch.egw history.egw
+ mtargets.egw mquery.egw msearch.egw history.egw tform.egw tdefine.egw
HSCRIPTS=egwindex.html
-CONFFILES=ztargets.conf
+CONFFILES=egw.res ztargets.conf
TPROG1=egwcgi
TPROG2=egwsh
TPROG3=wtest
+TPROG4=egwwais
P1=wcgi.o
-P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o
+P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o wshmain.o
P3=wproto.o wtest.o
+P4=wproto.o winterp.o waissh.o wtcl.o wirtcl.o wshmain.o wwaistcl.o
CPP=$(CC) -E
HTTPDDIR=/usr/local/etc/httpd
CGIDIR=$(HTTPDDIR)/cgi-bin
HTDOCS=$(HTTPDDIR)/htdocs
-CONFDIR=$(HTTPDDIR)/conf
EGWDIR=$(HTTPDDIR)/egw
-LOGDIR=$(HTTPDDIR)/egw
-GIFDIR=$(HTDOCS)/gif
+LOGDIR=$(HTTPDDIR)/logs
+GIFDIR=$(HTDOCS)/egwgif
+
+#HTTPDDIR=/usr/local/www
+#CGIDIR=/usr/local/www/cgi-bin
+#HTDOCS=/data2/html/egw/html
+#EGWDIR=/data2/html/egw/scripts
+#LOGDIR=/data2/html/egw/logs
+#GIFDIR=/data2/html/egw/gif
-INCLUDE=-I../include $(ZINC)
-DEFS=$(INCLUDE) $(ZDEFS) -DCGIDIR=\"$(CGIDIR)\" -DEGWDIR=\"$(EGWDIR)\" \
- -DLOGDIR=\"$(LOGDIR)\"
+INCLUDE=-I../include $(TCLINC) $(IRTCLINC)
+DEFS=$(INCLUDE) $(ZDEFS) -DEGWDIR=\"$(EGWDIR)\"
all: $(TPROG1) $(TPROG2)
-$(TPROG1): $(P1)
+$(TPROG1): $(P1) $(OLIB)
$(CC) $(CFLAGS) -o $(TPROG1) $(P1) $(OLIB)
-$(TPROG2): $(P2)
- $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(LIBIRTCL) \
- $(NETLIB) $(TCLLIB) -lm
+$(TPROG2): $(P2) $(OLIB)
+ $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(IRTCLLIB) \
+ $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm
-$(TPROG3): $(P3)
+$(TPROG3): $(P3) $(OLIB)
$(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB)
-install: install.prog install.script
+
+WAISDIR=../../freeWAIS-sf-2.0
+WAISLIB=$(IRTCLDIR)/wais-tcl.o $(WAISDIR)/ir/libwais.a
+
+$(TPROG4): $(P4) $(OLIB)
+ $(CC) $(CFLAGS) -o $(TPROG4) $(P4) \
+ $(OLIB) $(IRTCLLIB) \
+ $(WAISLIB) $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm
+
+install: install.prog install.script install.gif
install.prog: $(TPROG1) $(TPROG2)
- @for x in $(TPROG1) $(TPROG2); do \
+ @if [ ! -d $(CGIDIR) ]; then \
+ echo "Making directory $(CGIDIR)"; \
+ mkdir $(CGIDIR); \
+ fi
+ @if [ ! -d $(EGWDIR) ]; then \
+ echo "Making directory $(EGWDIR)"; \
+ mkdir $(EGWDIR); \
+ fi
+ @for x in $(TPROG1); do \
echo Installing $$x; \
cp $$x $(CGIDIR); \
- chmod +x $(CGIDIR)/$$x; \
+ chmod a+x $(CGIDIR)/$$x; \
+ done; \
+ for x in $(TPROG2); do \
+ echo Installing $$x; \
+ cp $$x $(EGWDIR); \
+ chmod a+x $(EGWDIR)/$$x; \
done; \
for p in egwtcl egwirtcl egwhtml; do \
- rm -f $(CGIDIR)/$$p; \
- ln $(CGIDIR)/$(TPROG2) $(CGIDIR)/$$p; \
+ rm -f $(EGWDIR)/$$p; \
+ ln $(EGWDIR)/$(TPROG2) $(EGWDIR)/$$p; \
done
+ @if [ -x $(TPROG4) ]; then \
+ echo Installing $(TPROG4); \
+ cp $(TPROG4) $(EGWDIR)/$(TPROG4); \
+ chmod a+x $(EGWDIR)/$(TPROG4); \
+ fi
install.script:
@if [ ! -d $(EGWDIR) ]; then \
echo "Making directory $(EGWDIR)"; \
mkdir $(EGWDIR); \
fi
+ @if [ ! -d $(HTDOCS) ]; then \
+ echo "Making directory $(HTDOCS)"; \
+ mkdir $(HTDOCS); \
+ fi
@for x in $(WSCRIPTS); do \
echo Installing $$x; \
cp $$x $(EGWDIR)/$$x; \
done
@for x in $(CONFFILES); do \
echo Installing $$x; \
- cp $$x $(CONFDIR); \
+ cp $$x $(EGWDIR); \
done
+
+install.gif:
+ @if [ ! -d $(GIFDIR) ]; then \
+ echo "Making directory $(GIFDIR)"; \
+ mkdir $(GIFDIR); \
+ fi
@for x in gif/*.gif; do \
echo Installing $$x; \
cp $$x $(GIFDIR); \