[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.9, Fri Mar 11 22:26:14 2005 UTC revision 1.16, Fri Apr 22 17:35:12 2005 UTC
# Line 22  Line 22 
22  # Document macros users define in their package level makefiles here:  # Document macros users define in their package level makefiles here:
23  ########################################################################  ########################################################################
24  #  #
25    # CBINS       := foo.c bar.c etc.  List of .c binaries to build.
26    #
27    # CEXCLUDES   := list of .c files, besides $(CBINS), to exclude from the
28    #                list of C code to build into a .o
29    #
30    #
31  #BINPYSCRIPTS := script1.py etc.  List of py scripts to install in bin.  #BINPYSCRIPTS := script1.py etc.  List of py scripts to install in bin.
32  #                Installed as script1, not script1.py.  Filtered out of  #                Installed as script1, not script1.py.  Filtered out of
33  #                python library list (LIBPYFILES)  #                python library list (LIBPYFILES)
34    #BINPERLSCRIPTS := script1.pl etc.  List of perl scripts to install in bin.
35    #                Installed as script1, not script1.pl.  Filtered out of
36    #                python library list (LIBPYFILES)
37  #BINSHSCRIPTS:   List of borne shell scripts to be copied to bin verbatim.  #BINSHSCRIPTS:   List of borne shell scripts to be copied to bin verbatim.
38  #  #
39  #SCHEMATOOLS := file.py, etc.  List of python files defining input to schema  #SCHEMATOOLS := file.py, etc.  List of python files defining input to schema
# Line 46  Line 55 
55    
56    
57  LIBPYFILES := $(filter-out $(BINPYSCRIPTS) $(SCHEMATOOLS), $(wildcard *.py))  LIBPYFILES := $(filter-out $(BINPYSCRIPTS) $(SCHEMATOOLS), $(wildcard *.py))
58    LIBPERLFILES := $(filter-out $(BINPERLSCRIPTS), $(wildcard *.pl))
59    LIBCFILES := $(foreach var, $(filter-out $(CBINS) $(CEXCLUDES), $(wildcard *.c)), $(libdir)/$(PKGNAME)/$(subst .c,.o,$(var)))
60    
61    
62  ########################################################################  ########################################################################
# Line 58  Line 68 
68    
69  all: schematools lib bin  all: schematools lib bin
70    
71  bin:    $(foreach var, $(BINPYSCRIPTS), $(subst .py,,$(bindir)/$(var))) $(foreach var, $(BINSHSCRIPTS), $(subst .sh,,$(bindir)/$(var))) $(foreach var, $(BINSCRIPTS), $(bindir)/$(var))  bin:      $(foreach var, $(BINPYSCRIPTS), $(subst .py,,$(bindir)/$(var))) $(foreach var, $(BINPERLSCRIPTS), $(subst .pl,,$(bindir)/$(var))) $(foreach var, $(BINSHSCRIPTS), $(subst .sh,,$(bindir)/$(var))) $(foreach var, $(BINSCRIPTS), $(bindir)/$(var)) $(foreach var, $(CBINS), $(subst .c,,$(bindir)/$(var)))
72    
73  lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var))  lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var)) $(foreach var, $(LIBPERLFILES), $(libdir)/$(PKGNAME)/$(var)) $(LIBCFILES)
74    
75  schematools: stDeclFiles stGeneratedFiles  schematools: stDeclFiles stGeneratedFiles
76    
# Line 68  Line 78 
78    
79  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)  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)
80    
81  test:  #test:
82    
83  clean:  clean:
84    
# Line 80  Line 90 
90  # lib related  # lib related
91  ##  ##
92    
93    $(libdir)/$(PKGNAME)/%.o:  $(TOPDIR)/$(PKGNAME)/%.c
94            $(CC) $(CFLAGS) -c -o $@ $<
95    
96  $(libdir)/$(PKGNAME)/%.py: $(TOPDIR)/$(PKGNAME)/%.py  $(libdir)/$(PKGNAME)/%.py: $(TOPDIR)/$(PKGNAME)/%.py
97          cp -p  $< $@          cp -p  $< $@
# Line 87  Line 99 
99  $(libdir)/$(PKGNAME)/__init__.py: $(TOPDIR)/$(PKGNAME)/__init__.py  $(libdir)/$(PKGNAME)/__init__.py: $(TOPDIR)/$(PKGNAME)/__init__.py
100          cp -p  $< $@          cp -p  $< $@
101    
102    $(libdir)/$(PKGNAME)/%.pl: $(TOPDIR)/$(PKGNAME)/%.pl
103            cp -p  $< $@
104    
105    
106  # verbatim copy from sourcedir to libdir, e.g., py (distutils someday...)  # verbatim copy from sourcedir to libdir, e.g., py (distutils someday...)
107  # keep this overly generic one below the more specific py, above.  # keep this overly generic one below the more specific py, above.
108    #
109    # why is this here??? -ed
110  $(libdir)/$(PKGNAME)/%: $(TOPDIR)/$(PKGNAME)/%  $(libdir)/$(PKGNAME)/%: $(TOPDIR)/$(PKGNAME)/%
111          cp -p  $< $@          cp -p  $< $@
112    
# Line 101  Line 119 
119  # grok yet  # grok yet
120    
121  $(libdir)/$(PKGNAME)Gen/%_st.py: $(TOPDIR)/$(PKGNAME)/%.py  $(libdir)/$(PKGNAME)/__init__.py  $(libdir)/$(PKGNAME)Gen/%_st.py: $(TOPDIR)/$(PKGNAME)/%.py  $(libdir)/$(PKGNAME)/__init__.py
122          cd $(libdir)/$(PKGNAME); $(bindir)/generatePy $< > $@          cd $(libdir)/$(PKGNAME); env PYTHONPATH=$(libdir) $(bindir)/generatePy $< > $@
123    
124  # generate .sql from schematools description of class. (Kah related)  # generate .sql from schematools description of class. (Kah related)
125  $(libdir)/$(PKGNAME)Gen/%.sql: $(TOPDIR)/$(PKGNAME)/%.py  $(libdir)/$(PKGNAME)Gen/%.sql: $(TOPDIR)/$(PKGNAME)/%.py
126          cd $(libdir)/$(PKGNAME); $(bindir)/generateDb $< > $@          cd $(libdir)/$(PKGNAME); env PYTHONPATH=$(libdir) $(bindir)/generateDb $< > $@
127    
128  # generate object/relational converters from schematools  # generate object/relational converters from schematools
129  # description of class. (Kah related)  # description of class. (Kah related)
130  $(libdir)/$(PKGNAME)Gen/%DbiHandler.py: $(TOPDIR)/$(PKGNAME)/%.py  $(libdir)/$(PKGNAME)Gen/%DbiHandler.py: $(TOPDIR)/$(PKGNAME)/%.py
131          cd $(libdir)/$(PKGNAME); $(bindir)/generateDbiHandler $< > $@          $(libdir)/$(PKGNAME); env PYTHONPATH=$(libdir) $(bindir)/generateDbiHandler $< > $@
132    
133  ##  ##
134  # bin related  # bin related
135  ##  ##
136    
137    # C excecutables.
138    $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.c
139            $(CC) $(CFLAGS) -o $@ $< $(wildcard $(libdir)/$(PKGNAME)/*.o)
140    
141  # python scripts. make script, "foo" from "foo.py".  (rewrite path #! someday)  # python scripts. make script, "foo" from "foo.py".  (rewrite path #! someday)
142  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.py  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.py
143          cp -p  $< $@          cp -p  $< $@
144          chmod 755 $@          chmod 755 $@
145    
146    # perl scripts. make script, "foo" from "foo.pl".  (rewrite path #! someday)
147    $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.pl
148            cp -p  $< $@
149            chmod 755 $@
150    
151  # borne shell scripts  # borne shell scripts
152    
153  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.sh  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.sh

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3