Made show(1) the default lproc. `list' and `display' changed a bit.
[mmh] / sbr / Makefile.in
index f77f988..f916cea 100644 (file)
@@ -1,8 +1,6 @@
 #
 # Makefile for sbr subdirectory
 #
-# $Id$
-#
 
 SHELL = /bin/sh
 
@@ -10,21 +8,37 @@ top_srcdir = @top_srcdir@
 srcdir     = @srcdir@
 VPATH      = @srcdir@
 
+prefix      = @prefix@
+exec_prefix = @exec_prefix@
+bindir      = @bindir@
+libdir      = @libdir@
+etcdir      = @sysconfdir@
+
 CC       = @CC@
 CFLAGS   = @CFLAGS@
 DEFS     = @DEFS@
-INCLUDES = -I.. -I. -I$(top_srcdir)
+CONFIGDEFS = -DNMHETCDIR='"$(etcdir)"' -DMAILSPOOL='"$(mailspool)"' -DSENDMAILPATH='"$(sendmailpath)"'
+INCLUDES = -I.. -I. -I$(top_srcdir) @CPPFLAGS@
 
+LEX    = @LEX@
 AWK    = @AWK@
 LORDER = @LORDER@
 TSORT  = @TSORT@
 RANLIB = @RANLIB@
 LIBTOOL = @LIBTOOL@
 GNU_LIBTOOL = @GNU_LIBTOOL@
+LINT    = @LINT@
+LINTFLAGS = @LINTFLAGS@
 
 LIBOBJS = @LIBOBJS@
 
+mailspool    = @mailspool@
+sendmailpath = @sendmailpath@
+
 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
+COMPILE2 = $(CC) -c $(DEFS) $(CONFIGDEFS) $(INCLUDES) $(CFLAGS)
+
+
 
 .SUFFIXES:
 .SUFFIXES: .c .o
@@ -36,48 +50,39 @@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
 SIGNAL_H = @SIGNAL_H@
 
 # source for library functions
-SRCS = add.c addrsbr.c ambigsw.c atooi.c brkstring.c check_charset.c \
-       closefds.c concat.c context_del.c context_find.c context_foil.c \
-       context_read.c context_replace.c context_save.c copy.c \
-       copyip.c cpydata.c cpydgst.c discard.c done.c error.c \
-       fdcompare.c folder_addmsg.c folder_delmsgs.c folder_free.c \
-       folder_pack.c folder_read.c folder_realloc.c gans.c \
-       getans.c getanswer.c getarguments.c getcpy.c getfolder.c fmt_addr.c \
-       fmt_compile.c fmt_new.c fmt_rfc2047.c fmt_scan.c lock_file.c \
-       m_atoi.c m_backup.c m_convert.c m_draft.c m_getfld.c m_gmprot.c \
-       m_maildir.c m_name.c m_scratch.c m_tmpfil.c makedir.c \
-       path.c peekc.c pidwait.c pidstatus.c print_help.c \
-       print_sw.c print_version.c push.c putenv.c pwd.c refile.c \
-       remdir.c r1bindex.c readconfig.c seq_add.c seq_bits.c seq_del.c \
-       seq_getnum.c seq_list.c seq_nameok.c seq_print.c seq_read.c \
-       seq_save.c seq_setcur.c seq_setprev.c seq_setunseen.c showfile.c \
-       signals.c smatch.c snprintb.c ssequal.c strcasecmp.c strindex.c \
-       trimcpy.c uprf.c vfgets.c fmt_def.c m_msgdef.c
+SRCS = addrsbr.c ambigsw.c atooi.c brkstring.c  \
+       check_charset.c closefds.c concat.c context_del.c  \
+       context_find.c context_foil.c context_read.c  \
+       context_replace.c context_save.c \
+       copyip.c cpydata.c cpydgst.c crawl_folders.c  \
+       discard.c done.c dtime.c dtimep.c  \
+       error.c ext_hook.c fdcompare.c folder_addmsg.c folder_delmsgs.c  \
+       folder_free.c folder_pack.c folder_read.c  \
+       folder_realloc.c gans.c getans.c getanswer.c  \
+       getarguments.c getcpy.c getpass.c  \
+       fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c  \
+       fmt_scan.c lock_file.c m_atoi.c m_backup.c  \
+       m_convert.c m_draft.c m_getfld.c m_gmprot.c  \
+       m_name.c \
+       makedir.c mts.c norm_charmap.c  \
+       path.c peekc.c pidwait.c pidstatus.c  \
+       print_help.c print_sw.c print_version.c push.c  \
+       putenv.c refile.c mhbasename.c  \
+       readconfig.c ruserpass.c seq_add.c seq_bits.c  \
+       seq_del.c seq_getnum.c seq_list.c seq_nameok.c  \
+       seq_print.c seq_read.c seq_save.c seq_setcur.c  \
+       seq_setprev.c seq_setunseen.c signals.c  \
+       smatch.c snprintb.c strcasecmp.c  \
+       strindex.c trimcpy.c uprf.c vfgets.c fmt_def.c  \
+       m_msgdef.c mf.c utils.c m_mktemp.c
 
 # source for compatibility functions
-COMPAT = snprintf.c strdup.c strerror.c ruserpass.c
-
-OBJS = add.o addrsbr.o ambigsw.o atooi.o brkstring.o check_charset.o \
-       closefds.o concat.o context_del.o context_find.o context_foil.o \
-       context_read.o context_replace.o context_save.o copy.o \
-       copyip.o cpydata.o cpydgst.o discard.o done.o error.o \
-       fdcompare.o folder_addmsg.o folder_delmsgs.o folder_free.o \
-       folder_pack.o folder_read.o folder_realloc.o gans.o \
-       getans.o getanswer.o getarguments.o getcpy.o getfolder.o fmt_addr.o \
-       fmt_compile.o fmt_new.o fmt_rfc2047.o fmt_scan.o lock_file.o \
-       m_atoi.o m_backup.o m_convert.o m_draft.o m_getfld.o m_gmprot.o \
-       m_maildir.o m_name.o m_scratch.o m_tmpfil.o makedir.o \
-       path.o peekc.o pidwait.o pidstatus.o print_help.o \
-       print_sw.o print_version.o push.o putenv.o pwd.o refile.o \
-       remdir.o r1bindex.o readconfig.o seq_add.o seq_bits.o seq_del.o \
-       seq_getnum.o seq_list.o seq_nameok.o seq_print.o seq_read.o \
-       seq_save.o seq_setcur.o seq_setprev.o seq_setunseen.o showfile.o \
-       signals.o smatch.o snprintb.o ssequal.o strcasecmp.o strindex.o \
-       trimcpy.o uprf.o vfgets.o fmt_def.o m_msgdef.o \
-       $(LIBOBJS)
+COMPAT = snprintf.c strdup.c
+
+OBJS =  $(SRCS:.c=.o) $(LIBOBJS)
 
 # auxiliary files
-AUX = Makefile.in sigmsg.awk
+AUX = Makefile.in sigmsg.awk dtimep.lex
 
 # all files in this directory included in the distribution
 DIST = $(SRCS) $(COMPAT) $(AUX)
@@ -90,16 +95,26 @@ all: libmh.a
 sigmsg.h: sigmsg.awk
        $(AWK) -f $(srcdir)/sigmsg.awk $(SIGNAL_H) > $@
 
+lint: sigmsg.h
+       $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
+
+# Note that not all lexes support -o (it is not POSIX); also
+# some lexes will only accept '-n -t', not '-nt'.
+# Also, not all makes accept $< in non-pattern rules,
+# hence the explicit filenames here.
+dtimep.c: dtimep.lex
+       $(LEX) -n -t $(srcdir)/dtimep.lex > dtimep.c
+
 pidstatus.o: sigmsg.h
 
 libmh.a: $(OBJS)
        rm -f $@
-       if test x$(LIBTOOL) != xno -a x$(GNU_LIBTOOL) = x ; then \
+       if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
          $(LIBTOOL) -static -c -o libmh.a $(OBJS) ; \
        else \
-         ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT)`  ; \
+         ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT) 2>/dev/null`  ; \
          $(RANLIB) libmh.a  ; \
-       fi 
+       fi
 
 install:
 
@@ -111,7 +126,7 @@ mostlyclean:
        rm -f *.o *~
 
 clean: mostlyclean
-       rm -f libmh.a sigmsg.h
+       rm -f libmh.a sigmsg.h dtimep.c
 
 distclean: clean
        rm -f Makefile
@@ -125,8 +140,8 @@ superclean: realclean
 subdir = sbr
 
 Makefile: Makefile.in ../config.status
-       cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+       cd .. && ./config.status $(subdir)/$@
+
 distdir = ../`cat ../distname`/$(subdir)
 nmhdist: $(DIST)
        @echo "Copying distribution files in $(subdir)"