-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (57 loc) · 1.86 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Customization; see Options.mk.example
CONFIG ?= Options.mk
# define the version
# (easier to extract from other utils, e.g. python)
include Makefile.version
FILES = $(shell git ls-files)
all: $(CONFIG)
cd depends; $(MAKE)
cd libgadget; $(MAKE)
cd libgenic; $(MAKE)
cd gadget; $(MAKE)
cd genic; $(MAKE)
clean :
cd libgadget; $(MAKE) clean
cd libgenic; $(MAKE) clean
cd gadget; $(MAKE) clean
cd genic; $(MAKE) clean
test: $(CONFIG)
cd depends; $(MAKE)
cd libgadget; $(MAKE) test
cd libgenic; $(MAKE) test
$(CONFIG):
cp Options.mk.example $(CONFIG)
depclean: clean
cd depends; $(MAKE) clean
html: $(FILES)
@pandoc -f rst -t markdown README.rst > README.tmp.md
@sed -e "s;@VERSION@;$(VERSION)-`git describe --always --dirty --abbrev=10`;" \
-e "s;@MAINPAGE@;README.tmp.md;" \
-e "s;@DOT@;$(PWD)/maintainer/dot;" \
maintainer/Doxyfile.in > Doxyfile
@doxygen Doxyfile
@rm -rf README.tmp.md Doxyfile
@echo x-ref source code generated. Start from file://$(PWD)/html/index.html
gh-pages: html
ghp-import -p -f html
tag:
@echo trying to tag a release $(VERSION).
@if git describe --always --dirty --abbrev=10 | grep dirty ; then \
echo "FAILED: version not clean, cannot tag a release." ; exit 1; \
else \
git tag $(VERSION); \
echo "Current list of tags : "; \
git tag; \
echo "Need to push the tag with"; \
echo "git push origin $(VERSION)"; \
fi;
sdist:
(git rev-parse --abbrev-ref HEAD | grep master )|| (echo "Must be on master" && exit 1);
git checkout -B "rc-$(VERSION)";
git add -f depends/pfft-1.0.8-alpha2-fftw3.tar.gz
git commit -m "rc-$(VERSION) packaging"
git rm --cached depends/pfft-1.0.8-alpha2-fftw3.tar.gz
git commit -m "rc-$(VERSION) cleanup"
bash maintainer/git-archive-all.sh --prefix MPGadget-$(VERSION)/ -- - | gzip -c > MPGadget-$(VERSION).tar.gz
git checkout master
git branch -D "rc-$(VERSION)"