~ubuntu-branches/debian/squeeze/libgpg-error/squeeze

« back to all changes in this revision

Viewing changes to src/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Jose Carlos Garcia Sogo
  • Date: 2004-03-16 23:25:13 UTC
  • Revision ID: james.westby@ubuntu.com-20040316232513-u9dnue5r0i3egfkq
Tags: upstream-0.7
ImportĀ upstreamĀ versionĀ 0.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Makefile.am for libgpg-error.
 
2
# Copyright (C) 2003, 2004 g10 Code GmbH
 
3
 
4
# This file is part of libgpg-error.
 
5
 
6
# libgpg-error is free software; you can redistribute it and/or modify
 
7
# it under the terms of the GNU Lesser General Public License as
 
8
# published by the Free Software Foundation; either version 2.1 of the
 
9
# License, or (at your option) any later version.
 
10
 
11
# libgpg-error is distributed in the hope that it will be useful,
 
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
# GNU Lesser General Public License for more details.
 
15
 
16
# You should have received a copy of the GNU Lesser General Public
 
17
# License along with this program; if not, write to the Free Software
 
18
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
19
 
 
20
# We distribute the generated sources err-sources.h and err-codes.h,
 
21
# because they are needed to build the po directory, and they don't
 
22
# depend on the configuration anyway. 
 
23
EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
 
24
        mkerrnos.awk errnos.in \
 
25
        mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \
 
26
        mkheader.awk gpg-error.h.in \
 
27
        err-sources.h err-codes.h gpg-error-config.in gpg-error.m4
 
28
BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
 
29
        err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h
 
30
CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
 
31
        gpg-error.h mkerrcodes mkerrcodes.h \
 
32
        err-sources-sym.h err-codes-sym.h errnos-sym.h
 
33
 
 
34
bin_SCRIPTS = gpg-error-config
 
35
m4datadir = $(datadir)/aclocal
 
36
m4data_DATA = gpg-error.m4
 
37
 
 
38
include_HEADERS = gpg-error.h
 
39
 
 
40
lib_LTLIBRARIES = libgpg-error.la
 
41
 
 
42
libgpg_error_la_LDFLAGS = -version-info \
 
43
  @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@
 
44
 
 
45
libgpg_error_la_SOURCES = gpg-error.h gettext.h \
 
46
        strsource.c strerror.c code-to-errno.c code-from-errno.c
 
47
 
 
48
libgpg_error_la_LIBADD = @LTLIBINTL@
 
49
 
 
50
bin_PROGRAMS = gpg-error
 
51
gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c
 
52
gpg_error_LDADD = ./libgpg-error.la
 
53
 
 
54
err-sources.h: Makefile mkstrtable.awk err-sources.h.in
 
55
        $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \
 
56
                $(srcdir)/err-sources.h.in >$@
 
57
 
 
58
err-sources-sym.h: Makefile mkstrtable.awk err-sources.h.in
 
59
        $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
 
60
                $(srcdir)/err-sources.h.in >$@
 
61
 
 
62
err-codes.h: Makefile mkstrtable.awk err-codes.h.in
 
63
        $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \
 
64
                $(srcdir)/err-codes.h.in >$@
 
65
 
 
66
err-codes-sym.h: Makefile mkstrtable.awk err-codes.h.in
 
67
        $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
 
68
                $(srcdir)/err-codes.h.in >$@
 
69
 
 
70
code-to-errno.h: Makefile mkerrnos.awk errnos.in
 
71
        $(AWK) -f $(srcdir)/mkerrnos.awk $(srcdir)/errnos.in >$@
 
72
 
 
73
# It is correct to use $(CPP).  We want the host's idea of the error codes.
 
74
mkerrcodes.h: Makefile mkerrcodes.awk
 
75
        $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in \
 
76
        | $(CPP) - | grep GPG_ERR_ | $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
 
77
 
 
78
# It is correct to use $(CC_FOR_BUILD) here.  We want to run the
 
79
# program at build time.
 
80
mkerrcodes: mkerrcodes.c mkerrcodes.h Makefile
 
81
        $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $<
 
82
 
 
83
code-from-errno.h: mkerrcodes Makefile
 
84
        ./$< | $(AWK) -f $(srcdir)/mkerrcodes2.awk >$@
 
85
 
 
86
errnos-sym.h: Makefile mkstrtable.awk errnos.in
 
87
        $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
 
88
                -v prefix=GPG_ERR_ -v namespace=errnos_ \
 
89
                $(srcdir)/errnos.in >$@
 
90
 
 
91
gpg-error.h: Makefile mkheader.awk \
 
92
                 err-sources.h.in err-codes.h.in errnos.in gpg-error.h.in
 
93
        $(AWK) -f $(srcdir)/mkheader.awk \
 
94
                $(srcdir)/err-sources.h.in \
 
95
                $(srcdir)/err-codes.h.in \
 
96
                $(srcdir)/errnos.in \
 
97
                $(srcdir)/gpg-error.h.in > $@