From: Richard Russon Date: Wed, 2 Aug 2017 18:19:38 +0000 (+0100) Subject: build: move mutt_md5 to hcache X-Git-Tag: neomutt-20170907~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c3be3288f20c3666cf2ae39fa6b5e8169ab6706;p=neomutt build: move mutt_md5 to hcache This tool is only used by the build to create a header cache checksum. --- diff --git a/Makefile.am b/Makefile.am index 081ceded8..3a4ecfb04 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,7 @@ include $(top_srcdir)/flymake.am AUTOMAKE_OPTIONS = 1.6 foreign -EXTRA_PROGRAMS = mutt_md5 pgpewrap pgpring +EXTRA_PROGRAMS = pgpewrap pgpring # Test the .tar file by building everything AM_DISTCHECK_CONFIGURE_FLAGS = \ @@ -102,14 +102,10 @@ pgpring_SOURCES = pgppubring.c pgpring_LDADD = $(LIBOBJS) $(NCRYPT_LIBS) $(INTLLIBS) $(LIBMUTT) pgpring_DEPENDENCIES = $(LIBOBJS) $(NCRYPT_DEPS) $(INTLDEPS) $(LIBMUTTDEPS) -mutt_md5_SOURCES = md5.c -mutt_md5_LDADD = $(LIBMUTT) -mutt_md5_DEPENDENCIES = $(LIBMUTTDEPS) - txt2c_SOURCES = txt2c.c txt2c_LDADD = -noinst_PROGRAMS = $(MUTT_MD5) txt2c +noinst_PROGRAMS = txt2c conststrings.c: txt2c config.status ( \ diff --git a/hcache/Makefile.am b/hcache/Makefile.am index 1db24b9be..0bf7700d6 100644 --- a/hcache/Makefile.am +++ b/hcache/Makefile.am @@ -2,6 +2,7 @@ include $(top_srcdir)/flymake.am AUTOMAKE_OPTIONS = 1.6 foreign +EXTRA_PROGRAMS = mutt_md5 EXTRA_DIST = bdb.c gdbm.c hcache.c kc.c lmdb.c qdbm.c tc.c hcachever.sh @@ -9,6 +10,7 @@ AM_CPPFLAGS = -I$(top_srcdir) noinst_LIBRARIES = libhcache.a noinst_HEADERS = backend.h hcache.h +noinst_PROGRAMS = $(MUTT_MD5) libhcache_a_SOURCES = @@ -36,10 +38,14 @@ if BUILD_HC_TC libhcache_a_SOURCES += tc.c endif -BUILT_SOURCES = $(HCVERSION) +LIBMUTT = -L../lib -lmutt +LIBMUTTDEPS = $(top_srcdir)/lib/lib.h ../lib/libmutt.a + +mutt_md5_SOURCES = mutt_md5.c +mutt_md5_LDADD = $(LIBMUTT) +mutt_md5_DEPENDENCIES = $(LIBMUTTDEPS) -../$(MUTT_MD5): - +$(MAKE) -C .. $(MUTT_MD5) +BUILT_SOURCES = $(HCVERSION) $(top_srcdir)/keymap_defs.h: +$(MAKE) -C $(top_srcdir) keymap_defs.h @@ -47,7 +53,7 @@ $(top_srcdir)/keymap_defs.h: hcversion.h: $(top_srcdir)/mutt.h $(top_srcdir)/address.h $(top_srcdir)/list.h \ $(top_srcdir)/lib/buffer.h $(top_srcdir)/parameter.h \ $(top_srcdir)/body.h $(top_srcdir)/envelope.h \ - $(top_srcdir)/header.h $(srcdir)/hcachever.sh ../$(MUTT_MD5) + $(top_srcdir)/header.h $(srcdir)/hcachever.sh $(MUTT_MD5) ( echo '#include "config.h"'; echo '#include "mutt.h"'; \ echo '#include "address.h"'; echo '#include "list.h"'; \ echo '#include "lib/buffer.h"'; echo '#include "parameter.h"'; \ diff --git a/hcache/hcachever.sh b/hcache/hcachever.sh index 733e6ca16..8f2be6f0b 100755 --- a/hcache/hcachever.sh +++ b/hcache/hcachever.sh @@ -77,7 +77,7 @@ do done echo " */" >> $TMPD -MD5TEXT=`echo "$TEXT" | ../mutt_md5` +MD5TEXT=`echo "$TEXT" | ./mutt_md5` echo "#define HCACHEVER 0x"`echo $MD5TEXT | cut -c-8` >> $TMPD # TODO: validate we have all structs diff --git a/md5.c b/hcache/mutt_md5.c similarity index 100% rename from md5.c rename to hcache/mutt_md5.c diff --git a/po/POTFILES.in b/po/POTFILES.in index fff851a1c..3b455c11a 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -70,7 +70,7 @@ lib/string.c main.c mbox.c mbyte.c -md5.c +hcache/mutt_md5.c menu.c mh.c muttlib.c