Switch to unified view

a b/unac/Makefile.am
1
#
2
# Copyright (C) 2000, 2001, 2002 Loic Dachary <loic@senga.org>
3
#
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
#
18
19
#
20
# Documentation
21
#
22
man_MANS = unaccent.1 unac.3
23
INCLUDES = -DUNAC_VERSION=\"$(VERSION)\"
24
25
#
26
# Support programs
27
#
28
noinst_HEADERS = \
29
  getopt.h
30
31
bin_PROGRAMS = unaccent
32
unaccent_SOURCES = unaccent.c 
33
unaccent_LDFLAGS = $(PROFILING)
34
unaccent_LDADD = @LIBOBJS@ libunac.la
35
36
#
37
# Library and headers
38
#
39
lib_LTLIBRARIES = libunac.la
40
libunac_la_LDFLAGS = -version-info $(MAJOR_VERSION):$(MINOR_VERSION):$(MICRO_VERSION)
41
libunac_la_SOURCES = unac.c
42
43
include_HEADERS = \
44
  unac.h
45
46
unac.c: $(UNICODEDATA) builder.in
47
  $(PERL) builder -source -database=$(srcdir)/$(UNICODEDATA)
48
49
#
50
# Tests
51
#
52
TESTS = t_unac
53
54
noinst_PROGRAMS = unactest unactest1
55
56
unactest_SOURCES = unactest.c
57
unactest_LDFLAGS = $(PROFILING)
58
unactest_LDADD = libunac.la
59
60
unactest1_SOURCES = unactest1.c
61
unactest1_LDFLAGS = $(PROFILING)
62
unactest1_LDADD = libunac.la
63
64
#
65
# Packaging
66
#
67
68
MAINTAINERCLEANFILES = $(DISTCLEANFILES)
69
70
DISTCLEANFILES = config.log config.status
71
72
UNICODEDATA = UnicodeData-$(UNICODE_VERSION).txt
73
74
EXTRA_DIST = builder.in $(UNICODEDATA) .version t_unac.in \
75
  unaccent.1 unac.3
76
77
pkgconfigdir = ${libdir}/pkgconfig
78
pkgconfig_DATA = unac.pc
79
80
#
81
# Build source and binary rpms. As of rpm-3.0, the ~/.rpmmacros
82
# must contain the following line:
83
# %_topdir /home/loic/local/rpm
84
# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
85
#
86
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
87
88
rpm:
89
  RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
90
  cp $(PACKAGE).spec $$RPM_TOPDIR/SPECS ; \
91
  cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
92
  rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(PACKAGE).spec ; \
93
  mv $$RPM_TOPDIR/RPMS/i386/$(PACKAGE)-$(VERSION)-1.i386.rpm . ; \
94
  mv $$RPM_TOPDIR/SRPMS/$(PACKAGE)-$(VERSION)-1.src.rpm .
95
96
#
97
# Cleanup
98
#
99
clean-local:
100
  rm -f unac.reference
101