srcdir = @srcdir@
VPATH = @srcdir@
+VERSION = `$(top_srcdir)/version.sh $(top_srcdir)`
+
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
CC = @CC@
CFLAGS = @CFLAGS@
DEFS = @DEFS@
-INCLUDES = -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@
+# add include dir .. for config.h when building in different directory
+INCLUDES = -I$(srcdir) -I$(top_srcdir) -I.. @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-LOCALLIBS = ../config/version.o ../config/config.o ../sbr/libmh.a
+LOCALLIBS = ../sbr/libmh.a
LINKLIBS = $(LOCALLIBS) $(LIBS)
LINT = @LINT@
TERMLIB = @TERMLIB@
LEXLIB = @LEXLIB@
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
+COMPILE = $(CC) -c $(DEFS) -DVERSION="\"$(VERSION)\"" $(INCLUDES) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@
LN = ln
LCMDS = flists folders next prev fnext fprev unseen
# misc support binaries
-MISC = ap dp fmtdump mhtest mmhwrap
+MISC = ap dp fmtdump mhtest mmhwrap whatnow2
# commands with 'S'pecial installation needs
SCMDS = inc
prompter.c rcvdist.c rcvpack.c rcvstore.c \
refile.c repl.c rmf.c rmm.c scan.c scansbr.c send.c \
sendfiles.sh slocal.c sortm.c spost.c termsbr.c \
- whatnow.c whatnowproc.c whom.c
-
-# auxiliary files
-AUX = Makefile.in
-
-# all files in this directory included in the distribution
-DIST = $(SRCS) $(AUX)
+ whatnow.c whatnowproc.c whom.c whatnow2.sh
# ========== DEFAULT TARGET ==========
chmod +x mmhwrap
mhsign: mhsign.sh
- cp $(srcdir)/mhsign.sh mhsign
+ sed "s,%libdir%,"$(libdir)"," $(srcdir)/mhsign.sh >mhsign
chmod +x mhsign
mhpgp: mhpgp.sh
packf: packf.o dropsbr.o $(LOCALLIBS)
$(LINK) packf.o dropsbr.o $(LINKLIBS)
-pick: pick.o $(LOCALLIBS)
- $(LINK) pick.o $(LINKLIBS)
+pick: pick.o scansbr.o termsbr.o $(LOCALLIBS)
+ $(LINK) pick.o scansbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
print-mimetype: print-mimetype.sh
cp $(srcdir)/print-mimetype.sh print-mimetype
whatnow: whatnow.o $(LOCALLIBS)
$(LINK) whatnow.o $(LINKLIBS)
+whatnow2: whatnow2.sh
+ cp $(srcdir)/whatnow2.sh whatnow2
+
whom: whom.o $(LOCALLIBS)
$(LINK) whom.o $(LINKLIBS)
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
-