Project

General

Profile

« Previous | Next » 

Revision 5460

lib/common.Makefile: $(version): Include both the svn revision when make was started as well as the svn revision when the command is actually run (when these values differ), in case svn was updated between the time an import was started and the time a particular table started being imported. Because tables within a datasource are imported sequentially, it is possible that an update would have happened before the last table started importing.

View differences:

lib/common.Makefile
34 34
forOs = $(patsubst %,%-$(filter Linux Darwin,$(os)),$(1))
35 35
date = $(shell date +"%Y-%m-%d-%H-%M-%S")
36 36

  
37
# SVN
37
## SVN
38

  
38 39
addFile = $(if $(wildcard $(1)),,touch $(1) && )svn add $(1)
39 40
addDir = $(if $(wildcard $(1)/),svn add --depth=empty $(1),svn mkdir $(1))
41

  
42
# Revisions
40 43
revision = $(shell svn info $(1)|$(sed) -n 's/^Last Changed Rev: (.*)$$/\1/p')
41 44
rootRevision = $(call revision,$(root))
42
version = $(date).r$(rootRevision)
45
initRootRevision := $(if $(root),$(rootRevision))
46
rootRevisionsEqual := $(filter $(rootRevision),$(initRootRevision))
47
rootRevisions = $(foreach rootRevision,$(rootRevision),$(if\
48
$(rootRevisionsEqual),$(initRootRevision),$(initRootRevision)-$(rootRevision)))
49
    # only evaluate $(rootRevision) once
50
version = $(date).r$(rootRevisions)
43 51

  
44 52
# rsync
45 53
rsync* := "time" rsync$(if $(test), --dry-run) --archive --update --verbose\

Also available in: Unified diff