-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (54 loc) · 2.21 KB
/
Makefile
File metadata and controls
72 lines (54 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
TOP = .
include $(TOP)/configure/CONFIG
DIRS += configure
DIRS += src
src_DEPEND_DIRS = configure
DIRS += test
test_DEPEND_DIRS = src
DIRS += examples
examples_DEPEND_DIRS = src
BRANCH = 2-2
DEFAULT_REPO = /opt/repositories/controls/darcs/epics/support/seq/branch-$(BRANCH)
GIT_MIRROR = /opt/repositories/controls/git/seq/branch-$(BRANCH)
SEQ_PATH = www/control/SoftDist/sequencer-$(BRANCH)
USER_AT_HOST = wwwcsr@www-csr.bessy.de
DATE = $(shell date -I)
SNAPSHOT = seq-$(BRANCH)-snapshot-$(DATE)
SEQ_TAG = R$(subst .,-,$(SEQ_RELEASE))
SEQ_TAG_TIME = $(shell darcs changes --all --xml-output \
--matches 'exact "TAG $(SEQ_TAG)"' | perl -ne 'print "$$1.$$2" if /date=.(\d{12})(\d{2})/')
include $(TOP)/configure/RULES_TOP
html: src
$(MAKE) -C documentation
docs: src
$(MAKE) -C documentation pdf=1
docs.clean:
$(MAKE) -C documentation clean
realclean clean: docs.clean
upload_docs: docs
rsync -r -t $(TOP)/html/ $(USER_AT_HOST):$(SEQ_PATH)/
recreate_git_mirror:
rm -rf $(GIT_MIRROR)
git init $(GIT_MIRROR)
touch $(GIT_MIRROR)/git.marks
upload_repo:
darcs push $(DEFAULT_REPO)
cd $(DEFAULT_REPO) && darcs push --all $(USER_AT_HOST):$(SEQ_PATH)/repo/branch-$(BRANCH)
cd $(DEFAULT_REPO) && darcs convert export --read-marks $(GIT_MIRROR)/darcs.marks --write-marks $(GIT_MIRROR)/darcs.marks |\
(cd $(GIT_MIRROR) && git fast-import --import-marks=git.marks --export-marks=git.marks)
cd $(GIT_MIRROR)/.git && git --bare update-server-info
rsync -r --delete $(GIT_MIRROR)/.git/ $(USER_AT_HOST):$(SEQ_PATH)/repo/branch-$(BRANCH).git/
snapshot:
darcs dist -d $(SNAPSHOT)
rsync $(SNAPSHOT).tar.gz $(USER_AT_HOST):$(SEQ_PATH)/releases/
ssh $(USER_AT_HOST) 'cd $(SEQ_PATH)/releases && ln -f -s $(SNAPSHOT).tar.gz seq-$(BRANCH)-snapshot-latest.tar.gz'
$(RM) $(SNAPSHOT).tar.gz
release: upload_docs upload_repo
darcs show files | xargs touch -t $(SEQ_TAG_TIME)
darcs dist -d seq-$(SEQ_RELEASE) -t '^$(SEQ_TAG)$$'
rsync seq-$(SEQ_RELEASE).tar.gz $(USER_AT_HOST):$(SEQ_PATH)/releases/
$(RM) seq-$(SEQ_RELEASE).tar.gz
changelog: force
DARCS_ALWAYS_COLOR=0 darcs changes -a --from-tag=. | egrep -v '^(Author|Date|patch)' > changelog
force:
.PHONY: html docs docs.clean upload_docs mirror upload_repo snapshot release recreate_git_mirror