[Bio] / FigCommon / Makefile Repository:
ViewVC logotype

Annotation of /FigCommon/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (view) (download)

1 : efrank 1.1 #
2 : olson 1.14 # Copyright (c) 2003-2006 University of Chicago and Fellowship
3 :     # for Interpretations of Genomes. All Rights Reserved.
4 :     #
5 :     # This file is part of the SEED Toolkit.
6 :     #
7 :     # The SEED Toolkit is free software. You can redistribute
8 :     # it and/or modify it under the terms of the SEED Toolkit
9 :     # Public License.
10 :     #
11 :     # You should have received a copy of the SEED Toolkit Public License
12 :     # along with this program; if not write to the University of Chicago
13 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14 :     # Genomes at veronika@thefig.info or download a copy from
15 :     # http://www.theseed.org/LICENSE.TXT.
16 :     #
17 :    
18 :     #
19 : efrank 1.1 #
20 :     #
21 :    
22 : olson 1.10 BINSCRIPTS := configure-env switch_to_release make_sandbox tool_hdr tool_hdr_py \
23 : olson 1.13 setup-sge sge-daemons lwc_postprocess
24 : olson 1.5 PERLPACKAGES := $(wildcard *.pm)
25 : efrank 1.1
26 : olson 1.5 lib: $(foreach var, $(PERLPACKAGES), $(libdir)/$(PKGNAME)/$(var))
27 : efrank 1.1
28 :     bin: $(foreach var, $(BINSCRIPTS), $(bindir)/$(var))
29 :    
30 : olson 1.9 schematools:
31 : olson 1.11 stDeclFiles:
32 :     stGeneratedFiles:
33 :    
34 : olson 1.12 #
35 :     # Machinery to fix perl's Config.pm to have the correct paths
36 :     # for this installation of the SEED environment - we may be
37 :     # running in a directory other than that the perl was compiled for.
38 :     #
39 :    
40 :     PERL = $(RTROOT)/env/$(RTARCH)/bin/perl
41 :    
42 :     #
43 :     # Determine the architecture name and version for the SEED environment perl.
44 :     #
45 :    
46 :     PERL_ARCH = $(shell $(PERL) -e 'use Config; print $$Config{archname}')
47 :     PERL_VERS = $(shell $(PERL) -e 'use Config; print $$Config{version}')
48 :    
49 :     #
50 :     # Use these to determine the directory in which Config.pm is located.
51 :     #
52 :     PERL_ARCH_LIB = $(RTROOT)/env/$(RTARCH)/lib/perl5/$(PERL_VERS)/$(PERL_ARCH)
53 :     PERL_CONFIG_DIST = $(PERL_ARCH_LIB)/Config.pm.dist
54 :     PERL_CONFIG = $(PERL_ARCH_LIB)/Config.pm
55 :    
56 :     #
57 :     # The SEED environment has a file PREFIX that declares the location
58 :     # to which the environment was installed at compilation time.
59 :     #
60 :     PERL_INST_PREFIX = $(shell cat $(RTROOT)/env/$(RTARCH)/PREFIX)
61 :    
62 :     #
63 :     # Fix Config.pm by replacing the install prefix with the current location.
64 :     #
65 :    
66 :     fix_perl_configpm: $(PERL_CONFIG_DIST)
67 :     chmod +w $(PERL_CONFIG)
68 :     sed -e 's,$(PERL_INST_PREFIX),$(RTROOT)/env/$(RTARCH),g' < $(PERL_CONFIG_DIST) > $(PERL_CONFIG)
69 :     chmod -w $(PERL_CONFIG)
70 :     touch fix_perl_configpm
71 :    
72 :     #
73 :     # Copy the original Config.pm to Config.pm.dist if we haven't done so before.
74 :     #
75 :    
76 :     $(PERL_CONFIG_DIST): $(PERL_CONFIG)
77 :     if [ ! -f $(PERL_CONFIG_DIST) ] ; then \
78 :     cp $(PERL_CONFIG) $(PERL_CONFIG_DIST); \
79 :     fi
80 :     chmod +w $(PERL_CONFIG)
81 :     chmod -w $(PERL_CONFIG_DIST)
82 :     touch $(PERL_CONFIG_DIST)
83 :     chmod +w $(PERL_CONFIG_DIST)
84 : olson 1.9
85 : efrank 1.2 test:
86 :    
87 :     clean:
88 : olson 1.12 -rm fix_perl_configpm
89 : efrank 1.1
90 :     $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%
91 :     cp -p $< $(bindir)/.
92 : efrank 1.3
93 :     $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.pl $(TOOL_HDR)
94 :     ( cat $(TOOL_HDR) $< > $@; chmod +x $@ )
95 : olson 1.5
96 :     $(libdir)/$(PKGNAME)/%.pm: $(TOPDIR)/$(PKGNAME)/%.pm
97 :     cp -p $< $@
98 : efrank 1.1

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3