]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
d228d5f9f2301f70b866a3b5bbfcd9b75ea48823
[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 #abs-srcdir := $(shell cd $(depth); pwd)
9 ##deprecated
10 #topdir := $(abs-srcdir)
11 #endif
12
13 ## `which pwd` is to prevent symlink resolving intelligence 
14 pwd:=$(shell `which pwd`)
15 current-relative-dir:=$(subst $(strip $(shell cd $(depth); `which pwd`)),,$(pwd))
16
17 ifeq ($(srcdir),.)
18 src-depth = $(depth)
19 else
20 src-depth = $(srcdir)
21 endif
22
23 ifeq ($(topdir),)
24 abs-srcdir := $(shell cd $(src-depth); pwd)
25 topdir := $(abs-srcdir)
26 endif
27
28 # derived names
29 ifeq ($(distdir),)
30   distdir = $(topdir)/$(outdir)/$(DIST_NAME)
31   DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
32 endif
33 distname = $(package)-$(TOPLEVEL_VERSION)
34
35 doc-dir = $(src-depth)/Documentation
36 po-dir = $(src-depth)/po
37
38 # sort-out which of these are still needed
39 #
40 $(package)_bindir = $(depth)/bin
41 step-bindir = $(stepmake)/bin
42
43 group-dir = $(shell cd $(DEPTH);pwd)/..
44 release-dir = $(group-dir)/releases
45 patch-dir = $(group-dir)/patches
46 #
47 # i have in $HOME/.rpmrc
48 #     topdir: /home/fred/usr/src/Redhat
49 #
50 rpm-sources = $(release-dir)
51 rpm-build = $(group-dir)/RedHat/BUILD
52 #
53
54 # package-icon=$(outdir)/$(package)-icon.gif
55 package-icon=$(outdir)/$(package)-icon.xpm
56
57
58 # need to be defined in local Makefiles:
59 #
60 FOOBAR = 
61 # the version:
62 #
63 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
64 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
65 else
66 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
67 endif
68
69 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
70 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
71 else
72 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
73 endif
74
75
76 # no local settings in the build process.
77 LANG=
78 export LANG
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 INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
87
88 M4 = m4
89
90 #replace to do stripping of certain objects
91 STRIPDEBUG=true 
92
93 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES)  $(wildcard SConscript)
94 DOCDIR=$(depth)/$(outdir)
95
96 STRIP=strip --strip-debug
97
98 # substitute $(STRIP) in Site.make if you want stripping
99 DO_STRIP=true
100 LOOP=$(foreach i,  $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
101
102 ETAGS_FLAGS =
103 CTAGS_FLAGS = 
104
105 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
106
107 IN_FILES := $(wildcard *.in)
108 SOURCE_FILES += $(IN_FILES)
109
110 # Preprocessed .in documentation _FILES:
111 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
112
113 ALL_SOURCES = $(SOURCE_FILES)
114
115 # Check if we are building for Cygwin
116 #
117 HOST_ARCH=$(shell $(CC) -dumpmachine)
118 ifeq ($(HOST_ARCH),i686-pc-cygwin)
119 CYGWIN_BUILD = yes
120 endif
121 #
122 # ugh-- what if someone decides on: 'i568-pc-cygwin-gnu'
123 ifeq ($(HOST_ARCH),i686-cygwin)
124 CYGWIN_BUILD = yes
125 endif