97ab23f8dfdd8956d2c8a2dc5efbcfeaea222799
[platform/upstream/libdatrie.git] / nsis / make-nsis
1 #!/usr/bin/make -f
2
3 CURDIR = $(shell pwd)
4 INSTALL_DOCS = \
5         $(CURDIR)/../AUTHORS    \
6         $(CURDIR)/../ChangeLog  \
7         $(CURDIR)/../COPYING    \
8         $(CURDIR)/../INSTALL    \
9         $(CURDIR)/../NEWS       \
10         $(CURDIR)/../README
11
12 all: binary
13
14 distclean:
15         make distclean
16         rm -rf datrie doc man tools
17         rm -rf libdatrie
18         rm -f configure-stamp
19         rm -f *.exe
20
21 configure: configure-stamp
22 configure-stamp:
23         ../configure --prefix=/ --host=i586-mingw32msvc
24         touch $@
25
26 build: configure
27         make
28
29 install:
30         make install DESTDIR=$(CURDIR)/libdatrie
31
32         # install docs
33         if [ ! -e $(CURDIR)/libdatrie/doc ]; then \
34           mkdir $(CURDIR)/libdatrie/doc; \
35         fi
36         for file in $(INSTALL_DOCS); do \
37           cp $$file $(CURDIR)/libdatrie/doc/`basename $$file`.txt; \
38           todos $(CURDIR)/libdatrie/doc/$$file.txt; \
39         done
40
41         # install contrib files
42         if [ ! -e $(CURDIR)/libdatrie/contrib ]; then \
43           mkdir $(CURDIR)/libdatrie/contrib; \
44         fi
45         cp contrib/libdatrienv.sh $(CURDIR)/libdatrie/contrib
46
47 binary: build install
48         makensis libdatrie.nsi
49
50 .PHONY: all distclean configure build install binary