]> diplodocus.org Git - nmh/commitdiff
OK, this fixes the problem referenced in the last commit. It
authorDavid Levine <levinedl@acm.org>
Sun, 28 Dec 2014 21:51:36 +0000 (15:51 -0600)
committerDavid Levine <levinedl@acm.org>
Sun, 28 Dec 2014 21:51:36 +0000 (15:51 -0600)
removes the copy of the etc files only during make distcheck.

Makefile.am
configure.ac
test/common.sh.in
test/mhparam/test-mhparam

index 1cc087532aa8bf09d1d2fefb778a291542e7d37a..af4a2fee17c0d543aa50260a421cbc911a86b7bc 100644 (file)
@@ -37,6 +37,7 @@ TESTS_ENVIRONMENT = MH_OBJ_DIR="@abs_builddir@" \
                    MH_TEST_DIR="@abs_builddir@/test/testdir" \
                    nmhlibexecdir="$(nmhlibexecdir)" bindir="$(bindir)" \
                    mandir="$(mandir)" nmhetcdir="$(nmhetcdir)" \
                    MH_TEST_DIR="@abs_builddir@/test/testdir" \
                    nmhlibexecdir="$(nmhlibexecdir)" bindir="$(bindir)" \
                    mandir="$(mandir)" nmhetcdir="$(nmhetcdir)" \
+                   nmhetcdirinst="@nmhetcdirinst@$(nmhetcdir)" \
                    supported_locks="$(supported_locks)" \
                    default_locking="${default_locking}" \
                    MULTIBYTE_ENABLED=$(MULTIBYTE_ENABLED) \
                    supported_locks="$(supported_locks)" \
                    default_locking="${default_locking}" \
                    MULTIBYTE_ENABLED=$(MULTIBYTE_ENABLED) \
@@ -102,7 +103,13 @@ TESTS = test/ali/test-ali test/anno/test-anno \
 check_SCRIPTS = test/common.sh
 check_PROGRAMS = test/getfullname test/getcanon test/fakepop test/fakesmtp \
                 test/getcwidth
 check_SCRIPTS = test/common.sh
 check_PROGRAMS = test/getfullname test/getcanon test/fakepop test/fakesmtp \
                 test/getcwidth
-DISTCHECK_CONFIGURE_FLAGS = DISABLE_SETGID_MAIL=1
+
+## The location of installed nmhetcdir is, for all purposes except
+## distcheck, $nmhetcdir.  For distcheck, prepend $MH_INST_DIR (from
+## test/common.sh.in), which is based on $MH_TEST_DIR (from
+## $TESTS_ENVIRONMENT).
+DISTCHECK_CONFIGURE_FLAGS = DISABLE_SETGID_MAIL=1 \
+                           NMHETCDIRINST='$${abs_builddir}/test/testdir/inst'
 
 ##
 ## Stuff that should be cleaned via "make clean"
 
 ##
 ## Stuff that should be cleaned via "make clean"
@@ -596,7 +603,7 @@ sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/arglist.c \
 
 config/sbr_libmh_a-config.$(OBJEXT) sbr/sbr_libmh_a-mts.$(OBJEXT): Makefile
 
 
 config/sbr_libmh_a-config.$(OBJEXT) sbr/sbr_libmh_a-mts.$(OBJEXT): Makefile
 
-sbr_libmh_a_CPPFLAGS = -I./sbr -DNMHETCDIR='"$(nmhetcdir)"' \
+sbr_libmh_a_CPPFLAGS = -I./sbr -DNMHETCDIR='"@nmhetcdirinst@$(nmhetcdir)"' \
                -DMAILSPOOL='"$(mailspool)"' \
                -DSENDMAILPATH='"$(sendmailpath)"' -DNMHBINDIR='"$(bindir)"' \
                -DNMHLIBEXECDIR='"$(nmhlibexecdir)"'
                -DMAILSPOOL='"$(mailspool)"' \
                -DSENDMAILPATH='"$(sendmailpath)"' -DNMHBINDIR='"$(bindir)"' \
                -DNMHLIBEXECDIR='"$(nmhlibexecdir)"'
index e0a96f5db13f2187ebe0c1adf2cd4ce4d716ac04..02f0a04474f3a8d476a4270a8819de53477a4e38 100644 (file)
@@ -515,6 +515,13 @@ AS_IF([test "$LEX" = flex],
 '; sed "s/\(   \)int i;/\1yy_size_t i;/" $@ >$@.tmp && mv -f $@.tmp $@'])
        AC_SUBST([LFLAGS])])
 
 '; sed "s/\(   \)int i;/\1yy_size_t i;/" $@ >$@.tmp && mv -f $@.tmp $@'])
        AC_SUBST([LFLAGS])])
 
+dnl ------------------
+dnl FOR INTERNAL USE by the NMH test suite
+dnl ------------------
+AC_ARG_VAR([NMHETCDIRINST], [for internal use by nmh test suite])
+AS_IF([test -n "$NMHETCDIRINST"], [nmhetcdirinst=$NMHETCDIRINST]
+      AC_SUBST([nmhetcdirinst]))
+
 dnl ----------------
 dnl CHECK STRUCTURES
 dnl ----------------
 dnl ----------------
 dnl CHECK STRUCTURES
 dnl ----------------
index a4e75bc401571320df8b986df293a9fcb7b5a98b..8f89a2cd426df231548d3cd3c740484e738a615d 100644 (file)
@@ -13,6 +13,9 @@ test -z "$exec_prefix"  &&  exec_prefix=@exec_prefix@
 test -z "$bindir"  &&  bindir="@bindir@"
 test -z "$mandir"  &&  mandir="@mandir@"
 test -z "$nmhetcdir"  &&  nmhetcdir="@sysconfdir@/nmh"
 test -z "$bindir"  &&  bindir="@bindir@"
 test -z "$mandir"  &&  mandir="@mandir@"
 test -z "$nmhetcdir"  &&  nmhetcdir="@sysconfdir@/nmh"
+#### The following doesn't support running the distcheck version of
+#### test-mhparam standalone, but only via make distcheck.
+test -z "$nmhetcdirinst"  &&  nmhetcdirinst="@nmhetcdirinst@$nmhetcdir"
 test -z "$nmhlibexecdir"  &&  nmhlibexecdir="@libexecdir@/nmh"
 test -z "$supported_locks"  &&  supported_locks="@supported_locks@"
 test -z "$default_locking"  &&  default_locking="@default_locking@"
 test -z "$nmhlibexecdir"  &&  nmhlibexecdir="@libexecdir@/nmh"
 test -z "$supported_locks"  &&  supported_locks="@supported_locks@"
 test -z "$default_locking"  &&  default_locking="@default_locking@"
@@ -289,14 +292,19 @@ postproc: ${MH_LIBEXEC_DIR}/post
 showproc: ${MH_LIBEXEC_DIR}/mhl
 EOF
 
 showproc: ${MH_LIBEXEC_DIR}/mhl
 EOF
 
-  for f in MailAliases components digestcomps distcomps forwcomps mhl.body \
-           mhl.digest mhl.format mhl.forward mhl.headers mhl.reply \
-           mhn.defaults rcvdistcomps replcomps replgroupcomps scan.MMDDYY \
-           scan.YYYYMMDD scan.curses scan.default scan.highlighted scan.mailx \
-          scan.nomime scan.size scan.time scan.timely scan.unseen
-  do
-    cp "${MH_INST_DIR}${nmhetcdir}/${f}" "${MH_TEST_DIR}/Mail" || exit 1
-  done
+  if test -z '@nmhetcdirinst@'; then
+    #### This isn't used with make distcheck.
+    for f in MailAliases components digestcomps distcomps forwcomps \
+             mhl.body mhl.digest mhl.format \
+             mhl.forward mhl.headers mhl.reply \
+             mhn.defaults rcvdistcomps replcomps replgroupcomps \
+             scan.MMDDYY scan.YYYYMMDD scan.curses scan.default \
+             scan.highlighted scan.mailx scan.nomime scan.size scan.time \
+             scan.timely scan.unseen
+    do
+      cp "${MH_INST_DIR}${nmhetcdir}/${f}" "${MH_TEST_DIR}/Mail" || exit 1
+    done
+  fi
 
   folder -create +inbox > /dev/null
   # create 10 basic messages
 
   folder -create +inbox > /dev/null
   # create 10 basic messages
index 7d2c602184069a0b5f85de2432ac983d90fae3c8..8a48b8de264227c587a10258866a9b8cadbbc95a 100755 (executable)
@@ -96,7 +96,7 @@ $MH_INST_DIR$nmhlibexecdir/mhl
 nmh-`cat ${srcdir}/VERSION`
 $bindir/whatnow
 $bindir/whom
 nmh-`cat ${srcdir}/VERSION`
 $bindir/whatnow
 $bindir/whom
-$nmhetcdir
+$nmhetcdirinst
 $MH_LIBEXEC_DIR
 fcntl
 ${default_locking}
 $MH_LIBEXEC_DIR
 fcntl
 ${default_locking}