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

Annotation of /ReleaseTools/standard.mk

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download)

1 : efrank 1.1 #######################################################################
2 :     # standard.mk
3 :     #
4 :     # Centralized make rules, macros, etc., shared amongst the packages.
5 :     # Package level makefiles do not define rules, targets, etc. Instead,
6 :     # they define a few macros needed to generate the build lists and
7 :     # standard.mk does the rest.
8 :     #
9 :     # The general pattern is to have "all of a kind" selected by wildcard
10 :     # into a build product, e.g., all .c or .cc go into a library or
11 :     # all .py get .pyc'd into the install area. But, there are a few
12 :     # macro's that define things to exclude, e.g., .c files that have main()
13 :     # and are executables or foo.py files that are top-level programs and
14 :     # are to be installed in bin as foo.
15 :     #
16 :     # A package level makefile does "include standard.mk". This works because
17 :     # of -I's in the Makefile.top in the workdir. See Makefile.PackageSample.
18 :     #
19 :     #######################################################################
20 :    
21 :     ##
22 :     # Document macros users define in their package level makefiles here:
23 :     ##
24 :    
25 :     #
26 :     #BINPYSCRIPTS := script1.py etc. List of py scripts to install in bin.
27 :     # Installed as script1, not script1.py. Filtered out of
28 :     # python library list (LIBPYFILES)
29 :     #
30 :     #BINSCRIPTS: List of scripts to be copied to bin verbatim.
31 :     #
32 :     # (NB: haven't really coded rules to handle these two separately, correctly
33 :     # yet
34 :    
35 :    
36 :    
37 :     ##
38 :     # Various lists of things to build
39 :     ##
40 :    
41 :     LIBPYFILES := $(filter-out $(BINPYSCRIPTS), $(wildcard *.py))
42 :    
43 :    
44 :    
45 :     ##
46 :     # Targets
47 :     ##
48 :    
49 :     all: lib bin
50 :    
51 :     bin: $(foreach var, $(BINPYSCRIPTS), $(bindir)/$(var))
52 :    
53 :     lib: $(foreach var, $(LIBPYFILES), $(libdir)/$(PKGNAME)/$(var))
54 :    
55 :     test:
56 :    
57 :     clean:
58 :    
59 :     ##
60 :     # Rules
61 :     ##
62 :    
63 :     $(libdir)/$(PKGNAME)/%: $(TOPDIR)/$(PKGNAME)/%
64 :     cp -p $< $@
65 :    
66 :     $(bindir)/%: $(TOPDIR)/$(PKGNAME)/%
67 :     cp -p $< `dirname $@`/`basename $@ .py`
68 :    
69 :    
70 :     ##
71 :     # Dependency generation
72 :     #
73 :     # not written yet. (of all the things not to have...)
74 :     #

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3