]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix a "make install" failure in a VPATH build with OpenBSD 'make'.
authorBruno Haible <bruno@clisp.org>
Wed, 15 Jul 2020 00:13:03 +0000 (02:13 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jul 2020 00:14:04 +0000 (02:14 +0200)
* gettext-tools/misc/Makefile.am: Assume that archive.dir.tar is in $(srcdir).

gettext-tools/misc/Makefile.am

index 1aa4732f204cfd7f80a0652798168b1b6b6e3ddf..a0ade1e459c56c6680f5564df7a7402806f94dda 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools/misc subdirectory of GNU gettext
-## Copyright (C) 1995-1997, 2000-2003, 2005-2007, 2009-2010, 2019 Free
+## Copyright (C) 1995-1997, 2000-2003, 2005-2007, 2009-2010, 2019-2020 Free
 ## Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
@@ -47,9 +47,20 @@ ARCHIVE_dirxz = archive.dir.tar.xz
 ARCHIVE_git = archive.git.tar.gz
 ARCHIVE_cvs = archive.cvs.tar.gz
 
-# The archive.dir.tar is not in the CVS. Alpha-testers must use the one from
-# an already installed release.
-archive.dir.tar:
+# The archive.dir.tar file appears in release tarballs.
+# The GNU Coding Standards say in
+# <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>:
+#   "GNU distributions usually contain some files which are not source files
+#    ... . Since these files normally appear in the source directory, they
+#    should always appear in the source directory, not in the build directory.
+#    So Makefile rules to update them should put the updated files in the
+#    source directory."
+# Therefore we put this file in the source directory, not the build directory.
+
+# The archive.dir.tar is not stored in the version control repository.
+# Alpha-testers must use the one from an already installed release or from
+# https://alpha.gnu.org/gnu/gettext/ .
+$(srcdir)/archive.dir.tar:
        if test -f $(gettextsrcdir)/archive.dir.tar.gz; then \
          gzip -d -c < $(gettextsrcdir)/archive.dir.tar.gz > $@-t && mv $@-t $@; \
        else \
@@ -67,49 +78,24 @@ archive.dir.tar:
 MOSTLYCLEANFILES += archive.dir.tar-t
 
 # The archive.dir.tar.gz is generated from archive.dir.tar.
-archive.dir.tar.gz: archive.dir.tar
-       if test -f archive.dir.tar; then \
-         inputfile=archive.dir.tar; \
-       else \
-         inputfile='$(srcdir)'/archive.dir.tar; \
-       fi; \
-       gzip -c -9 < "$$inputfile" > $@-t && mv $@-t $@
+archive.dir.tar.gz: $(srcdir)/archive.dir.tar
+       gzip -c -9 < '$(srcdir)'/archive.dir.tar > $@-t && mv $@-t $@
 MOSTLYCLEANFILES += archive.dir.tar.gz-t
 
 # The archive.dir.tar.bz2 is generated from archive.dir.tar.
-archive.dir.tar.bz2: archive.dir.tar
-       if test -f archive.dir.tar; then \
-         inputfile=archive.dir.tar; \
-       else \
-         inputfile='$(srcdir)'/archive.dir.tar; \
-       fi; \
-       bzip2 -c -9 < "$$inputfile" > $@-t && mv $@-t $@
+archive.dir.tar.bz2: $(srcdir)/archive.dir.tar
+       bzip2 -c -9 < '$(srcdir)'/archive.dir.tar > $@-t && mv $@-t $@
 MOSTLYCLEANFILES += archive.dir.tar.bz2-t
 
 # The archive.dir.tar.xz is generated from archive.dir.tar.
-archive.dir.tar.xz: archive.dir.tar
-       if test -f archive.dir.tar; then \
-         inputfile=archive.dir.tar; \
-       else \
-         inputfile='$(srcdir)'/archive.dir.tar; \
-       fi; \
-       xz -c -5 < "$$inputfile" > $@-t && mv $@-t $@
+archive.dir.tar.xz: $(srcdir)/archive.dir.tar
+       xz -c -5 < '$(srcdir)'/archive.dir.tar > $@-t && mv $@-t $@
 MOSTLYCLEANFILES += archive.dir.tar.xz-t
 
 # The archive.git.tar.gz is generated from archive.dir.tar.
-archive.git.tar.gz: archive.dir.tar
-       if test -f archive.dir.tar; then \
-         inputfile=archive.dir.tar; \
-       else \
-         inputfile='$(srcdir)'/archive.dir.tar; \
-       fi; \
-       ./convert-archive dir git "$$inputfile" $@
+archive.git.tar.gz: $(srcdir)/archive.dir.tar
+       ./convert-archive dir git '$(srcdir)'/archive.dir.tar $@
 
 # The archive.cvs.tar.gz is generated from archive.dir.tar.
-archive.cvs.tar.gz: archive.dir.tar
-       if test -f archive.dir.tar; then \
-         inputfile=archive.dir.tar; \
-       else \
-         inputfile='$(srcdir)'/archive.dir.tar; \
-       fi; \
-       ./convert-archive dir cvs "$$inputfile" $@
+archive.cvs.tar.gz: $(srcdir)/archive.dir.tar
+       ./convert-archive dir cvs '$(srcdir)'/archive.dir.tar $@