[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.1, Fri Sep 10 12:54:37 2004 UTC revision 1.2, Thu Sep 16 21:47:08 2004 UTC
# Line 18  Line 18 
18  #  #
19  #######################################################################  #######################################################################
20    
21  ##  ########################################################################
22  # Document macros users define in their package level makefiles here:  # Document macros users define in their package level makefiles here:
23  ##  ########################################################################
   
24  #  #
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
# Line 29  Line 28 
28  #  #
29  #BINSCRIPTS:     List of scripts to be copied to bin verbatim.  #BINSCRIPTS:     List of scripts to be copied to bin verbatim.
30  #  #
31  # (NB: haven't really coded rules to handle these two separately, correctly  #
32  # yet  #SCHEMATOOLS := file.st, etc.  List of python files defining input to schema
33    #               tools.
34    
35    
36    
37  ##  ########################################################################
38  # Various lists of things to build  # Various lists of things to build
39  ##  #   implemented via macros above.
40    ########################################################################
41    
42    
43  LIBPYFILES := $(filter-out $(BINPYSCRIPTS), $(wildcard *.py))  LIBPYFILES := $(filter-out $(BINPYSCRIPTS), $(wildcard *.py))
44    
45    
46    
47  ##  ########################################################################
48  # Targets  # Package-level makefile Targets
49  ##  ########################################################################
50    
51    
52  all: lib bin  all: lib bin
53    
54  bin:    $(foreach var, $(BINPYSCRIPTS), $(bindir)/$(var))  bin:    $(foreach var, $(BINPYSCRIPTS), $(subst .py,,$(bindir)/$(var))) $(foreach var, $(BINSCRIPTS), $(bindir)/$(var))
55    
56  lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var))  lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var))
57    
58    schematools: $(foreach var, $(subst .st,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)/$(var).py) $(foreach var, $(subst .st,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)/$(var).sql) $(foreach var, $(subst .st,,$(SCHEMATOOLS)), $(libdir)/$(PKGNAME)/$(var)DbiHandler.py)
59    
60  test:  test:
61    
62  clean:  clean:
63    
64  ##  ########################################################################
65  # Rules  # Rules
66  ##  ########################################################################
67    
68    ##
69    # lib related
70    ##
71    # verbatim copy from sourcedir to libdir, e.g., py (distutils someday...)
72  $(libdir)/$(PKGNAME)/%: $(TOPDIR)/$(PKGNAME)/%  $(libdir)/$(PKGNAME)/%: $(TOPDIR)/$(PKGNAME)/%
73          cp -p  $< $@          cp -p  $< $@
74    
75  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%  # generate .py from schematools description of class. (Kah related)
76          cp -p  $< `dirname $@`/`basename $@ .py`  $(libdir)/$(PKGNAME)/%.py: $(TOPDIR)/$(PKGNAME)/%.st
77            cd $(libdir)/$(PKGNAME); generatePy $< > $@
78    
79    # generate .sql from schematools description of class. (Kah related)
80    $(libdir)/$(PKGNAME)/%.sql: $(TOPDIR)/$(PKGNAME)/%.st
81            cd $(libdir)/$(PKGNAME); generateDb $< > $@
82    
83    # generate object/relational converters from schematools
84    # description of class. (Kah related)
85    $(libdir)/$(PKGNAME)/%DbiHandler.py: $(TOPDIR)/$(PKGNAME)/%.st
86            cd $(libdir)/$(PKGNAME); generateDbiHandler $< > $@
87    
88  ##  ##
89    # bin related
90    ##
91    # python scripts. make script, "foo" from "foo.py".  (rewrite path #! someday)
92    $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.py
93            cp -p  $< $@
94    
95    # scripts to copy verbatim.
96    $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%
97            cp -p  $< $@
98    
99    
100    ########################################################################
101  # Dependency generation  # Dependency generation
102    ########################################################################
103  #  #
104  # not written yet.  (of all the things not to have...)  # not written yet.  (of all the things not to have...)
105  #  #

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3