[rhmessaging-commits] rhmessaging commits: r1946 - in mgmt: cumin and 2 other directories.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Sat Apr 19 12:13:50 EDT 2008


Author: justi9
Date: 2008-04-19 12:13:50 -0400 (Sat, 19 Apr 2008)
New Revision: 1946

Added:
   mgmt/etc/Makefile.common
Modified:
   mgmt/Makefile
   mgmt/cumin/Makefile
   mgmt/etc/devel.profile
   mgmt/mint/Makefile
Log:
Add make build and install rules.

Add a common Makefile for setting up install vars.

Make the MINT_SCHEMA_XML check in mint/Makefile dynamic.

Switch to using PREFIX instead of INSTALL_PREFIX in devel.profile and
the makefiles.



Modified: mgmt/Makefile
===================================================================
--- mgmt/Makefile	2008-04-19 16:12:04 UTC (rev 1945)
+++ mgmt/Makefile	2008-04-19 16:13:50 UTC (rev 1946)
@@ -1,9 +1,19 @@
+ifndef DEVEL_HOME
+    $(error "DEVEL_HOME is not set; you need to source etc/devel.profile")
+endif
+
+.PHONY: help dist clean cumin mint tags
+
 version := 0.1
 
-.PHONY: help dist clean cumin mint
-
 help:
-	@echo Targets: dist, clean, tags
+	@echo "Targets:"
+	@echo "    help           Print this message"
+	@echo "    tags           Rebuild the tag index"
+	@echo "    dist           Create a dist tarball"
+	@echo "    cumin          Install cumin"
+	@echo "    mint           Install mint"
+	@echo "    clean          Remove software installed at $$DEVEL_HOME/install"
 
 dist: clean
 	mkdir -p dist/lib/python/mint
@@ -33,6 +43,7 @@
 
 clean:
 	rm -rf dist
+	rm -rf ${DEVEL_HOME}/install
 
 tags:
 	find "${DEVEL_HOME}" -name \*.py -print \

Modified: mgmt/cumin/Makefile
===================================================================
--- mgmt/cumin/Makefile	2008-04-19 16:12:04 UTC (rev 1945)
+++ mgmt/cumin/Makefile	2008-04-19 16:13:50 UTC (rev 1946)
@@ -1,38 +1,36 @@
-.phony: install prepare
+.phony: build install
 
-ifdef INSTALL_PREFIX
-    prefix := ${INSTALL_PREFIX}
-else
-    prefix := /usr/local
-endif
+include ../etc/Makefile.common
 
 name := cumin
 ver := 0.1
-home := ${prefix}/share/${name}
 
-install: prepare
-	install -d ${prefix}/lib/python/wooly ${prefix}/lib/python/${name}
-	install python/wooly/*.py? python/wooly/*.strings ${prefix}/lib/python/wooly
-	install python/cumin/*.py? python/cumin/*.strings ${prefix}/lib/python/${name}
-	install -d ${prefix}/bin
-	install bin/* ${prefix}/bin
-	install -d ${prefix}/share/doc/${name}-${ver}
-	install LICENSE COPYING ${prefix}/share/doc/${name}-${ver}
+home := ${PREFIX}/share/${name}
+lib := ${PYTHON_LIB_DIR}/${name}
+doc := ${PREFIX}/share/doc/${name}-${ver}
+log := ${VAR_DIR}/log/${name}
+
+build:
+	python-compile python
+
+install: build
+	install -d ${PYTHON_LIB_DIR}/wooly
+	install python/wooly/*.py python/wooly/*.pyc python/wooly/*.strings ${PYTHON_LIB_DIR}/wooly
+	install -d ${lib}
+	install python/cumin/*.py python/cumin/*.pyc python/cumin/*.strings ${lib}
+	install -d ${BIN_DIR}
+	install bin/* ${BIN_DIR}
+	install -d ${doc}
+	install LICENSE COPYING ${doc}
 	install -d ${home}/resources
 	install resources/* ${home}/resources
-	install -d ${prefix}/etc
-	install etc/* ${prefix}/etc
-	install -d ${prefix}/var/log
+	install -d ${ETC_DIR}
+	install etc/* ${ETC_DIR}
+	install -d ${log}
 
-prepare:
-	install -d ${prefix}/lib
-	install -d ${prefix}/bin
-	install -d ${prefix}/etc
-	install -d ${prefix}/share/doc
-	install -d ${prefix}/var/log/${name}
-	install -d ${home}
-	ln -sf ${prefix}/lib ${home}/lib
-	ln -sf ${prefix}/bin ${home}/bin
-	ln -sf ${prefix}/etc ${home}/etc
-	ln -sf ${prefix}/share/doc ${home}/doc
-	ln -sf ${prefix}/var/log/${name} ${home}/log
+	install -d ${home}/lib
+	ln -sf ${PYTHON_LIB_DIR} ${home}/lib/python
+	ln -sf ${BIN_DIR} ${home}/bin
+	ln -sf ${ETC_DIR} ${home}/etc
+	ln -sf ${doc} ${home}/doc
+	ln -sf ${log} ${home}/log

Added: mgmt/etc/Makefile.common
===================================================================
--- mgmt/etc/Makefile.common	                        (rev 0)
+++ mgmt/etc/Makefile.common	2008-04-19 16:13:50 UTC (rev 1946)
@@ -0,0 +1,19 @@
+ifndef PREFIX
+    PREFIX := /usr/local
+endif
+
+ifndef PYTHON_LIB_DIR
+    PYTHON_LIB_DIR := ${PREFIX}/lib/python
+endif
+
+ifndef BIN_DIR
+    BIN_DIR := ${PREFIX}/bin
+endif
+
+ifndef ETC_DIR
+    ETC_DIR := ${PREFIX}/etc
+endif
+
+ifndef VAR_DIR
+    VAR_DIR := ${PREFIX}/var
+endif

Modified: mgmt/etc/devel.profile
===================================================================
--- mgmt/etc/devel.profile	2008-04-19 16:12:04 UTC (rev 1945)
+++ mgmt/etc/devel.profile	2008-04-19 16:13:50 UTC (rev 1946)
@@ -13,7 +13,7 @@
 pypath="$DEVEL_HOME"/lib/python:"$HOME"/lib/python:"$DEVEL_ORIGINAL_PYTHONPATH"
 
 for module in $DEVEL_MODULES; do
-    pypath="$DEVEL_HOME"/"$module"/python:"$pypath"
+    pypath="$DEVEL_HOME"/"$module"/lib/python:"$pypath"
 done
 
 export PYTHONPATH="$pypath"
@@ -35,4 +35,4 @@
 # cumin test instance
 export CUMIN_HOME="$DEVEL_HOME"/cumin-test-0
 
-export INSTALL_PREFIX="$DEVEL_HOME"/install
+export PREFIX="$DEVEL_HOME"/install

Modified: mgmt/mint/Makefile
===================================================================
--- mgmt/mint/Makefile	2008-04-19 16:12:04 UTC (rev 1945)
+++ mgmt/mint/Makefile	2008-04-19 16:13:50 UTC (rev 1946)
@@ -1,37 +1,34 @@
-.PHONY: install prepare schema schema-sql schema-python
+.PHONY: build install schema schema-sql schema-python
 
-ifdef INSTALL_PREFIX
-    prefix := ${INSTALL_PREFIX}
-else
-    prefix := /usr/local
-endif
+include ../etc/Makefile.common
 
+dsn := "postgresql://localhost/"
+
 name := mint
 ver := 0.1
-home := ${prefix}/share/${name}
-dsn := "postgresql://localhost/"
 
-install: prepare
-	install -d ${prefix}/lib/python/mint
-	install python/mint/*.py? ${prefix}/lib/python/mint
-	install -d ${prefix}/bin
-	install bin/* ${prefix}/bin
-	install -d ${prefix}/share/doc/${name}-${ver}
-	install LICENSE COPYING ${prefix}/share/doc/${name}-${ver}
+home := ${PREFIX}/share/${name}
+lib := ${PYTHON_LIB_DIR}/${name}
+doc := ${PREFIX}/share/doc/${name}-${ver}
+log := ${VAR_DIR}/log/${name}
+
+build:
+	python-compile python
+
+install: build
+	install -d ${lib}
+	install python/mint/*.py python/mint/*.pyc ${lib}
+	install -d ${BIN_DIR}
+	install bin/* ${BIN_DIR}
+	install -d ${doc}
+	install LICENSE COPYING ${doc}
 	install -d ${home}/sql
 	install sql/* ${home}/sql
 
-prepare:
-	install -d ${home}
-	ln -sf ${prefix}/lib ${home}/lib
-	ln -sf ${prefix}/share/doc ${home}/doc
-
 schema: schema-python schema-sql
 
 schema-python:
-ifndef MINT_SCHEMA_XML
-    $(error "MINT_SCHEMA_XML is not set")
-endif
+	@if [ -z "$$MINT_SCHEMA_XML" ]; then echo "MINT_SCHEMA_XML is not set"; exit 1; fi
 	python python/mint/schemaparser.py ${MINT_SCHEMA_XML} python/mint/schema.py ${dsn}
 
 schema-sql:




More information about the rhmessaging-commits mailing list