# Touch files for Make to know what it's doing TOUCHDIR = /home/andrew/pdbcec_ebi/touch # Dump files directory DUMPDIR = /home/andrew/public_html/pdbsprotec # Data files ENZYME = /data/enzyme/release_with_updates/enzyme.dat SPROTDIR = /data/swissprot/full PDBSWSDIR = /data/pdbsws # Dump files TXTDUMP = $(DUMPDIR)/mapping.txt XMLDUMP = $(DUMPDIR)/mapping.xml.gz # The database and username of the person owning the database DBNAME = andrew USER = andrew DBHOST = sapc77 # Programs to run PROGS = /home/andrew/pdbcec_ebi EC2SQL = $(PROGS)/ec2sql.pl -user=$(USER) UPDATE = $(PROGS)/UpdateECFromSprot.pl -dbname=$(DBNAME) -dbhost=$(DBHOST) GETMAP = $(PROGS)/getmappings.pl -user=$(USER) TDUMP = $(PROGS)/BuildTextDump.pl -dbname=$(DBNAME) XDUMP = $(PROGS)/BuildXMLDump.pl -dbname=$(DBNAME) # Get rid of all built-in SUFFIX rules .SUFFIXES : # Continue after all errors .IGNORE : # Obtain the name of the SwissProt database and the PDB/SPROT # mapping (just in case they decide to change them from # 'sprot.dat' and 'pdb_sws_mapping.lst') SPROT := $(wildcard $(SPROTDIR)/sprot*.dat) PDBSWS := $(wildcard $(PDBSWSDIR)/*) all: $(TOUCHDIR)/enzyme.touch \ $(TOUCHDIR)/sprot.touch \ $(TOUCHDIR)/pdbsws.touch \ $(TXTDUMP) $(XMLDUMP) $(TOUCHDIR)/enzyme.touch : $(ENZYME) $(EC2SQL) -sql $(ENZYME) | psql $(DBNAME) touch $(TOUCHDIR)/enzyme.touch $(TOUCHDIR)/sprot.touch : $(SPROT) $(TOUCHDIR)/enzyme.touch $(UPDATE) -sql $(SPROT) | psql $(DBNAME) touch $(TOUCHDIR)/sprot.touch $(TOUCHDIR)/pdbsws.touch : $(PDBSWS) $(GETMAP) -sql $(PDBSWS) | psql $(DBNAME) touch $(TOUCHDIR)/pdbsws.touch $(TXTDUMP) : $(TOUCHDIR)/enzyme.touch \ $(TOUCHDIR)/sprot.touch \ $(TOUCHDIR)/pdbsws.touch $(TDUMP) > $(TXTDUMP) $(XMLDUMP) : $(TOUCHDIR)/enzyme.touch \ $(TOUCHDIR)/sprot.touch \ $(TOUCHDIR)/pdbsws.touch (cd $(DUMPDIR); $(XDUMP) > `basename $(XMLDUMP) .gz`) (cd $(DUMPDIR); gzip -f `basename $(XMLDUMP) .gz`)