summaryrefslogtreecommitdiff
path: root/libmu_scm/Makefile.am
blob: 2c4c5ed4b869f48241245d8cff4f8820bdf60c65 (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
## Process this file with GNU Automake to create Makefile.in

##   Copyright (C) 2001, 2002, 2006, 2007,
##   2009 Free Software Foundation, Inc.
##
##   GNU Mailutils is free software; you can redistribute it and/or
##   modify it under the terms of the GNU General Public License as
##   published by the Free Software Foundation; either version 3, or (at
##   your option) any later version.
##
##   This program is distributed in the hope that it will be useful, but
##   WITHOUT ANY WARRANTY; without even the implied warranty of
##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
##   General Public License for more details.
##
##   You should have received a copy of the GNU General Public License
##   along with this program; if not, write to the Free Software
##   Foundation, Inc.  51 Franklin Street, Fifth Floor, Boston, MA
##   02110-1301 USA

INCLUDES = -I. @MU_LIB_COMMON_INCLUDES@ @GUILE_INCLUDES@ 

lib_LTLIBRARIES=libmu_scm.la

C_SRCS=\
 mu_address.c\
 mu_body.c\
 mu_dbgport.c\
 mu_guile.c\
 mu_mailbox.c\
 mu_message.c\
 mu_mime.c\
 mu_logger.c\
 mu_port.c\
 mu_scm.c\
 mu_util.c

libmu_scm_la_SOURCES=\
 $(C_SRCS) \
 mu_scm.h

libmu_scm_la_LDFLAGS = -rpath $(libdir) -version-info @VI_CURRENT@:@VI_REVISION@:@VI_AGE@
libmu_scm_la_LIBADD = \
 ${MU_LIB_MBOX}\
 ${MU_LIB_IMAP}\
 ${MU_LIB_POP}\
 ${MU_LIB_NNTP}\
 ${MU_LIB_MH}\
 ${MU_LIB_MAILDIR}\
 ${MU_LIB_MAILER}\
 ${MU_LIB_MAILUTILS}\
 @GUILE_LIBS@

EXTRA_DIST=mailutils.scm mailutils.scm.in guile-procedures.texi guile-procedures.txt

sitedir=@MU_GUILE_SITE_DIR@
site_DATA=guile-procedures.txt mailutils.scm

DOT_X_FILES=\
 mu_address.x\
 mu_body.x\
 mu_mailbox.x\
 mu_message.x\
 mu_mime.x\
 mu_logger.x\
 mu_port.x\
 mu_scm.x\
 mu_util.x

DOT_DOC_FILES=\
 mu_address.doc\
 mu_body.doc\
 mu_mailbox.doc\
 mu_message.doc\
 mu_mime.doc\
 mu_logger.doc\
 mu_port.doc\
 mu_scm.doc\
 mu_util.doc 

BUILT_SOURCES=$(DOT_X_FILES) $(DOT_DOC_FILES) guile-procedures.texi

DISTCLEANFILES=\
 $(DOT_X_FILES)\
 $(DOT_DOC_FILES)\
 guile-procedures.texi\
 guile-procedures.txt\
 mailutils.scm

CLEANFILES=*.inc

AM_CPPFLAGS=-DDATADIR=\"$(pkgdatadir)\"
ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
   --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'

GUILE_DOC_SNARF=$(mu_aux_dir)/guile-doc-snarf

SUFFIXES=.x .doc .inc .in

.c.x:
	$(AM_V_GEN)AWK=$(AWK) \
	$(GUILE_DOC_SNARF) -o $@ \
                           $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 

.c.doc:
	$(AM_V_GEN)AWK=$(AWK) \
	$(GUILE_DOC_SNARF) -d -o $@ \
                           $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 

.c.inc:
	$(AM_V_GEN)sed -n 's/SCM_DEFINE *(.[^,]*, *\"\([^"][^"]*\)\".*/[(export \1)]/p' $< > $@

guile-procedures.texi: $(DOT_DOC_FILES)
	$(AM_V_GEN)cat $(DOT_DOC_FILES) > $@

guile-procedures.txt: guile-procedures.texi
	$(AM_V_GEN) rm -f $@; \
	  $(MAKEINFO) --force -o $@ guile-procedures.texi || test -f $@

mailutils.scm: mailutils.scm.in $(C_SRCS:.c=.inc)
	$(AM_V_GEN)m4 -DVERSION=$(VERSION) -DLIBDIR=$(libdir) \
	   -DSITEDIR=$(sitedir) \
           -DBUILDDIR=$(top_builddir)/libmu_scm \
            $(srcdir)/mailutils.scm.in > $@


## Add -MG to make the .x magic work with auto-dep code.
MKDEP = $(CC) -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)

install-data-hook:
	 @here=`pwd`; \
	 cd $(DESTDIR)$(libdir);\
	 if test -f libmu_scm.la; then \
		dlname=`sed -n 's/dlname='\''\(.*\)'\''/\1/p' libmu_scm.la`; \
		test -z "$dlname" && dlname='libmu_scm.so'; \
		$(LN_S) -f "$$dlname" libguile-mailutils-v-$(VERSION).so; \
	 fi; \
	 cd $$here

Return to:

Send suggestions and report system problems to the System administrator.