OSDN Git Service

perl module & chmod +x tests/*.sh
[chasen-legacy/chasen.git] / Makefile.am
1 AUTOMAKE_OPTIONS = 1.4 no-dependencies
2
3 SUBDIRS = doc lib chasen mkchadic tests
4 EXTRA_DIRS = perl
5
6 EXTRA_DIST = README INSTALL NEWS chasen.spec
7 bin_SCRIPTS = chasen-config
8
9 dist-hook:
10         for subdir in $(EXTRA_DIRS); do \
11             cp -rp $$subdir $(distdir)/$$subdir; \
12             rm -f $(distdir)/$$subdir/*~; \
13             rm -f $(distdir)/$$subdir/*.{bak,orig}; \
14             rm -f $(distdir)/$$subdir/.cvsignore; \
15             rm -f $(distdir)/$$subdir/autogen.sh; \
16             rm -rf $(distdir)/$$subdir/CVS; \
17             rm -rf $(distdir)/$$subdir/*/CVS; \
18         done
19
20 rpm: dist       
21         rpm -ta @PACKAGE@-@VERSION@.tar.gz
22
23 win:
24         $(MAKE) distclean
25         env OBJDUMP=i386-mingw32msvc-objdump AS=i386-mingw32msvc-as \
26         AR=i386-mingw32msvc-ar RANLIB=i386-mingw32msvc-ranlib \
27         CXX=i386-mingw32msvc-g++ CC=i386-mingw32msvc-gcc \
28         NM=i386-mingw32msvc-nm DLLTOOL=i386-mingw32msvc-dlltool \
29         ./configure --disable-shared --host=i386-pc-mingw32 --target=i386-pc-mingw32
30         $(KCONV) -s lib/chadic.h > lib/chadic-sjis.h
31         cp -f lib/chadic.h lib/chadic-euc.h
32         mv -f lib/chadic-sjis.h lib/chadic.h
33         $(MAKE) CFLAGS+=-DCHASEN_DLL_EXPORT LIBS=-lwsock32
34         (cd lib; $(MAKE) dll)
35         mv -f lib/chadic-euc.h lib/chadic.h
36
37 win-dic:
38         tar zxfv ipadic-sjis*.tar.gz
39         cd ipadic-sjis* && ./configure --with-mkchadic="wine -- ../mkchadic" --with-chasenrc-path=../@PACKAGE@-@VERSION@/etc/chasenrc --with-dicdir=../@PACKAGE@-@VERSION@/share/chasen/dic
40         cd ipadic-sjis* && make
41
42 win-dist:
43         rm -f @PACKAGE@-@VERSION@.zip
44         rm -rf @PACKAGE@-@VERSION@
45         $(MAKE) prefix=`pwd`/@PACKAGE@-@VERSION@ install
46         cp COPYING README AUTHORS ./@PACKAGE@-@VERSION@/
47         rm -fr ./@PACKAGE@-@VERSION@/lib/libchasen*
48         rm -fr ./@PACKAGE@-@VERSION@/bin/chasen-config
49         cp -f lib/libchasen.dll ./@PACKAGE@-@VERSION@/lib
50         cp -f lib/libchasen.def ./@PACKAGE@-@VERSION@/lib
51         mkdir ./@PACKAGE@-@VERSION@/etc 
52         cd ipadic-sjis* && make prefix=../@PACKAGE@-@VERSION@/ install
53         $(KCONV) -s -c ./@PACKAGE@-@VERSION@/etc/chasenrc | sed -e 's#/#\\\\#g' -e's#\.\.#c:\\\\Program\\ Files\\\\#g' -e 's#-@VERSION@##' >./@PACKAGE@-@VERSION@/etc/chasenrc.new
54         mv -f ./@PACKAGE@-@VERSION@/etc/chasenrc.new ./@PACKAGE@-@VERSION@/etc/chasenrc
55         zip -r @PACKAGE@-@VERSION@.zip @PACKAGE@-@VERSION@
56         rm -fr @PACKAGE@-@VERSION@
57
58 win-dist2:
59         unzip @PACKAGE@-@VERSION@.zip
60         (cd @PACKAGE@-@VERSION@; lha a @PACKAGE@-@VERSION@.lzh .)
61         mv -f @PACKAGE@-@VERSION@/@PACKAGE@-@VERSION@.lzh .
62         wine ./EXEpress.exe -- chasen.ini
63         rm -fr @PACKAGE@-@VERSION@ @PACKAGE@-@VERSION@.lzh
64
65 ##Bug in automake: Can't use `if MAINTAINER_MODE'
66 @MAINTAINER_MODE_TRUE@include $(srcdir)/maintMakefile