[Bio] / ReleaseTools / standard.mk Repository:
ViewVC logotype

Diff of /ReleaseTools/standard.mk

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

revision 1.3, Fri Sep 17 21:04:49 2004 UTC revision 1.9, Fri Mar 11 22:26:14 2005 UTC
# Line 25  Line 25 
25  #BINPYSCRIPTS := script1.py etc.  List of py scripts to install in bin.  #BINPYSCRIPTS := script1.py etc.  List of py scripts to install in bin.
26  #                Installed as script1, not script1.py.  Filtered out of  #                Installed as script1, not script1.py.  Filtered out of
27  #                python library list (LIBPYFILES)  #                python library list (LIBPYFILES)
28    #BINSHSCRIPTS:   List of borne shell scripts to be copied to bin verbatim.
29    #
30    #SCHEMATOOLS := file.py, etc.  List of python files defining input to schema
31    #               tools.
32  #  #
33  #BINSCRIPTS:     List of scripts to be copied to bin verbatim.  #BINSCRIPTS:     List of scripts to be copied to bin verbatim.
34  #  #
35    #                *** migrate away from BINSCRIPTS!  The extra info that
36    #                *** its borne shell, py, etc., will let us edit the #! line
37    #                *** during installation, eventually.
38  #  #
 #SCHEMATOOLS := file.st, etc.  List of python files defining input to schema  
 #               tools.  
39    
40    
41    
# Line 40  Line 45 
45  ########################################################################  ########################################################################
46    
47    
48  LIBPYFILES := $(filter-out $(BINPYSCRIPTS), $(wildcard *.py))  LIBPYFILES := $(filter-out $(BINPYSCRIPTS) $(SCHEMATOOLS), $(wildcard *.py))
49    
50    
51    
# Line 53  Line 58 
58    
59  all: schematools lib bin  all: schematools lib bin
60    
61  bin:    $(foreach var, $(BINPYSCRIPTS), $(subst .py,,$(bindir)/$(var))) $(foreach var, $(BINSCRIPTS), $(bindir)/$(var))  bin:    $(foreach var, $(BINPYSCRIPTS), $(subst .py,,$(bindir)/$(var))) $(foreach var, $(BINSHSCRIPTS), $(subst .sh,,$(bindir)/$(var))) $(foreach var, $(BINSCRIPTS), $(bindir)/$(var))
62    
63  lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var))  lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var))
64    
65  schematools: $(foreach var, $(subst .st,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var).py) $(foreach var, $(subst .st,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var).sql) $(foreach var, $(subst .st,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var)DbiHandler.py)  schematools: stDeclFiles stGeneratedFiles
66    
67    stDeclFiles: $(foreach var, $(SCHEMATOOLS), $(libdir)/$(PKGNAME)/$(var))
68    
69    stGeneratedFiles: $(foreach var, $(subst .py,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var)_st.py) $(foreach var, $(subst .py,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var).sql) $(foreach var, $(subst .py,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)Gen/$(var)DbiHandler.py)
70    
71  test:  test:
72    
# Line 70  Line 79 
79  ##  ##
80  # lib related  # lib related
81  ##  ##
82    
83    
84    $(libdir)/$(PKGNAME)/%.py: $(TOPDIR)/$(PKGNAME)/%.py
85            cp -p  $< $@
86    
87    $(libdir)/$(PKGNAME)/__init__.py: $(TOPDIR)/$(PKGNAME)/__init__.py
88            cp -p  $< $@
89    
90  # verbatim copy from sourcedir to libdir, e.g., py (distutils someday...)  # verbatim copy from sourcedir to libdir, e.g., py (distutils someday...)
91    # keep this overly generic one below the more specific py, above.
92  $(libdir)/$(PKGNAME)/%: $(TOPDIR)/$(PKGNAME)/%  $(libdir)/$(PKGNAME)/%: $(TOPDIR)/$(PKGNAME)/%
93          cp -p  $< $@          cp -p  $< $@
94    
95  # generate .py from schematools description of class. (Kah related)  # generate .py from schematools description of class. (Kah related)
96  $(libdir)/$(PKGNAME)Gen/%.py: $(TOPDIR)/$(PKGNAME)/%.st  
97          cd $(libdir)/$(PKGNAME); generatePy $< > $@  #    Note- add a __init__ dep because everything is required to be a package
98    # and so must have an __init__.  putting the dep here is a way to force the
99    # __init__ to be copied into the dir first so that i can immediately
100    # be ref'd as a package.  this is needed for schema tools ina way i don't
101    # grok yet
102    
103    $(libdir)/$(PKGNAME)Gen/%_st.py: $(TOPDIR)/$(PKGNAME)/%.py  $(libdir)/$(PKGNAME)/__init__.py
104            cd $(libdir)/$(PKGNAME); $(bindir)/generatePy $< > $@
105    
106  # generate .sql from schematools description of class. (Kah related)  # generate .sql from schematools description of class. (Kah related)
107  $(libdir)/$(PKGNAME)Gen/%.sql: $(TOPDIR)/$(PKGNAME)/%.st  $(libdir)/$(PKGNAME)Gen/%.sql: $(TOPDIR)/$(PKGNAME)/%.py
108          cd $(libdir)/$(PKGNAME); generateDb $< > $@          cd $(libdir)/$(PKGNAME); $(bindir)/generateDb $< > $@
109    
110  # generate object/relational converters from schematools  # generate object/relational converters from schematools
111  # description of class. (Kah related)  # description of class. (Kah related)
112  $(libdir)/$(PKGNAME)Gen/%DbiHandler.py: $(TOPDIR)/$(PKGNAME)/%.st  $(libdir)/$(PKGNAME)Gen/%DbiHandler.py: $(TOPDIR)/$(PKGNAME)/%.py
113          cd $(libdir)/$(PKGNAME); generateDbiHandler $< > $@          cd $(libdir)/$(PKGNAME); $(bindir)/generateDbiHandler $< > $@
114    
115  ##  ##
116  # bin related  # bin related
# Line 93  Line 118 
118  # python scripts. make script, "foo" from "foo.py".  (rewrite path #! someday)  # python scripts. make script, "foo" from "foo.py".  (rewrite path #! someday)
119  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.py  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.py
120          cp -p  $< $@          cp -p  $< $@
121            chmod 755 $@
122    
123    # borne shell scripts
124    
125    $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.sh
126            cp -p  $< $@
127            chmod 755 $@
128    
129  # scripts to copy verbatim.  # scripts to copy verbatim.
130  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%
131          cp -p  $< $@          cp -p  $< $@
132            chmod 755 $@
133    
134    
135  ########################################################################  ########################################################################

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.9

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3