On Wed, Jan 16, 2019 at 8:39 AM Tom de Vries <tdevr...@suse.de> wrote: > > On 16-01-19 02:19, Ian Lance Taylor wrote: > > On Tue, Dec 11, 2018 at 2:16 AM Tom de Vries <tdevr...@suse.de> wrote: > >> > >> 2018-11-11 Tom de Vries <tdevr...@suse.de> > >> > >> * configure.ac (DWZ): Set with AC_CHECK_PROG. > >> (HAVE_DWZ): Set with AM_CONDITIONAL. > >> * configure: Regenerate. > >> * Makefile.am (TESTS): Add btest_dwz. > >> * Makefile.in: Regenerate. > > > >> diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am > >> index 1a3680bc98c..497cc2f5c97 100644 > >> --- a/libbacktrace/Makefile.am > >> +++ b/libbacktrace/Makefile.am > >> @@ -157,6 +157,18 @@ btest_alloc_LDADD = libbacktrace_alloc.la > >> > >> check_PROGRAMS += btest_alloc > >> > >> +if HAVE_DWZ > >> + > >> +%_dwz: % > >> + rm -f $@_common.debug > >> + cp $< $@ > >> + cp $< $@_2 > >> + $(DWZ) -m $@_common.debug $@ $@_2 > > > > This doesn't look right. A Makefile recipe must always create the > > target as the very last command. Otherwise, if the recipe is > > interrupted for any reason, such as, in this case, a failure to run > > dwz, then when you run make again it will think that the recipe has > > already been run. > > Fixed.
> +%_dwz: % > + rm -f $@_common.debug Add $@ to the initial rm -f, so that you remove the target. > + cp $@_1 $@ Make this a mv. You don't need $@_1 after this. Also, rm $@_2 here or in mostlyclean or something. This is OK with those changes. Thanks. Ian