mhl and mhbuild ignore to long lines
[mmh] / sbr / Makefile.in
1 #
2 # Makefile for sbr subdirectory
3 #
4
5 SHELL = /bin/sh
6
7 top_srcdir = @top_srcdir@
8 srcdir     = @srcdir@
9 VPATH      = @srcdir@
10
11 VERSION = `$(top_srcdir)/version.sh $(top_srcdir)`
12
13 prefix      = @prefix@
14 exec_prefix = @exec_prefix@
15 bindir      = @bindir@
16 libdir      = @libdir@
17 etcdir      = @sysconfdir@
18
19 CC       = @CC@
20 CFLAGS   = @CFLAGS@
21 DEFS     = @DEFS@
22 # add include dir . for sigmsg.h and .. for config.h when building
23 # in different directory
24 INCLUDES = -I$(top_srcdir) -I. -I.. @CPPFLAGS@
25
26 LEX    = @LEX@
27 AWK    = @AWK@
28 LORDER = @LORDER@
29 TSORT  = @TSORT@
30 RANLIB = @RANLIB@
31 LIBTOOL = @LIBTOOL@
32 GNU_LIBTOOL = @GNU_LIBTOOL@
33 LINT    = @LINT@
34 LINTFLAGS = @LINTFLAGS@
35
36 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
37
38 LOCALLIBS = ../config/config.o
39
40 .SUFFIXES:
41 .SUFFIXES: .c .o
42
43 .c.o:
44         $(COMPILE) $<
45
46 # this header file is parsed to generate signal messages (sigmsg.h)
47 SIGNAL_H = @SIGNAL_H@
48
49 # source for library functions
50 SRCS = addrsbr.c ambigsw.c brkstring.c  \
51         charset.c concat.c context_del.c  \
52         context_find.c context_read.c  \
53         context_replace.c context_save.c \
54         cpydata.c crawl_folders.c  \
55         charstring.c \
56         dtime.c dtimep.c  \
57         error.c execprog.c ext_hook.c fold.c  \
58         folder_addmsg.c folder_delmsgs.c  \
59         folder_free.c folder_read.c  \
60         folder_realloc.c gans.c getans.c getanswer.c  \
61         getarguments.c \
62         fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c  \
63         fmt_scan.c lock_file.c m_atoi.c \
64         m_convert.c m_draft.c m_getfld2.c m_gmprot.c  \
65         m_name.c \
66         makedir.c mts.c norm_charmap.c  \
67         path.c pidwait.c pidstatus.c  \
68         print_help.c print_sw.c print_version.c \
69         putenv.c mhbasename.c  \
70         readconfig.c seq_add.c seq_bits.c  \
71         seq_del.c seq_getnum.c seq_list.c seq_nameok.c  \
72         seq_print.c seq_read.c seq_save.c seq_setcur.c  \
73         seq_setunseen.c signals.c  \
74         smatch.c snprintb.c strcasecmp.c  \
75         strindex.c trim.c trimcpy.c uprf.c vfgets.c fmt_def.c  \
76         mf.c utils.c m_mktemp.c seq_msgstats.c \
77         unquote.c encode_rfc2047.c parse_msgs.c \
78         getthreadid.c
79
80 OBJS =  $(SRCS:.c=.o)
81
82 # ========= DEPENDENCIES FOR BUILDING ==========
83
84 # default target
85 all: libmh.a
86
87 sigmsg.h: sigmsg.awk
88         $(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
89
90 lint: sigmsg.h
91         $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
92
93 # Note that not all lexes support -o (it is not POSIX); also
94 # some lexes will only accept '-n -t', not '-nt'.
95 # Also, not all makes accept $< in non-pattern rules,
96 # hence the explicit filenames here.
97 dtimep.c: dtimep.lex
98         $(LEX) -n -t $(srcdir)/dtimep.lex > $@
99
100 pidstatus.o: sigmsg.h
101
102 libmh.a: $(OBJS) $(LOCALLIBS) version.c
103         rm -f $@
104         $(COMPILE) -DVERSION="\"$(VERSION)\"" -o version.o $(srcdir)/version.c
105         if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
106           $(LIBTOOL) -static -c -o libmh.a $(OBJS) $(LOCALLIBS) version.o; \
107         else \
108           ar cr libmh.a `$(LORDER) $(OBJS) $(LOCALLIBS) version.o | $(TSORT) 2>/dev/null`  ; \
109           $(RANLIB) libmh.a  ; \
110         fi
111         rm -f version.o
112
113 install:
114
115 uninstall:
116
117 # ========== DEPENDENCIES FOR CLEANUP ==========
118
119 mostlyclean:
120         rm -f *.o *~
121
122 clean: mostlyclean
123         rm -f libmh.a sigmsg.h
124
125 distclean: clean
126         rm -f Makefile dtimep.c
127
128 realclean: distclean
129
130 superclean: realclean
131
132 # ========== DEPENDENCIES FOR MAINTENANCE ==========
133
134 subdir = sbr
135
136 Makefile: Makefile.in ../config.status
137         cd .. && ./config.status $(subdir)/$@