summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2023-10-05 11:41:49 (EDT)
committer P. J. McDermott <pj@pehjota.net>2023-10-05 11:41:49 (EDT)
commit89b67a868e2023d41a29609c2fa186174e634952 (patch)
tree8dc114b3c40792fea50e4d7b8c1513a2c78411f7 /Makefile.am
parent28636d7a3521faf76aa9c26f25538dc4ae84aa7c (diff)
downloadatsign-89b67a868e2023d41a29609c2fa186174e634952.zip
atsign-89b67a868e2023d41a29609c2fa186174e634952.tar.gz
atsign-89b67a868e2023d41a29609c2fa186174e634952.tar.bz2
build: Generate "FORMATS" file in $(distdir)
Fixes: make[2]: *** No rule to make target 'FORMATS', needed by 'distdir-am'. Stop.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am12
1 files changed, 8 insertions, 4 deletions
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; \