-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
47 lines (39 loc) · 1.35 KB
/
Makefile
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
#Makefile at top of application tree
TOP = .
include $(TOP)/configure/CONFIG
DIRS += configure
ifneq ($(MAKEFOR),DOCONLY)
DIRS += ezca
DIRS += glue
endif
DIRS += documentation
ifeq ($(MAKEFOR),MATLAB)
DIRS += matlab
endif
ifneq ($(MAKEFOR),DOCONLY)
DIRS += testing
endif
include $(TOP)/configure/RULES_TOP
UNINSTALL_DIRS+=jar
tarclean: UNINSTALL_DIRS:=$(filter-out %jar %html %doc,$(UNINSTALL_DIRS))
tarclean: uninstall
tar: TAG:=$(shell git describe)
tar: images documentation
@if [ -z "$(TAG)" ] ; then \
echo "Need a git tag (valid description) to create archive"; \
exit 1; \
else \
$(RM) images/$(TAG).tar; \
git archive --prefix=$(TAG)/ --format=tar -o images/$(TAG).tar $(TAG); \
git submodule foreach 'git archive --prefix=$(TAG)/$$path/ --format=tar -o $$toplevel/images/tmp.tar $$sha1; tar Af $$toplevel/images/$(TAG).tar $$toplevel/images/tmp.tar; $(RM) $$toplevel/images/tmp.tar;'; \
tar cf images/tmp.tar '--xform=s%^%$(TAG)/%' documentation; \
tar Af images/$(TAG).tar images/tmp.tar; \
$(RM) images/tmp.tar; \
fi
images:
mkdir -p $@
gh-release: documentation
tar cfz $(GITSTRING)-doc-and-help.tgz documentation/manual.pdf documentation/jar/*.jar documentation/help/*.m
@echo "Cut a GH release and add the '$(GITSTRING)-doc-and-help.tgz' as a binary to the release"
@echo "Add comment to unpack in top-dir"
.PHONY: tar tarclean gh-release