[Bio] / FigCommon / Makefile Repository:
ViewVC logotype

Diff of /FigCommon/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11, Fri Nov 19 22:02:55 2004 UTC revision 1.12, Mon May 16 18:28:15 2005 UTC
# Line 14  Line 14 
14  stDeclFiles:  stDeclFiles:
15  stGeneratedFiles:  stGeneratedFiles:
16    
17    #
18    # Machinery to fix perl's Config.pm to have the correct paths
19    # for this installation of the SEED environment - we may be
20    # running in a directory other than that the perl was compiled for.
21    #
22    
23    PERL = $(RTROOT)/env/$(RTARCH)/bin/perl
24    
25    #
26    # Determine the architecture name and version for the SEED environment perl.
27    #
28    
29    PERL_ARCH = $(shell $(PERL) -e 'use Config; print $$Config{archname}')
30    PERL_VERS = $(shell $(PERL) -e 'use Config; print $$Config{version}')
31    
32    #
33    # Use these to determine the directory in which Config.pm is located.
34    #
35    PERL_ARCH_LIB = $(RTROOT)/env/$(RTARCH)/lib/perl5/$(PERL_VERS)/$(PERL_ARCH)
36    PERL_CONFIG_DIST = $(PERL_ARCH_LIB)/Config.pm.dist
37    PERL_CONFIG = $(PERL_ARCH_LIB)/Config.pm
38    
39    #
40    # The SEED environment has a file PREFIX that declares the location
41    # to which the environment was installed at compilation time.
42    #
43    PERL_INST_PREFIX = $(shell cat $(RTROOT)/env/$(RTARCH)/PREFIX)
44    
45    #
46    # Fix Config.pm by replacing the install prefix with the current location.
47    #
48    
49    fix_perl_configpm: $(PERL_CONFIG_DIST)
50            chmod +w $(PERL_CONFIG)
51            sed -e 's,$(PERL_INST_PREFIX),$(RTROOT)/env/$(RTARCH),g' < $(PERL_CONFIG_DIST) > $(PERL_CONFIG)
52            chmod -w $(PERL_CONFIG)
53            touch fix_perl_configpm
54    
55    #
56    # Copy the original Config.pm to Config.pm.dist if we haven't done so before.
57    #
58    
59    $(PERL_CONFIG_DIST): $(PERL_CONFIG)
60            if [ ! -f $(PERL_CONFIG_DIST) ] ; then \
61                    cp $(PERL_CONFIG) $(PERL_CONFIG_DIST); \
62            fi
63            chmod +w $(PERL_CONFIG)
64            chmod -w $(PERL_CONFIG_DIST)
65            touch $(PERL_CONFIG_DIST)
66            chmod +w $(PERL_CONFIG_DIST)
67    
68  test:  test:
69    
70  clean:  clean:
71            -rm fix_perl_configpm
72    
73  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%
74          cp -p $< $(bindir)/.          cp -p $< $(bindir)/.

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3