]> diplodocus.org Git - nmh/blob - sbr/Makefile.in
Fix stupid accidental dependence on a bash quirk in previous
[nmh] / sbr / Makefile.in
1 #
2 # Makefile for sbr subdirectory
3 #
4 # $Id$
5 #
6
7 SHELL = /bin/sh
8
9 top_srcdir = @top_srcdir@
10 srcdir = @srcdir@
11 VPATH = @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 KRB4_INCLUDES = @KRB4_INCLUDES@ # for mts
23 HESIOD_INCLUDES = @HESIOD_INCLUDES@ # for mts
24 CONFIGDEFS = -DNMHETCDIR='"$(etcdir)"' -DMAILSPOOL='"$(mailspool)"' -DSENDMAILPATH='"$(sendmailpath)"'
25 INCLUDES = -I.. -I. -I$(top_srcdir)
26
27 LEX = @LEX@
28 AWK = @AWK@
29 LORDER = @LORDER@
30 TSORT = @TSORT@
31 RANLIB = @RANLIB@
32 LIBTOOL = @LIBTOOL@
33 GNU_LIBTOOL = @GNU_LIBTOOL@
34 LINT = @LINT@
35 LINTFLAGS = @LINTFLAGS@
36
37 mailspool = @mailspool@
38 sendmailpath = @sendmailpath@
39
40 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
41 COMPILE2 = $(CC) -c $(DEFS) $(CONFIGDEFS) $(INCLUDES) $(KRB4_INCLUDES) $(HESIOD_INCLUDES) $(CFLAGS)
42
43
44
45 .SUFFIXES:
46 .SUFFIXES: .c .o
47
48 .c.o:
49 $(COMPILE) $<
50
51 # this header file is parsed to generate signal messages (sigmsg.h)
52 SIGNAL_H = @SIGNAL_H@
53
54 # source for library functions
55 SRCS = add.c addrsbr.c ambigsw.c atooi.c brkstring.c \
56 check_charset.c client.c closefds.c concat.c context_del.c \
57 context_find.c context_foil.c context_read.c \
58 context_replace.c context_save.c copy.c \
59 copyip.c cpydata.c cpydgst.c discard.c done.c dtime.c dtimep.c \
60 error.c ext_hook.c fdcompare.c folder_addmsg.c folder_delmsgs.c \
61 folder_free.c folder_pack.c folder_read.c \
62 folder_realloc.c gans.c getans.c getanswer.c \
63 getarguments.c getcpy.c getfolder.c getpass.c \
64 fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c \
65 fmt_scan.c lock_file.c m_atoi.c m_backup.c \
66 m_convert.c m_draft.c m_getfld.c m_gmprot.c \
67 m_maildir.c m_name.c m_scratch.c m_tmpfil.c \
68 makedir.c mts.c norm_charmap.c \
69 path.c peekc.c pidwait.c pidstatus.c \
70 print_help.c print_sw.c print_version.c push.c \
71 putenv.c pwd.c refile.c remdir.c r1bindex.c \
72 readconfig.c ruserpass.c seq_add.c seq_bits.c \
73 seq_del.c seq_getnum.c seq_list.c seq_nameok.c \
74 seq_print.c seq_read.c seq_save.c seq_setcur.c \
75 seq_setprev.c seq_setunseen.c showfile.c signals.c \
76 smatch.c snprintb.c ssequal.c strcasecmp.c \
77 strindex.c trimcpy.c uprf.c vfgets.c fmt_def.c \
78 m_msgdef.c mf.c
79
80 # source for compatibility functions
81 COMPAT = snprintf.c strdup.c strerror.c
82
83 OBJS = $(SRCS:.c=.o)
84
85 # auxiliary files
86 AUX = Makefile.in sigmsg.awk dtimep.lex
87
88 # all files in this directory included in the distribution
89 DIST = $(SRCS) $(COMPAT) $(AUX)
90
91 # ========= DEPENDENCIES FOR BUILDING ==========
92
93 # default target
94 all: libmh.a
95
96 sigmsg.h: sigmsg.awk
97 $(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
98
99 lint: sigmsg.h
100 $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
101
102 # Note that some lexes (for example flex 2.5.4) require that there
103 # be no space between -o and the output filename.
104 dtimep.c: dtimep.lex
105 $(LEX) -o$@ $<
106
107 client.o: client.c
108 $(COMPILE2) $<
109
110 mts.o: mts.c
111 $(COMPILE2) $<
112
113 pidstatus.o: sigmsg.h
114
115 libmh.a: $(OBJS)
116 rm -f $@
117 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
118 $(LIBTOOL) -static -c -o libmh.a $(OBJS) ; \
119 else \
120 ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT)` ; \
121 $(RANLIB) libmh.a ; \
122 fi
123
124 install:
125
126 uninstall:
127
128 # ========== DEPENDENCIES FOR CLEANUP ==========
129
130 mostlyclean:
131 rm -f *.o *~
132
133 clean: mostlyclean
134 rm -f libmh.a sigmsg.h dtimep.c
135
136 distclean: clean
137 rm -f Makefile
138
139 realclean: distclean
140
141 superclean: realclean
142
143 # ========== DEPENDENCIES FOR MAINTENANCE ==========
144
145 subdir = sbr
146
147 Makefile: Makefile.in ../config.status
148 cd .. && ./config.status $(subdir)/$@
149
150 distdir = ../`cat ../distname`/$(subdir)
151 nmhdist: $(DIST)
152 @echo "Copying distribution files in $(subdir)"
153 @for file in $(DIST); do \
154 cp -p $(srcdir)/$$file $(distdir); \
155 done
156