]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
patch::: 1.3.130.jcn2
[lilypond.git] / stepmake / stepmake / generic-vars.make
1 # title    generic variables
2 # file     make/Variables.make
3 #
4 # do not change this file for site-wide extensions; please use 
5 # make/$(outdir)/Site.make; 
6 #
7 # Any change in files in this directory (make/) would be distributed, if 
8 # you do make dist 
9
10 # directory names:
11
12 # depth from group-dir
13 # internal, not normally used
14 DEPTH = $(depth)/$(package-depth)
15
16 ifeq ($(topdir),)
17 topdir := $(shell cd $(depth); pwd)
18 endif
19 pwd := $(shell pwd)
20
21 # $(depth) is deprecated, for most cases you'll want $(src-depth)
22 #
23 # Well, on second thought.
24 # It can do no harm, but using src-depth iso depth is only necessary
25 # for broken rules that do
26 #    cd $(outdir) && foo  $(depth) ...
27 src-depth = $(depth)/$(srcdir)
28
29 # derived names
30 ifeq ($(distdir),)
31   distdir = $(topdir)/$(outdir)/$(DIST_NAME)
32   DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
33 endif
34 distname = $(package)-$(TOPLEVEL_VERSION)
35
36 # obsolete?
37 #makeout = $(depth)/make/$(outdir)
38 #docout = $(depth)/Documentation/$(outdir)
39 #binout = $(depth)/bin/$(outdir)
40
41 doc-dir = $(src-depth)/Documentation
42 po-dir = $(src-depth)/po
43
44 # sort-out which of these are still needed
45 #
46 $(package)_bindir = $(depth)/bin
47 step-bindir = $(stepmake)/bin
48
49 group-dir = $(shell cd $(DEPTH)/..; pwd)
50 release-dir = $(group-dir)/releases
51 patch-dir = $(group-dir)/patches
52 #
53 # i have in $HOME/.rpmrc
54 #     topdir: /home/fred/usr/src/Redhat
55 #
56 rpm-sources = $(release-dir)
57 rpm-build = $(group-dir)/RedHat/BUILD
58 #
59
60
61 # need to be defined in local Makefiles:
62 #
63 FOOBAR = 
64 # the version:
65 #
66 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
67 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
68 else
69 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
70 endif
71
72 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
73 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
74 else
75 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
76 endif
77
78
79
80 # clean file lists:
81 #
82 ERROR_LOG = 2> /dev/null
83 SILENT_LOG = 2>&1 >  /dev/null
84 date := $(shell date +%x)       #duplicated?
85
86 # compile and link options:
87 #
88 ARFLAGS = ru
89
90 #INCLUDES =  $(depth)/$(builddir) include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
91 INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
92
93 # urg: for windows ?
94 # LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -lstdc++
95 #
96
97 # macro compiler:
98 #
99 M4 = m4
100
101
102 #
103 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
104 #
105
106 # dependencies:
107 #
108 depfile = $(outdir)/$(subst .o,.dep,$(notdir $@))#
109 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
110 #
111
112
113 # generic target names:
114 #
115 ifdef NAME
116 EXECUTABLE = $(outdir)/$(NAME)
117 else
118 EXECUTABLE =
119 endif
120
121 EXECUTABLES = $(notdir $(EXECUTABLE))
122
123
124 #
125
126 #replace to do stripping of certain objects
127 STRIPDEBUG=true 
128
129 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES)
130 DOCDIR=$(depth)/$(outdir)
131
132
133 STRIP=strip --strip-debug
134 ifdef stablecc
135  STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
136 endif
137
138 # substitute $(STRIP) in Site.make if you want stripping
139 DO_STRIP=true
140 LOOP=$(foreach i,  $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
141
142 # different redhat releases need different flags for etags. Just use defaults.
143 ETAGS_FLAGS= # -CT
144 CTAGS_FLAGS=-h
145
146 include $(stepdir)/files.make
147