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