# Makefile for the chemistry stockroom # # This Makefile will reformat and reindex the chem stockroom inventory # database as needed. It is usually invoked by the "chemstock-daily" # script, which is in turn invoked by cron. # #----------------------------------------------------------------------- # History: # 09/19/94 PASR Original version. # 10/11/94 PASR Modified to use WAIS-1-0-11 and handle files uploaded # via anonymous FTP. #----------------------------------------------------------------------- # In order for WAIS to use the index files, they need to have soft links # pointing to the index directory from ~cwis/wais-sources.waisinc. # You can create the link as follows: # # ln -s ${PWD}/chemstock ~cwis/wais-sources.waisinc # # In order for Gopher to use these index files, you need a .links file # somewhere in the gopher tree which looks like this: # # Name=Search the Chemical Stockroom inventory by keywords # Type=7 # Port=+ # Path=waissrc:/.subject/chemstock/.index/chemstock/chemstock.src # #----------------------------------------------------------------------- PERL = /usr/local/bin/perl CHEMSTOCK2WAIS = chemstock2wais.pl WAISINCBIN = /usr/site/waisinc/srvr-1-0-11-sunos/bin WAISPARSE = $(WAISINCBIN)/waisparse WAISINDEX = $(WAISINCBIN)/waisindex DATADIR = /home/cwis/gopher/world/.subject/chemstock INDEXDIR = $(DATADIR)/.index/chemstock RAWDATA = wmrftp.lst RAWREAD = wmrintro.txt default: ../About $(INDEXDIR)/index.doc $(INDEXDIR)/index.fn $(INDEXDIR)/index.hl $(INDEXDIR)/index.inv ../About: $(RAWREAD) /bin/cp $(RAWREAD) ../About $(INDEXDIR)/index.doc $(INDEXDIR)/index.fn $(INDEXDIR)/index.hl $(INDEXDIR)/index.inv: chemstock.wais $(WAISPARSE) -parse paragraph ./chemstock.wais | \ $(WAISINDEX) -nocat -stem porter -d $(INDEXDIR) chemstock.wais: $(RAWDATA) $(PERL) $(CHEMSTOCK2WAIS) < $(RAWDATA) > chemstock.wais clean: /bin/rm -f $(INDEXDIR)/index.wais $(INDEXDIR)/index.dct $(INDEXDIR)/index.doc $(INDEXDIR)/index.fn $(INDEXDIR)/index.hl $(INDEXDIR)/index.inv