Merge branch 'master' of github.com:raboof/notion
[notion.git] / Makefile
blobe3a01fca85e965646a2d247810f009e295b3376b
1 ##
2 ## Notion Makefile
3 ##
5 # Include system-specific configuration: auto-generated and optionally local
6 include build/system-inc.mk
8 # List of modules
9 include modulelist.mk
11 ######################################
13 INSTALL_SUBDIRS=\
14 $(MODULE_LIST) \
15 ioncore notion etc utils man po
17 SUBDIRS = $(LIBS_SUBDIRS) $(INSTALL_SUBDIRS)
19 DOCS = README LICENSE CHANGELOG
21 TO_REALCLEAN = build/ac/system-ac.mk
23 POTFILE=po/notion.pot
25 ######################################
27 include build/rules.mk
29 ######################################
31 _install:
32 $(INSTALLDIR) $(DESTDIR)$(DOCDIR)
33 for i in $(DOCS); do \
34 $(INSTALL) -m $(DATA_MODE) $$i $(DESTDIR)$(DOCDIR); \
35 done
37 relocatable_build:
38 $(MAKE) RELOCATABLE=1 PREFIX=
40 snapshot:
41 PWD=`pwd` ;\
42 DIR=`basename "$$PWD"` ;\
43 RELEASE=`./nextversion.sh`-snapshot ;\
44 perl -p -i -e "s/^#define NOTION_RELEASE.*/#define NOTION_RELEASE \"$$RELEASE\"/" version.h ;\
45 cd .. ;\
46 tar --exclude-vcs -czf notion-$$RELEASE-src.tar.gz $$DIR ;\
47 tar --exclude-vcs -cjf notion-$$RELEASE-src.tar.bz2 $$DIR ;\
48 cd $$DIR ;\
49 git checkout version.h
51 dist:
52 PWD=`pwd` ;\
53 DIR=`basename "$$PWD"` ;\
54 RELEASE=`./nextversion.sh` ;\
55 perl -p -i -e "s/^#define NOTION_RELEASE.*/#define NOTION_RELEASE \"$$RELEASE\"/" version.h ;\
56 git add version.h; git commit -m "Releasing version $$RELEASE" ;\
57 git tag -s -m "Release $$RELEASE" $$RELEASE ; git push --tags ;\
58 git archive --prefix notion-$$RELEASE/ --format=tar.gz $$RELEASE > ../notion-$$RELEASE-src.tar.gz ;\
59 git archive --prefix notion-$$RELEASE/ --format=tar $$RELEASE | bzip2 > ../notion-$$RELEASE-src.tar.bz2 ;\
60 perl -p -i -e "s/^#define NOTION_RELEASE.*/#define NOTION_RELEASE \"snapshot\"/" version.h ;\
61 git add version.h; git commit -m "Released version $$RELEASE" ; git push
63 .PHONY: test
65 test:
66 $(MAKE) -C mod_xrandr test
67 $(MAKE) -C mod_xinerama test
68 $(MAKE) -C test