summaryrefslogtreecommitdiff
path: root/make/srcdir.make.in
blob: 95954a1b234d6f0ac18b9e4598661b92761ef1ed (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*-Makefile-*-
# specific srcdir makefile for LilyPond  

depth=.

# Don't try to outsmart us, you puny computer!
ifeq (0,${MAKELEVEL})
  MAKE:=$(MAKE) --no-builtin-rules
endif

# Use alternate configurations alongside eachother:
#
#     ./configure --enable-configsuffix=debug
#     make conf=debug
#
# uses config-debug.make and config-debug.h; output goes to out-debug.
#
ifdef conf
  CONFIGSUFFIX=-$(conf)
endif

# Use same configuration, but different output directory:
#
#     make out=WWW
#
# uses config.make and config.h; output goes to out-WWW.
#
ifdef out
  outbase=out-$(out)
else
  outbase=out$(CONFIGSUFFIX)
endif

config = config$(CONFIGSUFFIX).make

include $(config)

SRCDIR=$(MAKE) -C $(srcdir) -f GNUmakefile.in builddir=$(builddir) $@

default: all

%:
	$(SRCDIR)