[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.15, Fri Apr 22 16:21:44 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  # WEBPAGES     : list of stuff to copy to $(cgidir)/Html.  built in bin: step  # 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  #  #
 # PYTHON_OPEN_CGI : list of py scripts to install as cgi scripts in bin step  
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 49  Line 54 
54  ########################################################################  ########################################################################
55    
56    
57  LIBPYFILES := $(filter-out $(BINPYSCRIPTS) $(PYTHON_OPEN_CGI) $(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 61  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))  opencgi webpages  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)))
   
 lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var))  
72    
73  opencgi: $(foreach var, $(PYTHON_OPEN_CGI), $(subst .py,.cgi, $(cgidir)/$(var)))  lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var)) $(foreach var, $(LIBPERLFILES), $(libdir)/$(PKGNAME)/$(var)) $(LIBCFILES)
   
 webpages: $(foreach var, $(WEBPAGES), $(cgidir)/Html/$(var))  
74    
75  schematools: stDeclFiles stGeneratedFiles  schematools: stDeclFiles stGeneratedFiles
76    
# Line 75  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 87  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 94  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 122  Line 133 
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
# Line 138  Line 159 
159          cp -p  $< $@          cp -p  $< $@
160          chmod 755 $@          chmod 755 $@
161    
 ##  
 # cgi related  
 ##  
   
 $(cgidir)/Html/%: $(TOPDIR)/$(PKGNAME)/%  
         cp -p $< $(cgidir)/Html/.  
   
 $(cgidir)/%.cgi: $(TOPDIR)/$(PKGNAME)/%.py $(TOOL_HDR_PY)  
         ( cat $(TOOL_HDR_PY) $< > $@; chmod +x $@ )  
   
162    
163  ########################################################################  ########################################################################
164  # Dependency generation  # Dependency generation

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3