-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile.utils
81 lines (54 loc) · 1.48 KB
/
Makefile.utils
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#
# $Id$
#
# utils Makefile
#(to be included from each util/ subdirectory)
#
# History:
# --------
# 2009-04-23 initial version derived from Makefile.modules (andrei)
# default path to the core makefiles
COREPATH ?=../..
ALLDEP=Makefile $(COREPATH)/Makefile.sources $(COREPATH)/Makefile.rules \
$(COREPATH)/Makefile.utils $(COREPATH)/Makefile.dirs $(COREPATH)/config.mak
#override modules value, an util cannot have submodules
override modules=
override static_modules=
override static_modules_path=
ifneq ($(makefile_defs_included),1)
$(error "the local makefile does not include Makefile.defs!")
endif
ifeq ($(MAKELEVEL), 0)
# make called directly in the module dir!
else
# called by the main Makefile
ALLDEP+=$(COREPATH)/Makefile
endif
include $(COREPATH)/Makefile.sources
# if config was not loaded (makefile_defs!=1) ignore
# the rest of makefile and try only to remake the config
ifeq ($(makefile_defs),1)
include $(COREPATH)/Makefile.dirs
include $(COREPATH)/Makefile.targets
include $(COREPATH)/Makefile.rules
modules:
# README build rules
ifneq (,$(wildcard doc/Makefile))
#doc/Makefile present => we can generate README
README: doc/*.xml
$(MAKE) -C doc $(MOD_NAME).txt
mv doc/$(MOD_NAME).txt $@
else
# do nothing
README:
endif
#man page build rules
ifneq (,$(wildcard $(MOD_NAME).xml))
$(MOD_NAME).7: $(MOD_NAME).xml
docbook2x-man -s ../../doc/stylesheets/serdoc2man.xsl $<
man: $(MOD_NAME).7
else
man:
endif
endif # ifeq($(makefile_defs),1)
include $(COREPATH)/Makefile.cfg