]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
patch::: 1.3.144.jcn4
[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 # package-icon=$(outdir)/$(package)-icon.gif
61 package-icon=$(outdir)/$(package)-icon.xpm
62
63
64 # need to be defined in local Makefiles:
65 #
66 FOOBAR = 
67 # the version:
68 #
69 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
70 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
71 else
72 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
73 endif
74
75 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
76 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
77 else
78 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
79 endif
80
81
82
83 # clean file lists:
84 #
85 ERROR_LOG = 2> /dev/null
86 SILENT_LOG = 2>&1 >  /dev/null
87 date := $(shell date +%x)       #duplicated?
88
89 # compile and link options:
90 #
91 ARFLAGS = ru
92
93 #INCLUDES =  $(depth)/$(builddir) include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
94 INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
95
96 # urg: for windows ?
97 # LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -lstdc++
98 #
99
100 # macro compiler:
101 #
102 M4 = m4
103
104
105 #
106 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
107 #
108
109 # dependencies:
110 #
111 depfile = $(outdir)/$(subst .o,.dep,$(notdir $@))#
112 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
113 #
114
115
116 # generic target names:
117 #
118 ifdef NAME
119 EXECUTABLE = $(outdir)/$(NAME)
120 else
121 EXECUTABLE =
122 endif
123
124 EXECUTABLES = $(notdir $(EXECUTABLE))
125
126
127 #
128
129 #replace to do stripping of certain objects
130 STRIPDEBUG=true 
131
132 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES)
133 DOCDIR=$(depth)/$(outdir)
134
135
136 STRIP=strip --strip-debug
137 ifdef stablecc
138  STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
139 endif
140
141 # substitute $(STRIP) in Site.make if you want stripping
142 DO_STRIP=true
143 LOOP=$(foreach i,  $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
144
145 # different redhat releases need different flags for etags. Just use defaults.
146 ETAGS_FLAGS= # -CT
147 CTAGS_FLAGS=-h
148
149 include $(stepdir)/files.make
150