summaryrefslogtreecommitdiff
path: root/makefiles/gmake/top.mk
blob: e8dd7c57d6af74698dd7b61033312766a892bbb5 (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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# top-level makefile for a package
#
# requires:
# - TOPDIR
# - SUBDIRS
#
# provides:
# - target 'all'
# - target 'clean'
# - target 'distclean'
# - target 'test'
# - target 'doc'
# - target 'dist'
# - target 'help'
# - target 'install'
# - target 'uninstall'
# - target 'config'

-include makefiles/gmake/platform.mk

.PHONY: all
all:
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d all || exit 1); done)

.PHONY: clean
clean:
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d clean || exit 1); done)
	@-test ! -f $(TOPDIR)/makefiles/gmake/platform.mk.vars && rm $(TOPDIR)/makefiles/gmake/platform.mk.vars
	@-test ! -f $(TOPDIR)/makefiles/gmake/platform.vars || rm $(TOPDIR)/makefiles/gmake/platform.vars

.PHONY: distclean
distclean:
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d distclean || exit 1); done)
	@-test ! -f  $(TOPDIR)/makefiles/gmake/platform.mk.vars || rm $(TOPDIR)/makefiles/gmake/platform.mk.vars
	@-test ! -f $(TOPDIR)/makefiles/gmake/platform.vars || rm $(TOPDIR)/makefiles/gmake/platform.vars

.PHONY: install
install:
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d install || exit 1); done)

.PHONY: uninstall
uninstall:
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d uninstall || exit 1); done)

.PHONY: test
test: all
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d test || exit 1); done)

.PHONY: longtest
longtest: test
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d longtest || exit 1); done)

.PHONY: help
help:
	@cat $(TOPDIR)/makefiles/gmake/help.mk

.PHONY: config
config:
	@echo "Build Configuration"
	@echo "-------------------"
	@echo
	@echo "Operating system: $(PLATFORM), $(OS_MAJOR_VERSION).$(OS_MINOR_VERSION)"
	@echo "Architecture: $(ARCH)"
	@echo "System library directory: $(LIBDIR)"
ifeq "$(PLATFORM)" "LINUX"
	@echo "Linux distribution: $(LINUX_DIST) $(LINUX_REV)"
endif
	@echo "C++ Compiler: $(COMPILER)"
	@echo
	@echo "Optional Dependencies:"
ifeq ($(WITH_SQLITE3),1)
ifeq ($(WITH_SYSTEM_SQLITE3),1)
	@echo
	@echo "SQLITE3_DIR: $(SQLITE3_DIR)"
	@echo "SQLITE3_INCLUDE_DIR: $(SQLITE3_INCLUDE_DIR)"
	@echo "SQLITE3_LIB_DIR: $(SQLITE3_LIB_DIR)"
	@echo "SQLITE3_LIBS: $(SQLITE3_LIBS)"
endif
ifeq ($(WITH_LOCAL_SQLITE3),1)
	@echo
	@echo "using local Sqlite3 amalgamation sources.."
endif
endif
ifeq ($(WITH_PGSQL),1)
	@echo
	@echo "PGSQL_DIR: $(PGSQL_DIR)"
	@echo "PGSQL_INCLUDE_DIRS: $(PGSQL_INCLUDE_DIRS)"
	@echo "PGSQL_LIB_DIRS: $(PGSQL_LIB_DIRS)"
	@echo "PGSQL_LIBS: $(PGSQL_LIBS)"
endif
ifeq ($(WITH_LIBXML2),1)
	@echo
	@echo "LIBXML2_DIR: $(LIBXML2_DIR)"
	@echo "LIBXML2_INCLUDE_DIRS: $(LIBXML2_INCLUDE_DIRS)"
	@echo "LIBXML2_LIB_DIRS: $(LIBXML2_LIB_DIRS)"
	@echo "LIBXML2_LIBS: $(LIBXML2_LIBS)"
endif
	@echo
	@echo "Additional build options:"
	@echo
ifeq ($(ENABLE_NLS),0)
	@echo "NLS support is disabled"
else
	@echo "NLS support is enabled"
endif
	@echo

.PHONY: init-po
init-po:
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d init-po || exit 1); done)

.PHONY: merge-po
merge-po:
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d merge-po || exit 1); done)

.PHONY: check-po
check-po:
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d check-po || exit 1); done)

-include $(TOPDIR)/makefiles/gmake/dist.mk