File: Makefile.am

package info (click to toggle)
prime 1.0.0.1-2.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,420 kB
  • sloc: ruby: 7,139; lisp: 1,866; sh: 442; makefile: 242
file content (60 lines) | stat: -rw-r--r-- 1,964 bytes parent folder | download | duplicates (4)
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
# Makefile.am: Template of Automake for prime.
# $Id: Makefile.am,v 1.8.2.2 2005/03/08 12:36:20 komatsu Exp $
#
# Copyright (C) 2003 - 2005 Hiroyuki Komatsu <komatsu@taiyaki.org>
#     All rights reserved.
#     This is free software with ABSOLUTELY NO WARRANTY.
#
# You can redistribute it and/or modify it under the terms of 
# the GNU General Public License version 2.

SUBDIRS = doc etc grammar lib src packaging uim
EXTRA_DIST = autogen.sh prime.spec prime.spec.in prime.pc.in

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = prime.pc

install-etc:
	(cd etc && $(MAKE) $(AM_MAKEFLAGS) install-etc)

uninstall-etc:
	(cd etc && $(MAKE) $(AM_MAKEFLAGS) uninstall-etc)

install-uim:
	(cd uim && $(MAKE) $(AM_MAKEFLAGS) install-uim)

rpm:
	$(MAKE) dist
	rpmbuild -ta --clean $(PACKAGE)-$(VERSION).tar.gz

deb:
	rm -rf debian/
	cp -a packaging/Debian/debian/ debian
	dch -v "$(VERSION)-0.local.1" 'Local build.'
	fakeroot make -f debian/rules binary

cygwin: cygwin-dist

cygwin-dist:
	rm -rf cygwin/dist
	./configure --prefix `pwd`/cygwin/dist/usr/local \
                    --with-rubydir=`pwd`/cygwin/dist/usr/lib/ruby/site_ruby/1.8
	make install
	cd cygwin/dist ; tar cjf ../$(PACKAGE)-$(VERSION).tar.bz2 usr ; rm -rf usr
	make install-etc
	cd cygwin/dist ; tar cjf ../$(PACKAGE)-etc-$(VERSION).tar.bz2 usr ; rm -rf usr
	cd cygwin ; ruby -e " \
	packages = ['', '-etc']; \
	packages.each { | suffix | \
	  package_name = '$(PACKAGE)' + suffix; \
	  archive_name = package_name + '-$(VERSION).tar.bz2'; \
	  md5_string  = \`md5sum #{archive_name}\`.split().first(); \
	  size_string = \`ls -l #{archive_name}\`.split()[4]; \
	  File::open(package_name + '.ini', 'w') {|io| \
	    File::open(package_name + '.ini.src', 'r').each {|line| \
	      line.sub!('%PACKAGE_VERSION%', '$(PACKAGE_VERSION)'); \
	      line.sub!('%PACKAGE_MD5%',     md5_string); \
	      line.sub!('%PACKAGE_SIZE%',    size_string); \
	      io.print(line); \
	    }}} "
	./configure