# Directory specifications pdbdir=/data/pdb absoutdir=/data/abs/xml ab2xml=/usr/local/bin/ab2xml.pl buildallxml=/usr/local/bin/buildantibodyxml.pl # Get rid of all built-in SUFFIX rules .SUFFIXES : # Continue after all errors .IGNORE : # Source and destination directories vpath %.ent $(pdbdir) vpath %.xml $(absoutdir) # Get a directory listing of all PDB files sources := $(wildcard $(pdbdir)/*.ent) # Strip the path stems1 := $(notdir $(sources)) # Strip the extension stems := $(basename $(stems1)) # Add the .xml extension to create list of xml targets xmltargets := $(addsuffix .xml, $(stems)) # Phony rule to build all the targets all : xml xml : $(xmltargets) $(buildallxml) # Build an XML file with antibody data from each PDB file %.xml : %.ent (cd $(absoutdir); $(ab2xml) $< > $(absoutdir)/$@ )