[icinga-checkins] icinga.org: icinga-web/mhein/default: * Makefile fixes: help, targets

git at icinga.org git at icinga.org
Wed Jan 13 16:24:04 CET 2010


Module: icinga-web
Branch: mhein/default
Commit: dbb11b99099dbc556e11b38515dc935ab05c3789
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=dbb11b99099dbc556e11b38515dc935ab05c3789

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Jan 13 16:22:58 2010 +0100

* Makefile fixes: help, targets
* Install permissions (fixes #245)
* Drop decision query for phing
* Adapted phing db targets to gnu make
* file catalog update

---

 Makefile.in       |   42 +++++++++++++++++++++++++++++++++++++++---
 configure         |    2 ++
 configure.ac      |    2 ++
 doc/CHANGELOG     |    7 ++++++-
 etc/build.xml     |   21 ++++++++++++++++-----
 etc/make/files.mk |    4 +++-
 6 files changed, 68 insertions(+), 10 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 9bbd65e..9b44ca7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -16,12 +16,28 @@ BIN_GROUP=@bin_group@
 WEB_USER=@web_user@
 WEB_GROUP=@web_group@
 SED=@SED@
+PHP=@PHP@
+PC=$(DESTDIR)$(prefix)/bin/phing -f $(DESTDIR)$(prefix)/etc/build.xml
 INC_MAKE_FILES=./etc/make/files.mk
 
-include $(INC_MAKE_FILES)
-
 none:
 	@echo "Please supply a command line argument (i.e. 'make install')."
+	@echo ""
+	@echo "Generic targets: install, clean"
+	@echo ""
+	@echo "Other usefull targets:"
+	@echo "\ttestdeps - test the php dependencies"
+	@echo "\tcreate-tarball - creates a tarball for packaging"
+	@echo "\tdevclean - to a sourcecode ready for ci or packaging" 
+	@echo ""
+	@echo "Experimental targets:"
+	@echo "\tmake db-initialize - create the db"
+	@echo "\tmake db-deinitialize - reverse the path (removes all data and drop the relations)"
+	@echo "\tmake db-upgrade - tries to upgrade from a available db revision"
+	@echo "\tmake db-drop - create the entire db"
+	@echo ""
+
+include $(INC_MAKE_FILES)
 
 install-files-list:
 	$(SED) -i '/^# INSTALL_FILES_BEGIN/,/^# INSTALL_FILES_END/{D}' $(INC_MAKE_FILES)
@@ -45,14 +61,34 @@ cacheclean:
 	rm -rf app/cache/config/*.php
 
 testdeps:
-	 `which php` bin/testdeps.php
+	 $(PHP) bin/testdeps.php
 
 fix-priv:
 	chown -R $(WEB_USER).$(WEB_GROUP) $(DESTDIR)$(prefix)/app/cache
 	chmod -R 775 $(DESTDIR)$(prefix)/app/cache
+	chmod +x \
+		$(DESTDIR)$(prefix)/bin/agavi \
+		$(DESTDIR)$(prefix)/bin/create-makefile.sh \
+		$(DESTDIR)$(prefix)/bin/doctrinemodels.php \
+		$(DESTDIR)$(prefix)/bin/phing \
+		$(DESTDIR)$(prefix)/bin/rabbit.sh \
+		$(DESTDIR)$(prefix)/bin/testdeps.php
 
 fix-libs:
 	rm -rf $(DESTDIR)$(prefix)/pub/js/ext3
 	ln -s $(DESTDIR)$(prefix)/lib/ext3 $(DESTDIR)$(prefix)/pub/js
 
 install: inc-install-files fix-priv fix-libs
+
+db-initialize:
+	$(PC) db-initialize
+
+db-deinitialize:
+	$(PC) db-initialize
+
+db-drop:
+	$(PC) db-drop
+
+db-upgrade:
+	$(PC) db-upgrade
+
diff --git a/configure b/configure
index d14e6a5..99cc853 100755
--- a/configure
+++ b/configure
@@ -2081,6 +2081,8 @@ INSTALL_OPTS="-o $bin_user -g $bin_group"
 CFLAGS=""
 
 
+
+
 ac_config_files="$ac_config_files Makefile"
 
 
diff --git a/configure.ac b/configure.ac
index 3b5f5cb..247ef6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,6 +88,8 @@ AC_SUBST(INSTALL_OPTS)
 CFLAGS=""
 AC_SUBST(CFLAGS)
 
+AC_SUBST(PHP)
+
 AC_CONFIG_FILES([Makefile])
 
 AC_OUTPUT
diff --git a/doc/CHANGELOG b/doc/CHANGELOG
index 82822a6..605da7c 100755
--- a/doc/CHANGELOG
+++ b/doc/CHANGELOG
@@ -66,4 +66,9 @@
       * make fix for files (make)
       * removed temp files
       * changes status icon files (from icinga theme, smaller)
-      * added some more state (flapping, downtime)
\ No newline at end of file
+      * added some more state (flapping, downtime)
+      * makefile bin permission (#245)
+      * drop decision for phing
+      * adapted the phing db targets to gnu make
+      * some makefile fixes, help text, targets
+      
\ No newline at end of file
diff --git a/etc/build.xml b/etc/build.xml
index be61595..df6309a 100755
--- a/etc/build.xml
+++ b/etc/build.xml
@@ -48,11 +48,22 @@
 		
 		<property name="db.sql.drop" value="DROP DATABASE ${db.name};" />
 		
-		<exec
-			command="${db.mysql.call_global} -e '${db.sql.drop}'"
-			dir="${builddir}"
-			passthru="true"
-			checkreturn="false" />
+		<input propertyname="db.sql.dropchoice" promptChar="?" validArgs="no,DROPMYDATA">Really drop the database</input>
+
+		<if>
+			<equals arg1="${db.sql.dropchoice}" arg2="DROPMYDATA" />
+			<then>
+				<exec
+					command="${db.mysql.call_global} -e '${db.sql.drop}'"
+					dir="${builddir}"
+					passthru="true"
+					checkreturn="false" />
+			</then>
+			
+			<else>
+				<echo>Yes, a really educated decision to keep the data ;-)</echo>
+			</else>
+		</if>
 	</target>
 	
 	<target name="db-init" depends="db-prepare">
diff --git a/etc/make/files.mk b/etc/make/files.mk
index cfee740..c973283 100644
--- a/etc/make/files.mk
+++ b/etc/make/files.mk
@@ -7269,9 +7269,11 @@ inc-install-files:
 	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/images/status/on.png $(DESTDIR)$(prefix)/pub/images/status/on.png
 	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/images/status/off.png $(DESTDIR)$(prefix)/pub/images/status/off.png
 	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/images/status/acknowledged.png $(DESTDIR)$(prefix)/pub/images/status/acknowledged.png
-	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/images/status/indowntime.png $(DESTDIR)$(prefix)/pub/images/status/indowntime.png
 	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/images/status/passive.png $(DESTDIR)$(prefix)/pub/images/status/passive.png
 	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/images/status/ndisabled.png $(DESTDIR)$(prefix)/pub/images/status/ndisabled.png
+	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/images/status/disabled.png $(DESTDIR)$(prefix)/pub/images/status/disabled.png
+	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/images/status/downtime.png $(DESTDIR)$(prefix)/pub/images/status/downtime.png
+	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/images/status/flapping.png $(DESTDIR)$(prefix)/pub/images/status/flapping.png
 	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/styles/WireFrameYUI.css $(DESTDIR)$(prefix)/pub/styles/WireFrameYUI.css
 	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/styles/extjs/ext-all.css $(DESTDIR)$(prefix)/pub/styles/extjs/ext-all.css
 	$(INSTALL) -m 644 $(INSTALL_OPTS) pub/styles/extjs/ux-all.css $(DESTDIR)$(prefix)/pub/styles/extjs/ux-all.css





More information about the icinga-checkins mailing list