Build the release tarball from git, not manually
[mmh] / sbr / Makefile.in
index 5de54a2..51049c7 100644 (file)
@@ -17,7 +17,9 @@ etcdir      = @sysconfdir@
 CC       = @CC@
 CFLAGS   = @CFLAGS@
 DEFS     = @DEFS@
-INCLUDES = -I.. -I. -I$(top_srcdir) @CPPFLAGS@
+# add include dir . for sigmsg.h and .. for config.h when building
+# in different directory
+INCLUDES = -I$(top_srcdir) -I. -I.. @CPPFLAGS@
 
 LEX    = @LEX@
 AWK    = @AWK@
@@ -29,11 +31,9 @@ GNU_LIBTOOL = @GNU_LIBTOOL@
 LINT    = @LINT@
 LINTFLAGS = @LINTFLAGS@
 
-LIBOBJS = @LIBOBJS@
-
 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
 
-
+LOCALLIBS = ../config/version.o ../config/config.o
 
 .SUFFIXES:
 .SUFFIXES: .c .o
@@ -46,41 +46,33 @@ SIGNAL_H = @SIGNAL_H@
 
 # source for library functions
 SRCS = addrsbr.c ambigsw.c brkstring.c  \
-       check_charset.c concat.c context_del.c  \
-       context_find.c context_foil.c context_read.c  \
+       charset.c concat.c context_del.c  \
+       context_find.c context_read.c  \
        context_replace.c context_save.c \
        cpydata.c cpydgst.c crawl_folders.c  \
-       discard.c done.c dtime.c dtimep.c  \
-       error.c ext_hook.c folder_addmsg.c folder_delmsgs.c  \
-       folder_free.c folder_pack.c folder_read.c  \
+       dtime.c dtimep.c  \
+       error.c execprog.c ext_hook.c folder_addmsg.c folder_delmsgs.c  \
+       folder_free.c folder_read.c  \
        folder_realloc.c gans.c getans.c getanswer.c  \
-       getarguments.c getcpy.c getpass.c  \
+       getarguments.c getcpy.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  \
+       fmt_scan.c lock_file.c m_atoi.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 pidwait.c pidstatus.c  \
        print_help.c print_sw.c print_version.c \
-       putenv.c refile.c mhbasename.c  \
-       readconfig.c ruserpass.c seq_add.c seq_bits.c  \
+       putenv.c mhbasename.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 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
+       strindex.c trim.c trimcpy.c uprf.c vfgets.c fmt_def.c  \
+       mf.c utils.c m_mktemp.c seq_msgstats.c \
+       unquote.c encode_rfc2047.c
 
-OBJS =  $(SRCS:.c=.o) $(LIBOBJS)
-
-# auxiliary files
-AUX = Makefile.in sigmsg.awk dtimep.lex
-
-# all files in this directory included in the distribution
-DIST = $(SRCS) $(COMPAT) $(AUX)
+OBJS =  $(SRCS:.c=.o)
 
 # ========= DEPENDENCIES FOR BUILDING ==========
 
@@ -98,16 +90,16 @@ lint: sigmsg.h
 # 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
+       $(LEX) -n -t $(srcdir)/dtimep.lex > $@
 
 pidstatus.o: sigmsg.h
 
-libmh.a: $(OBJS)
+libmh.a: $(OBJS) $(LOCALLIBS)
        rm -f $@
        if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
-         $(LIBTOOL) -static -c -o libmh.a $(OBJS) ; \
+         $(LIBTOOL) -static -c -o libmh.a $(OBJS) $(LOCALLIBS) ; \
        else \
-         ar cr libmh.a `$(LORDER) $(OBJS) | $(TSORT) 2>/dev/null`  ; \
+         ar cr libmh.a `$(LORDER) $(OBJS) $(LOCALLIBS) | $(TSORT) 2>/dev/null`  ; \
          $(RANLIB) libmh.a  ; \
        fi
 
@@ -137,10 +129,3 @@ subdir = sbr
 Makefile: Makefile.in ../config.status
        cd .. && ./config.status $(subdir)/$@
 
-distdir = ../`cat ../distname`/$(subdir)
-mmhdist: $(DIST)
-       @echo "Copying distribution files in $(subdir)"
-       @for file in $(DIST); do \
-         cp -p $(srcdir)/$$file $(distdir); \
-       done
-