diff options
-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | Makefile.config | 5 |
2 files changed, 26 insertions, 1 deletions
@@ -14,6 +14,7 @@ include $(ROOT)/Makefile.config # Variables # project +PROJECT_VERSION = $(shell $(TAIL) -1 $(VERSION_FILE)) PROJECT_SOURCES += $(LAMPLIB_SOURCES) PROJECT_SOURCES += $(META_SOURCES) PROJECT_SOURCES += $(COMPILER_SOURCES) @@ -24,6 +25,10 @@ PROJECT_SOURCES += $(DTD2SCALA_SOURCES) PROJECT_SOURCES += $(SCALAP_SOURCES) PROJECT_SOURCES += $(SCALATEST_SOURCES) +# version management +VERSION_FILE = $(PROJECT_ROOT)/VERSION +VERSION_SCRIPT = $(PROJECT_SUPPORTDIR)/scripts/version-manager + # scala scripts wrapper SCRIPTS_PREFIX = $(PROJECT_BINARYDIR) SCRIPTS_WRAPPER = $(SCRIPTS_PREFIX)/.scala_wrapper @@ -245,6 +250,22 @@ scalac4ant : .PHONY : scala4ant ############################################################################## +# Commands - Version management + +set-project-version : + @if [ -z "$(VERSION)" ]; then \ + echo "Usage: $(MAKE) set-version VERSION=<version>"; \ + exit 1; \ + else \ + $(call RUN,$(VERSION_SCRIPT) $(VERSION_FILE) set $(VERSION)); \ + $(make) scripts; \ + fi + +update-project-version : + $(VERSION_SCRIPT) $(VERSION_FILE) update + @$(make) scripts + +############################################################################## # Targets .latest-bootstrap : @@ -336,6 +357,7 @@ $(SCRIPTS_WRAPPER) : MACRO_BCEL_CLASSES ?= $(BCEL_JARFILE) $(SCRIPTS_WRAPPER) : MACRO_FJBG_CLASSES ?= $(FJBG_JARFILE) $(SCRIPTS_WRAPPER) : MACRO_MSIL_CLASSES ?= $(MSIL_JARFILE) $(SCRIPTS_WRAPPER) : MACRO_JAVA_ARGS ?= -enableassertions +$(SCRIPTS_WRAPPER) : $(VERSION_FILE) $(SCRIPTS_WRAPPER) : $(PROJECT_ROOT)/Makefile $(SCRIPTS_WRAPPER) : $(PROJECT_ROOT)/Makefile.config $(SCRIPTS_WRAPPER) : $(PROJECT_ROOT)/Makefile.private diff --git a/Makefile.config b/Makefile.config index 783b7a3449..c83f790815 100644 --- a/Makefile.config +++ b/Makefile.config @@ -12,7 +12,6 @@ # Project setup PROJECT_NAME ?= scala -PROJECT_VERSION ?= development version PROJECT_ROOT ?= $(ROOT) PROJECT_BINARYDIR ?= $(PROJECT_ROOT)/bin PROJECT_CONFIGDIR ?= $(PROJECT_ROOT)/config @@ -53,8 +52,10 @@ CP ?= cp DATE ?= date DIRNAME ?= dirname ECHO ?= echo +EXPR ?= expr FIND ?= find GREP ?= grep +HEAD ?= head IA ?= build INSTALL ?= $(PROJECT_SUPPORTDIR)/scripts/install JAR ?= jar @@ -63,12 +64,14 @@ LN ?= ln M4 ?= m4 MIRROR ?= $(PROJECT_SUPPORTDIR)/scripts/mirror MKDIR ?= mkdir +MV ?= mv NICE ?= nice RECODE ?= recode RM ?= rm -f SCSH ?= scsh SED ?= sed SORT ?= sort +TAIL ?= tail TAR ?= tar TOUCH ?= touch TR ?= tr |