File: Makefile.in

package info (click to toggle)
icinga-web 1.7.1%2Bdfsg2-6
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 83,496 kB
  • sloc: php: 252,926; xml: 142,251; sql: 8,190; sh: 1,039; makefile: 575; perl: 215; python: 194
file content (322 lines) | stat: -rw-r--r-- 9,139 bytes parent folder | download
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
SHELL=/bin/sh

PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_VERSION=@PACKAGE_VERSION@

VERSION_MAJOR=@VERSION_MAJOR@
VERSION_MINOR=@VERSION_MINOR@
VERSION_PATCH=@VERSION_PATCH@
VERSION_EXTEN=@VERSION_EXTEN@

RELEASE_DATE=@RELEASE_DATE@
TAR_DIR_NAME=$(shell basename `pwd`)

prefix=@prefix@
exec_prefix=@exec_prefix@
LOGDIR=@web_log_dir@
CFGDIR=@sysconfdir@
BINDIR=@bindir@
CGIDIR=@sbindir@
HTMLDIR=@datarootdir@

INSTALL=@INSTALL@
INSTALL_OPTS=@INSTALL_OPTS@
INSTALL_OPTS_WEB=@INSTALL_OPTS_WEB@
INSTALL_OPTS_CACHE=@INSTALL_OPTS_CACHE@

BIN_USER=@bin_user@
BIN_GROUP=@bin_group@
WEB_USER=@web_user@
WEB_GROUP=@web_group@
WEB_PATH=@web_path@
WEB_APACHE_PATH=@web_apache_path@

SED=@SED@
PHP=@PHP@
PHING=@PHING@
PHING_CALL=cd @srcdir@/etc/ && ../bin/phing -f build.xml
PHPUNIT=@PHPUNIT@
PHPCS=@PHPCS@

API_DIR=@icinga_api@

LOC_PO=app/data/i18n/po
LOC_MO=app/data/i18n/mo
LOC_TEMPLATE=$(LOC_PO)/templates/default.pot

SRC_DIR=@srcdir@
SRC_LIB=@srcdir@/lib
SRC_PUB=@srcdir@/pub
SRC_ETC=@srcdir@/etc
SRC_BIN=@srcdir@/bin
SRC_DOC=@srcdir@/doc
SRC_APP=@srcdir@/app
SRC_SITE=@srcdir@/etc/conf.d

none:
#	@printf "\t%-22s - %s\n" "" ""
	@printf "Please supply a command line argument (i.e. 'make install').\n\n"
	@printf "Generic targets: install, clean\n\n"
	@printf "For updates please use 'upgrade' to avoid overwriting your siteconfig!\n\n"
	@printf "Other usefull targets:\n"
	@printf "\t%-22s - %s\n" "testdeps" "test php dependencies"
	@printf "\t%-22s - %s\n" "create-tarball" "creates a tarball for packaging"
	@printf "\t%-22s - %s\n" "create-tarball-nightly" "creates a tarball from HEAD for nightly builds"
	@printf "\t%-22s - %s\n" "cacheclean" "purges the agavi xml cache"
	
	@printf "\nDatabase (web) targets:\n"
	@printf "\t%-22s - %s\n" "db-initialize" "create the db"
	@printf "\t%-22s - %s\n" "db-deinitialize" "reverse the path (removes all data and drop the relations)"
	@printf "\t%-22s - %s\n" "db-drop" "drop the entire db"
	@printf "\t%-22s - %s\n" "db-purge-userprefs" "purge existing user preferences"
	@printf "\t%-22s - %s\n" "db-doc2sql" "export doctrine db schema"

	@printf "\nIcinga web targets:\n"
	@printf "\t%-22s - %s\n" "icinga-reset-password" "Reset password for any account on icinga-web"
	@printf "\t%-22s - %s\n" "install-apache-config" "Install the apache config to configured path"

	@printf "\nI18n targets:\n"
	@printf "\t%-22s - %s\n" "loc-update-catalog" "Create a initial locale from source (default.po)"
	@printf "\t%-22s - %s\n" "loc-compile" "Compile language files into mo and json"

	@printf "\nScheduler targets:\n"
	@printf "\t%-22s - %s\n" "scheduler-install" "Install the icingaScheduler cronjob"
	@printf "\t%-22s - %s\n" "scheduler-remove" "remove the icingaScheduler cronjob"
	
	@printf "\nDevelopment targets:\n"
	@printf "\t%-22s - %s\n" "devel-inplace-config" "Prepare src tree for running inplace"
	@printf "\t%-22s - %s\n" "devel-reconfigure" "Clean and reconfigure source"
	@printf "\t%-22s - %s\n" "devel-update-version" "Upgrades the version file"
	@printf "\t%-22s - %s\n" "test" "Running tests"
	@printf "\t%-22s - %s\n" "test-cs" "Running codestyle tests"
	@printf "\n\n"
	
logclean:
	rm -rf $(LOGDIR)/*.log

locclean:
	rm -f \
		$(LOC_MO)/*.mo \
		$(LOC_MO)/*.json

cacheclean:
	$(PHING_CALL) agavi-clear-cache	

clean: distclean

distclean:
	rm -rf \
	autom4te.cache/ \
	.build/ \
	
	rm -f \
	Makefile \
	lib/Makefile \
	lib/icingaScheduler/config.php \
	pub/Makefile \
	etc/Makefile \
	bin/Makefile \
	doc/Makefile \
	app/Makefile \
	app/config.php \
	app/config/databases.xml \
	app/config/icinga.xml \
	app/config/logging.xml \
	app/config/settings.xml \
	app/config/translation.xml \
	app/config/factories.xml \
	app/modules/Api/config/module.xml \
	app/modules/Api/config/access.xml \
	app/modules/AppKit/config/module.xml \
	app/modules/AppKit/config/auth.xml \
	app/modules/Config/config/module.xml \
	app/modules/Reporting/config/module.xml \
	app/modules/Web/config/module.xml \
	lib/*/Makefile \
	lib/Makefile \
	etc/build.properties \
	tests/phpunit/test.properties \
	etc/apache2/icinga-web.conf \
	etc/scheduler/icingaCron \
	bin/clearcache.sh \
	pub/.htaccess \
	pub/soap/.htaccess \
	etc/conf.d/access.xml \
	etc/conf.d/databases.xml \
	etc/conf.d/Makefile \
	etc/conf.d/sla.xml
	
remove-temp-files:
	bin/rmtmp-files.sh

create-tarball:
	@./bin/make-tarball --prefix $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)/

create-tarball-nightly:
	#${MAKE} submodule-update
	./bin/make-tarball --prefix $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-`date +%Y%m%d`-`git rev-parse --short HEAD`/

testdeps:
	 $(PHP) bin/testdeps.php

test-precede:
	if test ! -d "$(SRC_DIR)/.build"; then mkdir .build; fi
	

test: test-precede
	rm -f ./build/test-results.xml
	$(PHPUNIT) --configuration=$(SRC_DIR)/tests/phpunit/suites.xml

test-cs: test-precede
	rm -f $(SRC_DIR)/.build/checkstyle.xml
	touch $(SRC_DIR)/.build/checkstyle.xml
	$(PHPCS) \
		--standard=$(SRC_DIR)/tests/phpcs/YACS \
		--report=checkstyle \
		--report-file=$(SRC_DIR)/.build/checkstyle.xml \
		--ignore="cache,\.js$$" \
		$(SRC_DIR)/app

devel-inplace-config:
	mkdir -p \
	$(SRC_DIR)/app/cache/config \
	$(LOGDIR) \
	$(SRC_DIR)/app/modules/Reporting/data/tmp
	chown $(WEB_USER).$(WEB_GROUP) \
		$(SRC_DIR)/app/cache \
		$(SRC_DIR)/app/cache/config \
		$(LOGDIR) \
		$(SRC_DIR)/app/modules/Reporting/data/tmp
	@printf "Done.\n"

devel-reconfigure:
	@EXEC=`head config.log  | grep "$$ configure" | sed -e 's/\s\+\$$\s\+//g'`; \
	make distclean; \
	sh $$EXEC

devel-update-version:
	@VFILE="doc/VERSION"; \
        VERSION=`printf "%d.%d.%d" "$(VERSION_MAJOR)" "$(VERSION_MINOR)" "$(VERSION_PATCH)"`; \
        test ! "X$(VERSION_EXTEN)" = "X" && VERSION=`printf "%s-%s" "$$VERSION" "$(VERSION_EXTEN)"`; \
        echo "$$VERSION" > $$VFILE; \
        echo "Upgraded $$VFILE to version $$VERSION"

install-javascript:
	$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(prefix)/pub/js
	ln -sf $(DESTDIR)$(prefix)/lib/ext3 $(DESTDIR)$(prefix)/pub/js/ext3

install-apache-config:
	${INSTALL} -b -m 664 $(INSTALL_OPTS) etc/apache2/icinga-web.conf $(DESTDIR)$(WEB_APACHE_PATH)/icinga-web.conf
	@printf "\nInstalled configuration in '%s'.\n" "$(WEB_APACHE_PATH)"
	@printf "Please make sure that the directory is included or \n"
	@printf "include %s/icinga-web.conf manually.\n" "$(WEB_APACHE_PATH)"
	@printf "\nPlease restart your apache in order to complete this step.\n\n"

install-lib:
	cd $(SRC_LIB) && $(MAKE)

install-pub:
	cd $(SRC_PUB) && $(MAKE)

install-etc:
	cd $(SRC_ETC) && $(MAKE)

install-bin:
	cd $(SRC_BIN) && $(MAKE)

install-doc:
	cd $(SRC_DOC) && $(MAKE)

install-app:
	cd $(SRC_APP) && $(MAKE)

install-siteconfig:
	cd $(SRC_SITE) && $(MAKE)

install-log:
	$(INSTALL) -m 755 $(INSTALL_OPTS_WEB) -d $(DESTDIR)$(LOGDIR)

install-all: install-lib install-pub install-etc install-bin install-doc install-app install-log install-siteconfig

install: install-all install-done

install-done:
	@printf "\n\n"
	@printf "Installation if icinga-web succeeded.\n"
	@printf "\n"
	@printf	"Please check the new Apache2 configuration ($(DESTDIR)$(WEB_APACHE_PATH)/icinga-web.conf).\n"
	@printf "\n"
	@printf "You can install it simply by invoking 'make install-apache-config'.\n"
	@printf "\n"
	@printf "If you don't want this you can restore its old behavior by\n"
	@printf "typing 'make install-javascript'. This will install the old symlinks.\n"
	@printf "\n"
	@printf "If you want to setup your database manually, you can find the scripts \n"
	@printf "at etc/schema, otherwise use make initialize-db.  \n"	
	@printf "\n"
	@printf "Have fun!\n\n"

upgrade: install-all upgrade-done

upgrade-done:
	@printf "\n\n"
	@printf "Upgrade of icinga-web succeeded.\n"
	@printf "\n"
	@printf "Please check your site config files if something have to be changed.\n"
	@printf "\n"
	@printf "For database upgrades look into etc/schema/updates and import the\n"
	@printf "appropriate changes into your database\n"
	@printf "\n"
	@printf "Have fun!\n\n"

db-initialize:
	$(PHING_CALL) db-initialize

db-deinitialize:
	$(PHING_CALL) db-initialize

db-doc2sql:
	${PHING_CALL} doc2sql

db-drop:
	$(PHING_CALL) db-drop

db-purge-userprefs:
	$(PHING_CALL) db-purge-userprefs

make-create-files:
	$(SED) -i '/^# INSTALL_FILES_BEGIN/,/^# INSTALL_FILES_END/{D}' $(INC_MAKE_FILES) > $(INC_MAKE_FILES).tmp
	mv $(INC_MAKE_FILES).tmp $(INC_MAKE_FILES)
	./bin/create-makefile.sh ./ >> $(INC_MAKE_FILES)

loc-update-catalog:
	./bin/loc-create-catalog.pl --base=./app/ --out=$(LOC_PO)/templates/default.pot
	./bin/loc-merge-template.sh $(LOC_PO)/templates/default.pot $(LOC_PO)

loc-compile: loc-create-mo loc-create-json

loc-create-mo:
	./bin/loc-create-mo.sh $(LOC_PO) $(LOC_MO)

loc-create-json:
	./bin/loc-create-json.sh $(LOC_PO) $(LOC_MO)

submodule-init:
	git submodule init app/data/i18n/po

submodule-update:
	cd app/data/i18n/po
	git checkout master
	git pull origin master
	cd -
	git submodule update

scheduler-install:
	$(PHING_CALL) scheduler-install -DPATH_Icinga=$(prefix)

scheduler-remove:
	$(PHING_CALL) scheduler-remove -DPATH_Icinga=$(prefix)

icinga-reset-password:
	$(PHING_CALL) icinga-reset-password