initial commit
[jalview.git] / forester / archive / RIO / others / hmmer / Makefile.in
1 ################################################################# 
2 # Makefile for HMMER: Main project directory: installation, documentation
3 # CVS $Id: Makefile.in,v 1.1.1.1 2005/03/22 08:33:51 cmzmasek Exp $
4 ###########
5 # HMMER - Biological sequence analysis with profile HMMs
6 # Copyright (C) 1992-1999 Washington University School of Medicine
7 # All Rights Reserved
8
9 #     This source code is distributed under the terms of the
10 #     GNU General Public License. See the files COPYING and LICENSE
11 #     for details.
12 ###########
13
14 # On most Unices, you can build the package without modifying anything 
15 #   by just typing "./configure; make".
16 #
17 # You may want to modify the following make variables:
18 #   BINDIR  - where the executables will be installed by a 'make install'
19 #   MANDIR  - where the man pages will be installed by a 'make install'
20 #   CC      - which compiler to use
21 #   CFLAGS  - compiler flags to use
22
23 # where you want things installed
24 # Sort of uses GNU coding standards. ${prefix} might be /usr/local.
25 # ${exec_prefix} gives you some flexibility for installing architecture
26 # dependent files (e.g. the programs): an example ${exec_prefix} might be
27 # /nfs/share/irix64/
28 #
29 prefix      = @prefix@
30 exec_prefix = @exec_prefix@
31 BINDIR      = @bindir@
32 MANDIR      = @mandir@
33
34 # how to install the man pages; 
35 # cp is generally fine, unless you preformat your pages.
36 #
37 INSTMAN   = cp
38 MANSUFFIX = 1
39
40 # your compiler and compiler flags
41 #
42 CC     = @CC@
43 CFLAGS = @CFLAGS@
44
45 #######
46 ## You should not need to modify below this line.
47 ## Much of it is concerned with maintenance of the development version
48 ## and building the release (indeed, several commands will only work in 
49 ## St. Louis)
50 #######
51 SHELL       = /bin/sh
52 BASENAME    = "hmmer"
53 PACKAGE     = "HMMER"
54 RELEASE     = "2.2g"
55 RELCODE     = "hmmer2_2g"
56 RELEASEDATE = "August 2001"
57 COPYRIGHT   = "Copyright \(C\) 1992-2001 HHMI/Washington University School of Medicine"
58 LICENSE     = "Freely distributed under the GNU General Public License \(GPL\)"
59 LICENSETAG  = gnu
60 COMPRESS    = gzip
61
62 # The program lists below for HMMER and SQUID are not necessarily
63 # a complete manifest. They are the list of stable programs that the
64 # package will install. There must be a man page for each one of them
65 # in the appropriate places (documentation/man for HMMER, squid/Man
66 # for the SQUID library). 
67 #
68 PROGS = hmmalign\
69         hmmbuild\
70         hmmcalibrate\
71         hmmconvert\
72         hmmemit\
73         hmmfetch\
74         hmmindex\
75         hmmpfam\
76         hmmsearch
77
78 PVMPROGS = @PVMPROGS@
79
80 SQUIDPROGS = afetch\
81         alistat\
82         seqstat\
83         sfetch\
84         sindex\
85         shuffle\
86         sreformat
87
88 # all: Compile everything (except the testsuite),
89 #      and stick the supported programs in binaries/
90 #
91 all: version.h
92         @if test -d binaries; then\
93            echo "You appear to already have a compiled HMMER distribution.";\
94            echo "You don't need to make.";\
95            echo "";\
96            echo "If I'm wrong, it's because I'm only looking to see if you have";\
97            echo "a 'binaries' directory; do 'make distclean' to revert HMMER";\
98            echo "to a pristine source distribution.";\
99         else\
100            (cd squid; make CC="$(CC)" CFLAGS="$(CFLAGS)"; make module);\
101            (cd src;   make CC="$(CC)" CFLAGS="$(CFLAGS)"; make module);\
102            mkdir binaries;\
103               for prog in $(PROGS) $(PVMPROGS); do\
104               mv src/$$prog binaries/;\
105            done;\
106            for prog in $(SQUIDPROGS); do\
107               mv squid/$$prog binaries/;\
108            done;\
109         fi
110
111 # version.h: 
112 #   create the version.h file that will define stamps used by 
113 #   squidcore.c's Banner(), which is called by all executables to
114 #   print a standard package/copyright/license banner;
115 #   then puts copies of version.h in all directories that are 
116 #   going to need it -- HMMER src/ and any modules of mine that
117 #   also produce installed executables (squid/)
118 #
119 version.h:
120         echo "/* version.h -- automatically generated by a Makefile. DO NOT EDIT. */" > version.h
121         echo "#define PACKAGE     \"$(PACKAGE)\""     >> version.h
122         echo "#define RELEASE     \"$(RELEASE)\""     >> version.h
123         echo "#define RELEASEDATE \"$(RELEASEDATE)\"" >> version.h
124         echo "#define COPYRIGHT   \"$(COPYRIGHT)\""   >> version.h
125         echo "#define LICENSE     \"$(LICENSE)\""     >> version.h
126         cp version.h squid/
127         cp version.h src/
128
129 # check: compiles and runs test suite in testsuite/
130 #       These are public tests, distributed with the package.
131 #
132 check:  squid/libsquid.a src/libhmmer.a
133         (cd testsuite; make CC="$(CC)" CFLAGS="$(CFLAGS)")
134         (cd testsuite; make check)
135
136 squid/libsquid.a: version.h
137         (cd squid; make CC="$(CC)" CFLAGS="$(CFLAGS)"; make module)
138
139 src/libhmmer.a: version.h
140         (cd src;   make CC="$(CC)" CFLAGS="$(CFLAGS)"; make module)
141
142
143 # install: installs the binaries in BINDIR/
144 #          installs man pages in MANDIR/man1/  (e.g. if MANSUFFIX is 1)
145 install: 
146         for file in $(PROGS) $(SQUIDPROGS) $(PVMPROGS); do\
147            cp binaries/$$file $(BINDIR)/;\
148         done
149         for file in hmmer $(PROGS) $(SQUIDPROGS); do\
150            $(INSTMAN) documentation/man/$$file.man $(MANDIR)/man$(MANSUFFIX)/$$file.$(MANSUFFIX);\
151         done
152         for file in $(SQUIDPROGS); do\
153            $(INSTMAN) squid/Man/$$file.man $(MANDIR)/man$(MANSUFFIX)/$$file.$(MANSUFFIX);\
154         done
155
156 # "make clean" removes almost everything except configuration files
157 #              and binaries.
158 clean:
159         -rm -f *.o *~ Makefile.bak core TAGS gmon.out
160         (cd src;       make clean)
161         (cd squid;     make clean)
162         (cd testsuite; make clean)
163
164 # "make distclean" leaves a pristine source distribution.
165 #
166 distclean:
167         -rm -rf binaries
168         -rm config.cache config.log config.status
169         -rm version.h
170         make clean
171         (cd src;       make distclean)
172         (cd squid;     make distclean)
173         (cd testsuite; make distclean)
174         -rm Makefile
175
176 # verify: consistency checks on the package
177 #         These are private tests, not distributed with HMMER
178 verify:
179         @echo Checking options for consistency and documentation...
180         @for prog in $(PROGS) $(SQUIDPROGS); do\
181            ./checkoptions.pl $$prog;\
182         done
183
184 # doc:  build the Userguide and on-line manual
185 #
186 doc:
187         (cd Userguide; make)
188
189 # dist: build a new distribution directory in hmmer-$RELEASE
190 #       Exports from the CVS repository.
191 #       tags RCS files with $(RELCODE) for later reconstruction
192 #       squid RCS files are tagged with hmmer$(RELCODE).
193 #       Adds a license statement to each file that has a @ LICENSE @ line.
194 #       Virtually identical to squid's make dist -- keep them in sync!
195 dist:   
196         # Delete old versions of the same release
197         #
198         @if test -d ${BASENAME}-$(RELEASE);        then rm -rf ${BASENAME}-$(RELEASE);        fi
199         @if test -e ${BASENAME}-$(RELEASE).tar;    then rm -f  ${BASENAME}-$(RELEASE).tar;    fi
200         @if test -e ${BASENAME}-$(RELEASE).tar.Z;  then rm -f  ${BASENAME}-$(RELEASE).tar.Z;  fi
201         @if test -e ${BASENAME}-$(RELEASE).tar.gz; then rm -f  ${BASENAME}-$(RELEASE).tar.gz; fi
202         # 
203         # CVS tag and extract. -c: make sure we committed;
204         #                      -F: allow more than one "make dist" per rel
205         # prep: must have done "cvs commit", and CVSROOT must be set
206         # We also need the squid library, so tag and export it too.
207         #
208         cvs tag -F $(RELCODE)
209         cvs export -r $(RELCODE) -d ${BASENAME}-${RELEASE} ${BASENAME}
210         cvs rtag -F ${RELCODE} squid
211         (cd ${BASENAME}-${RELEASE}; cvs export -r ${RELCODE} -d squid squid)
212         # 
213         # Make the configure scripts from configure.in
214         #
215         (cd ${BASENAME}-${RELEASE};       autoconf)
216         (cd ${BASENAME}-${RELEASE}/squid; autoconf)
217         # 
218         # Include the appropriate license files and release notes
219         #
220         cp  Licenses/LICENSE.$(LICENSETAG)   ${BASENAME}-$(RELEASE)/LICENSE
221         cp  Licenses/COPYING.$(LICENSETAG)   ${BASENAME}-$(RELEASE)/COPYRIGHT
222         -cp Release-Notes/RELEASE-$(RELEASE) ${BASENAME}-$(RELEASE)/NOTES
223         #
224         # Attach license stamps on files that need 'em (replace LICENSE keyword)
225         # licenseadd.pl is basically harmless, so we can overannotate here by
226         # trying to licenseadd everything.
227         #
228         find ${BASENAME}-${RELEASE} -type f -exec licenseadd.pl Licenses/$(LICENSETAG) {} \;
229         # 
230         # Compilation of the documentation.
231         # Documentation is not provided in source form.
232         #
233         (cd documentation/userguide; make clean)
234         (cd documentation/userguide; make pdf)
235         cp -f documentation/userguide/Userguide.pdf build/hmmer-$(RELEASE)/
236         #
237         # Remove CVS-controlled files/directories that don't belong in 
238         # the distro
239         #
240         -rm -rf ${BASENAME}-${RELEASE}/Bugs
241         -rm -rf ${BASENAME}-${RELEASE}/CHECKLIST
242         -rm -rf ${BASENAME}-${RELEASE}/Internal-Notes
243         -rm -rf ${BASENAME}-${RELEASE}/Licenses
244         -rm -rf ${BASENAME}-${RELEASE}/MAILING_LIST
245         -rm -rf ${BASENAME}-${RELEASE}/Release-Notes
246         -rm -rf ${BASENAME}-${RELEASE}/configure.in
247         -rm -rf ${BASENAME}-${RELEASE}/checkoptions.pl
248         -rm -rf ${BASENAME}-${RELEASE}/licenseadd.pl
249         -rm -rf ${BASENAME}-${RELEASE}/nodebuild
250         -rm -rf ${BASENAME}-${RELEASE}/rootbuild
251         -rm -rf ${BASENAME}-${RELEASE}/buildall
252         -rm -rf ${BASENAME}-${RELEASE}/documentation/userguide
253         -rm -rf ${BASENAME}-${RELEASE}/squid/Licenses
254         -rm -rf ${BASENAME}-${RELEASE}/squid/LOG
255         -rm -rf ${BASENAME}-${RELEASE}/squid/configure.in
256         #
257         # Packaging commands
258         #
259         tar cvf ${BASENAME}-${RELEASE}.tar ${BASENAME}-${RELEASE}
260         $(COMPRESS) ${BASENAME}-$(RELEASE).tar
261
262
263 # make ftpdist: install FTP distribution. Assumes a "make dist"
264 #               has already succeeded. Doesn't do the symlink;
265 #               doesn't install the on-line manual for the Web site.
266 #
267 ftpdist:
268         cp -f $(READMES)                     $(FTPDIR)
269         cp -f build/hmmer-$(RELEASE)/COPYING $(FTPDIR)
270         cp -f build/hmmer-$(RELEASE)/LICENSETAG $(FTPDIR)
271         cp -f build/hmmer-$(RELEASE)/NOTES   $(FTPDIR)
272         cp -f build/hmmer-$(RELEASE).tar.Z   $(FTPDIR)
273         cp -f build/hmmer-$(RELEASE)-*.tar.Z $(FTPDIR)
274         cp -f Userguide/Userguide.ps         $(FTPDIR)
275         cp -f Userguide/Userguide.pdf        $(FTPDIR)
276         cp -f Userguide/hmmer-html.tar.Z     $(FTPDIR)
277
278
279 # make stable: Set up the FTP site symlink to the current stable HMMER release.
280 #
281 stable:
282         ln -sf $(FTPDIR)/hmmer-$(RELEASE).tar.Z $(FTPDIR)/hmmer.tar.Z
283
284