summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert@lshift.net>2008-11-07 17:42:54 +0000
committerHubert Plociniczak <hubert@lshift.net>2008-11-07 17:42:54 +0000
commit5134106e37d0395406437bea2fa0e81a6870aee2 (patch)
tree413f97f6deb959e1581c2fa68229cb96716064be
parentbf9fcf46ccb873b1e860f18333784b57cfdfaf3c (diff)
downloadrabbitmq-server-5134106e37d0395406437bea2fa0e81a6870aee2.tar.gz
Cleaned the Makefile. Goodbye generic_stage!bug19730
-rw-r--r--Makefile58
1 files changed, 21 insertions, 37 deletions
diff --git a/Makefile b/Makefile
index e652c27c..04a0aff6 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,7 @@ LOG_BASE=/tmp
VERSION=0.0.0
TARBALL_NAME=rabbitmq-server-$(VERSION)
+TARGET_SRC_DIR=dist/$(TARBALL_NAME)
SIBLING_CODEGEN_DIR=../rabbitmq-codegen/
AMQP_CODEGEN_DIR=$(shell [ -d $(SIBLING_CODEGEN_DIR) ] && echo $(SIBLING_CODEGEN_DIR) || echo codegen)
@@ -92,43 +93,27 @@ stop-cover: all
########################################################################
-generic_stage:
- mkdir -p $(GENERIC_STAGE_DIR)
- cp -r ebin include $(GENERIC_STAGE_DIR)
-ifneq "$(NO_SRC)" "true"
- cp -r src $(GENERIC_STAGE_DIR)
-endif
-
- cp LICENSE LICENSE-MPL-RabbitMQ $(GENERIC_STAGE_DIR)
-
- if [ -f INSTALL.in ]; then \
- cp INSTALL.in $(GENERIC_STAGE_DIR)/INSTALL; \
- elinks -dump -no-references -no-numbering $(WEB_URL)install.html \
- >> $(GENERIC_STAGE_DIR)/INSTALL; \
- cp BUILD.in $(GENERIC_STAGE_DIR)/BUILD; \
- elinks -dump -no-references -no-numbering $(WEB_URL)build-server.html \
- >> $(GENERIC_STAGE_DIR)/BUILD; \
- else \
- cp INSTALL $(GENERIC_STAGE_DIR); \
- cp BUILD $(GENERIC_STAGE_DIR); \
- fi
-
- sed -i 's/%%VERSION%%/$(VERSION)/' $(GENERIC_STAGE_DIR)/ebin/rabbit.app
-
srcdist: distclean
- $(MAKE) VERSION=$(VERSION) GENERIC_STAGE_DIR=dist/$(TARBALL_NAME) generic_stage
-
- mkdir -p dist/$(TARBALL_NAME)/codegen
- cp -r $(AMQP_CODEGEN_DIR)/* dist/$(TARBALL_NAME)/codegen/
- cp codegen.py Makefile dist/$(TARBALL_NAME)
-
- cp -r scripts dist/$(TARBALL_NAME)
- cp -r docs dist/$(TARBALL_NAME)
- chmod 0755 dist/$(TARBALL_NAME)/scripts/*
+ mkdir -p $(TARGET_SRC_DIR)/codegen
+ cp -r ebin src include LICENSE LICENSE-MPL-RabbitMQ $(TARGET_SRC_DIR)
+ cp INSTALL.in $(TARGET_SRC_DIR)/INSTALL
+ elinks -dump -no-references -no-numbering $(WEB_URL)install.html \
+ >> $(TARGET_SRC_DIR)/INSTALL
+ cp BUILD.in $(TARGET_SRC_DIR)/BUILD
+ elinks -dump -no-references -no-numbering $(WEB_URL)build-server.html \
+ >> $(TARGET_SRC_DIR)/BUILD
+ sed -i 's/%%VERSION%%/$(VERSION)/' $(TARGET_SRC_DIR)/ebin/rabbit.app
+
+ cp -r $(AMQP_CODEGEN_DIR)/* $(TARGET_SRC_DIR)/codegen/
+ cp codegen.py Makefile $(TARGET_SRC_DIR)
+
+ cp -r scripts $(TARGET_SRC_DIR)
+ cp -r docs $(TARGET_SRC_DIR)
+ chmod 0755 $(TARGET_SRC_DIR)/scripts/*
(cd dist; tar -zcf $(TARBALL_NAME).tar.gz $(TARBALL_NAME))
(cd dist; zip -r $(TARBALL_NAME).zip $(TARBALL_NAME))
- rm -rf dist/$(TARBALL_NAME)
+ rm -rf $(TARGET_SRC_DIR)
distclean: clean
make -C $(AMQP_CODEGEN_DIR) clean
@@ -139,8 +124,9 @@ install: all
@[ -n "$(TARGET_DIR)" ] || (echo "Please set TARGET_DIR."; false)
@[ -n "$(SBIN_DIR)" ] || (echo "Please set SBIN_DIR."; false)
@[ -n "$(MAN_DIR)" ] || (echo "Please set MAN_DIR."; false)
-
- $(MAKE) VERSION=$(VERSION) GENERIC_STAGE_DIR=$(TARGET_DIR) NO_SRC=true generic_stage
+
+ mkdir -p $(TARGET_DIR)
+ cp -r ebin include LICENSE LICENSE-MPL-RabbitMQ INSTALL $(TARGET_DIR)
chmod 0755 scripts/*
mkdir -p $(SBIN_DIR)
@@ -153,5 +139,3 @@ install: all
$$manpage | gzip --best > \
$(MAN_DIR)/man1/`echo $$manpage | sed -e 's:docs/\(.*\)\.pod:\1\.1\.gz:g'`; \
done
-
- rm -f $(TARGET_DIR)/BUILD