[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.14, Wed Apr 13 01:46:06 2005 UTC revision 1.15, Fri Apr 22 16:21:44 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.  # WEBPAGES     : list of stuff to copy to $(cgidir)/Html.  built in bin: step
 #  
 # CEXCLUDES   := list of .c files, besides $(CBINS), to exclude from the  
 #                list of C code to build into a .o  
26  #  #
27    # PYTHON_OPEN_CGI : list of py scripts to install as cgi scripts in bin step
28  #  #
29  #BINPYSCRIPTS := script1.py etc.  List of py scripts to install in bin.  #BINPYSCRIPTS := script1.py etc.  List of py scripts to install in bin.
30  #                Installed as script1, not script1.py.  Filtered out of  #                Installed as script1, not script1.py.  Filtered out of
31  #                python library list (LIBPYFILES)  #                python library list (LIBPYFILES)
 #BINPERLSCRIPTS := script1.pl etc.  List of perl scripts to install in bin.  
 #                Installed as script1, not script1.pl.  Filtered out of  
 #                python library list (LIBPYFILES)  
32  #BINSHSCRIPTS:   List of borne shell scripts to be copied to bin verbatim.  #BINSHSCRIPTS:   List of borne shell scripts to be copied to bin verbatim.
33  #  #
34  #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 54  Line 49 
49  ########################################################################  ########################################################################
50    
51    
52  LIBPYFILES := $(filter-out $(BINPYSCRIPTS) $(SCHEMATOOLS), $(wildcard *.py))  LIBPYFILES := $(filter-out $(BINPYSCRIPTS) $(PYTHON_OPEN_CGI) $(SCHEMATOOLS), $(wildcard *.py))
 LIBPERLFILES := $(filter-out $(BINPERLSCRIPTS), $(wildcard *.pl))  
 LIBCFILES := $(foreach var, $(filter-out $(CBINS) $(CEXCLUDES), $(wildcard *.c)), $(libdir)/$(PKGNAME)/$(subst .c,.o,$(var)))  
53    
54    
55  ########################################################################  ########################################################################
# Line 68  Line 61 
61    
62  all: schematools lib bin  all: schematools lib bin
63    
64  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)))  bin:    $(foreach var, $(BINPYSCRIPTS), $(subst .py,,$(bindir)/$(var))) $(foreach var, $(BINSHSCRIPTS), $(subst .sh,,$(bindir)/$(var))) $(foreach var, $(BINSCRIPTS), $(bindir)/$(var))  opencgi webpages
65    
66    lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var))
67    
68  lib:    $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var)) $(foreach var, $(LIBPERLFILES), $(libdir)/$(PKGNAME)/$(var)) $(LIBCFILES)  opencgi: $(foreach var, $(PYTHON_OPEN_CGI), $(subst .py,.cgi, $(cgidir)/$(var)))
69    
70    webpages: $(foreach var, $(WEBPAGES), $(cgidir)/Html/$(var))
71    
72  schematools: stDeclFiles stGeneratedFiles  schematools: stDeclFiles stGeneratedFiles
73    
# Line 78  Line 75 
75    
76  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)
77    
78  #test:  test:
79    
80  clean:  clean:
81    
# Line 90  Line 87 
87  # lib related  # lib related
88  ##  ##
89    
 $(libdir)/$(PKGNAME)/%.o:  $(TOPDIR)/$(PKGNAME)/%.c  
         $(CC) $(CFLAGS) -c -o $@ $<  
90    
91  $(libdir)/$(PKGNAME)/%.py: $(TOPDIR)/$(PKGNAME)/%.py  $(libdir)/$(PKGNAME)/%.py: $(TOPDIR)/$(PKGNAME)/%.py
92          cp -p  $< $@          cp -p  $< $@
# Line 99  Line 94 
94  $(libdir)/$(PKGNAME)/__init__.py: $(TOPDIR)/$(PKGNAME)/__init__.py  $(libdir)/$(PKGNAME)/__init__.py: $(TOPDIR)/$(PKGNAME)/__init__.py
95          cp -p  $< $@          cp -p  $< $@
96    
 $(libdir)/$(PKGNAME)/%.pl: $(TOPDIR)/$(PKGNAME)/%.pl  
         cp -p  $< $@  
   
   
97  # verbatim copy from sourcedir to libdir, e.g., py (distutils someday...)  # verbatim copy from sourcedir to libdir, e.g., py (distutils someday...)
98  # keep this overly generic one below the more specific py, above.  # keep this overly generic one below the more specific py, above.
 #  
 # why is this here??? -ed  
99  $(libdir)/$(PKGNAME)/%: $(TOPDIR)/$(PKGNAME)/%  $(libdir)/$(PKGNAME)/%: $(TOPDIR)/$(PKGNAME)/%
100          cp -p  $< $@          cp -p  $< $@
101    
# Line 133  Line 122 
122  ##  ##
123  # bin related  # bin related
124  ##  ##
   
 # C excecutables.  
 $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.c  
         $(CC) $(CFLAGS) -o $@ $< $(wildcard $(libdir)/$(PKGNAME)/*.o)  
   
125  # python scripts. make script, "foo" from "foo.py".  (rewrite path #! someday)  # python scripts. make script, "foo" from "foo.py".  (rewrite path #! someday)
126  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.py  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.py
127          cp -p  $< $@          cp -p  $< $@
128          chmod 755 $@          chmod 755 $@
129    
 # perl scripts. make script, "foo" from "foo.pl".  (rewrite path #! someday)  
 $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.pl  
         cp -p  $< $@  
         chmod 755 $@  
   
130  # borne shell scripts  # borne shell scripts
131    
132  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.sh  $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%.sh
# Line 159  Line 138 
138          cp -p  $< $@          cp -p  $< $@
139          chmod 755 $@          chmod 755 $@
140    
141    ##
142    # cgi related
143    ##
144    
145    $(cgidir)/Html/%: $(TOPDIR)/$(PKGNAME)/%
146            cp -p $< $(cgidir)/Html/.
147    
148    $(cgidir)/%.cgi: $(TOPDIR)/$(PKGNAME)/%.py $(TOOL_HDR_PY)
149            ( cat $(TOOL_HDR_PY) $< > $@; chmod +x $@ )
150    
151    
152  ########################################################################  ########################################################################
153  # Dependency generation  # Dependency generation

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3