1 |
3697
|
aaronmk
|
##### Configuration
|
2 |
|
|
|
3 |
|
|
src_server ?= vegbiendev
|
4 |
|
|
src_user ?= $(USER)
|
5 |
|
|
test ?=
|
6 |
|
|
|
7 |
|
|
##### Vars/functions
|
8 |
|
|
|
9 |
|
|
# Make
|
10 |
|
|
pathParts = $(shell path="$(1)"; echo "$${path%%/*}" "$${path\#*/}")
|
11 |
|
|
topDir = $(word 1,$(pathParts))
|
12 |
|
|
subPath = $(word 2,$(pathParts))
|
13 |
|
|
subMake = $(MAKE) $(call subPath,$@) --directory=$(call topDir,$@) \
|
14 |
|
|
--makefile=../input.Makefile
|
15 |
|
|
# input.Makefile path is relative to subdir
|
16 |
|
|
|
17 |
|
|
# SVN
|
18 |
|
|
addDir = $(if $(wildcard $(1)/),svn add --depth=empty $(1),svn mkdir $(1))
|
19 |
|
|
|
20 |
|
|
# rsync
|
21 |
|
|
rsync := rsync$(if $(test), --dry-run) --archive --update --verbose\
|
22 |
|
|
--itemize-changes --progress --exclude=".*"
|
23 |
|
|
local := ./
|
24 |
3700
|
aaronmk
|
localDirName := $(notdir $(realpath $(local)))
|
25 |
|
|
remote := $(src_user)@$(src_server):/home/bien/svn/$(localDirName)/
|
26 |
3697
|
aaronmk
|
|
27 |
|
|
##### General targets
|
28 |
|
|
|
29 |
|
|
all:
|
30 |
|
|
|
31 |
|
|
.SUFFIXES: # turn off built-in suffix rules
|
32 |
|
|
.SECONDARY: # don't automatically delete intermediate files
|
33 |
|
|
.DELETE_ON_ERROR: # delete target if recipe fails
|
34 |
|
|
|
35 |
|
|
_always:
|
36 |
|
|
.PHONY: _always
|