From 89b67a868e2023d41a29609c2fa186174e634952 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 05 Oct 2023 11:41:49 -0400 Subject: build: Generate "FORMATS" file in $(distdir) Fixes: make[2]: *** No rule to make target 'FORMATS', needed by 'distdir-am'. Stop. --- (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 778b251..0e8124d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -63,7 +63,7 @@ atsign_LINK = $(LINK) version.c EXTRA_atsign_DEPENDENCIES = version.c CLEANFILES = version.c CONFIG_CLEAN_FILES = -EXTRA_DIST = autogen.sh FORMATS +EXTRA_DIST = autogen.sh V_REDIR = $(V_REDIR_$(V)) V_REDIR_ = $(V_REDIR_$(AM_DEFAULT_VERBOSITY)) @@ -105,16 +105,20 @@ if IN_GIT endif if ENABLE_TESTS if CROSS_COMPILING - if ! [ -f 'FORMATS' ]; then \ + if [ -f 'FORMATS' ]; then \ + cp -p 'FORMATS' '$(distdir)/FORMATS'; \ + else \ printf 'Error: "FORMATS" file cannot be generated when %s' \ 'cross compiling' 1>&2; \ exit 1; \ fi else !CROSS_COMPILING - $(srcdir)/atsign -d '1969-12-31 19:00:01' -F 1>FORMATS + $(srcdir)/atsign -d '1969-12-31 19:00:01' -F 1>'$(distdir)/FORMATS' endif !CROSS_COMPILING else !ENABLE_TESTS - if ! [ -f 'FORMATS' ]; then \ + if [ -f 'FORMATS' ]; then \ + cp -p 'FORMATS' '$(distdir)/FORMATS'; \ + else \ printf 'Error: "FORMATS" file cannot be generated without %s' \ 'test suite support' 1>&2; \ exit 1; \ -- cgit v0.9.1