Blame view

libmu_scm/Makefile.am 2.88 KB
1 2 3 4
## Process this file with GNU Automake to create Makefile.in

##   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
##
5
##   GNU Mailutils is free software; you can redistribute it and/or
6 7 8 9 10 11 12 13 14 15 16 17 18
##   modify it under the terms of the GNU General Public License as
##   published by the Free Software Foundation; either version 2, 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.
##   59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19

20
INCLUDES =-I. -I$(top_builddir) -I$(srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/include @GUILE_INCLUDES@ @INTLINCS@
Sergey Poznyakoff authored
21

22 23
lib_LTLIBRARIES=@MU_SCM@
EXTRA_LTLIBRARIES=libmu_scm.la
24
C_SRCS=\
Sergey Poznyakoff authored
25 26
 mu_address.c\
 mu_body.c\
Sergey Poznyakoff authored
27
 mu_guimb.c\
Sergey Poznyakoff authored
28 29 30 31 32 33
 mu_mailbox.c\
 mu_message.c\
 mu_mime.c\
 mu_logger.c\
 mu_port.c\
 mu_scm.c\
34 35 36 37
 mu_util.c

libmu_scm_la_SOURCES=\
 $(C_SRCS) \
Sergey Poznyakoff authored
38
 mu_scm.h
Sergey Poznyakoff authored
39

40 41 42 43 44
libmu_scm_la_LDFLAGS = -rpath $(libdir) -version-info 0:0:0

EXTRA_DIST=mailutils.scm mailutils.scm.in

pkgdata_DATA=@GUILE_PKGDATA@
Sergey Poznyakoff authored
45
DOT_X_FILES=mu_address.x mu_body.x mu_guimb.x mu_mailbox.x mu_message.x mu_mime.x\
46
 mu_logger.x mu_port.x mu_scm.x mu_util.x
Sergey Poznyakoff authored
47
DOT_DOC_FILES=mu_address.doc mu_body.doc mu_guimb.doc mu_mailbox.doc mu_message.doc \
48
 mu_mime.doc mu_logger.doc mu_port.doc mu_scm.doc mu_util.doc 
49
BUILT_SOURCES=@GUILE_BUILT_SOURCES@ 
Sergey Poznyakoff authored
50

51 52
DISTCLEANFILES=$(DOT_X_FILES) $(DOT_DOC_FILES) @GUILE_PKGDATA@
CLEANFILES=*.inc
Jeff Bailey authored
53

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

58 59
GUILE_DOC_SNARF=$(top_srcdir)/scripts/guile-$(GUILE_SNARF_VERSION)/guile-doc-snarf

60
SUFFIXES=.x .doc .inc .in
Sergey Poznyakoff authored
61 62

.c.x:
63 64 65
	AWK=$(AWK) \
	$(GUILE_DOC_SNARF) -o $@ \
                           $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 
Sergey Poznyakoff authored
66 67

.c.doc:
68 69 70
	AWK=$(AWK) \
	$(GUILE_DOC_SNARF) -d -o $@ \
                           $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 
Sergey Poznyakoff authored
71

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

Sergey Poznyakoff authored
75 76 77
guile-procedures.txt: $(DOT_DOC_FILES)
	cat $(DOT_DOC_FILES) > $@

78
mailutils.scm: mailutils.scm.in $(C_SRCS:.c=.inc)
79
	m4 -DVERSION=$(VERSION) -DLIBDIR=$(libdir) \
80 81
           -DBUILDDIR=$(top_builddir)/libmu_scm \
            mailutils.scm.in > $@
82 83


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

87
install-data-hook:
88
	@here=`pwd`; \
89
	 cd $(DESTDIR)$(libdir);\
90 91 92
	 if test -f libmu_scm.so; then \
		$(LN_S) -f libmu_scm.so libguile-mailutils-v-$(VERSION).so; \
	 fi; \
93
	 cd $$here