| ## automake - create Makefile.in from Makefile.am | |
| ## Copyright (C) 2001-2026 Free Software Foundation, Inc. | |
| ## This program is free software; you can redistribute it and/or modify | |
| ## it under the terms of the GNU General Public License as published by | |
| ## the Free Software Foundation; either version 3, or (at your option) | |
| ## any later version. | |
| ## This program is distributed in the hope that it will be useful, | |
| ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| ## GNU General Public License for more details. | |
| ## You should have received a copy of the GNU General Public License | |
| ## along with this program. If not, see <https://www.gnu.org/licenses/>. | |
| DIST_COMMON += $(am__DIST_COMMON) | |
| DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | |
| if %?TOPDIR_P% | |
| distdir = $(PACKAGE)-$(VERSION) | |
| top_distdir = $(distdir) | |
| am__remove_distdir = \ | |
| if test -d "$(distdir)"; then \ | |
| find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ | |
| ; rm -rf "$(distdir)" \ | |
| ## On MSYS (1.0.17) it is not possible to remove a directory that is in | |
| ## use; so, if the first rm fails, we sleep some seconds and retry, to | |
| ## give pending processes some time to exit and "release" the directory | |
| ## before we remove it. The value of "some seconds" is 5 for the moment, | |
| ## which is mostly an arbitrary value, but seems high enough in practice. | |
| ## See automake bug#10470. | |
| || { sleep 5 && rm -rf "$(distdir)"; }; \ | |
| else :; fi | |
| am__post_remove_distdir = \ | |
| if test "$${am__dist_keep_dir-}" != "$(abs_builddir)"; then \ | |
| $(am__is_gnu_make) || rm -f am__distdir.tar; \ | |
| $(am__remove_distdir); \ | |
| fi | |
| am__ensure_distdir_tar = \ | |
| test -f am__distdir.tar || $(MAKE) $(AM_MAKEFLAGS) am__distdir.tar | |
| am__dist_compress_failed = \ | |
| am__rc=$$?; rm -f $$am__archive am__distdir.tar; exit $$am__rc | |
| endif %?TOPDIR_P% | |
| if %?SUBDIRS% | |
| ## computes a relative pathname RELDIR such that DIR1/RELDIR = DIR2. | |
| ## Input: | |
| ## - DIR1 relative pathname, relative to the current directory | |
| ## - DIR2 relative pathname, relative to the current directory | |
| ## Output: | |
| ## - reldir relative pathname of DIR2, relative to DIR1 | |
| am__relativize = \ | |
| dir0=`pwd`; \ | |
| sed_first='s,^\([^/]*\)/.*$$,\1,'; \ | |
| sed_rest='s,^[^/]*/*,,'; \ | |
| sed_last='s,^.*/\([^/]*\)$$,\1,'; \ | |
| sed_butlast='s,/*[^/]*$$,,'; \ | |
| while test -n "$$dir1"; do \ | |
| first=`echo "$$dir1" | sed -e "$$sed_first"`; \ | |
| if test "$$first" != "."; then \ | |
| if test "$$first" = ".."; then \ | |
| dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ | |
| dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ | |
| else \ | |
| first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ | |
| if test "$$first2" = "$$first"; then \ | |
| dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ | |
| else \ | |
| dir2="../$$dir2"; \ | |
| fi; \ | |
| dir0="$$dir0"/"$$first"; \ | |
| fi; \ | |
| fi; \ | |
| dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ | |
| done; \ | |
| reldir="$$dir2" | |
| endif %?SUBDIRS% | |
| .PHONY: distdir | |
| if %?SUBDIRS% | |
| AM_RECURSIVE_TARGETS += distdir distdir-am | |
| endif %?SUBDIRS% | |
| if %?DIST_BUILT_SOURCES% | |
| distdir: $(BUILT_SOURCES) | |
| $(MAKE) $(AM_MAKEFLAGS) distdir-am | |
| else !%?DIST_BUILT_SOURCES% | |
| distdir: | |
| $(MAKE) $(AM_MAKEFLAGS) distdir-am | |
| endif !%?DIST_BUILT_SOURCES% | |
| distdir-am: $(DISTFILES) | |
| ## | |
| ## For Gnits users, this is pretty handy. Look at 15 lines | |
| ## in case some explanatory text is desirable. | |
| ## | |
| if %?TOPDIR_P% | |
| if %?CK-NEWS% | |
| @case `sed 15q $(srcdir)/NEWS` in \ | |
| *"$(VERSION)"*) : ;; \ | |
| *) \ | |
| echo "NEWS not updated; not releasing" 1>&2; \ | |
| exit 1;; \ | |
| esac | |
| endif %?CK-NEWS% | |
| endif %?TOPDIR_P% | |
| ## | |
| ## Only for the top dir. | |
| ## | |
| if %?TOPDIR_P% | |
| $(am__remove_distdir) | |
| $(AM_V_at)$(MKDIR_P) "$(distdir)" | |
| endif %?TOPDIR_P% | |
| ## | |
| ## | |
| @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
| topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
| am__distdir="$(distdir)"; \ | |
| ## | |
| ## Yet another hack to support SUN make. | |
| ## | |
| ## Let's assume 'foo' appears in DISTFILES and is not a built file. | |
| ## When building with VPATH=$(srcdir), SUN make and OSF1/Tru64 will | |
| ## rewrite 'foo' as '$(srcdir)/foo'. An attempt to install the file | |
| ## with | |
| ## cp $file $(distdir)/$file | |
| ## will thus install $(srcdir)/foo as $(distdir)/$(srcdir)/foo | |
| ## instead of $(distdir)/foo. | |
| ## | |
| ## So let's strip this leading $(srcdir)/ when it exists. (As far we | |
| ## know, only SUN make and OSF1/Tru64 make add it.) Searching whether | |
| ## the file is to be found in the source or build directory will be | |
| ## done later. | |
| ## | |
| ## In case we are _not_ using SUN or OSF1/Tru64 make, how can we be sure | |
| ## we are not stripping a legitimate filename that starts with the | |
| ## same pattern as $(srcdir)? | |
| ## Well, it can't happen without the Makefile author distributing | |
| ## something out of the distribution (which is bad). As an example, | |
| ## consider "EXTRA_DIST = ../bar". This is an issue if $srcdir is | |
| ## '..', however getting this value for srcdir is impossible: | |
| ## "EXTRA_DIST = ../bar" implies we are in a subdirectory (so '../bar' | |
| ## is within the package), hence '$srcdir' is something like | |
| ## '../../subdir'. | |
| ## | |
| ## There is more to say about files which are above the current directory, | |
| ## like '../bar' in the previous example. The OSF1/Tru64 make | |
| ## implementation can simplify filenames resulting from a VPATH lookup. | |
| ## For instance if "VPATH = ../../subdir" and '../bar' is found in that | |
| ## VPATH directory, then occurrences of '../bar' will be replaced by | |
| ## '../../bar' (instead of '../../subdir/../bar'). This obviously defeats | |
| ## any attempt to strip a leading $srcdir. Presently we have no workaround | |
| ## for this. We avoid this issue by writing "EXTRA_DIST = $(srcdir)/../bar" | |
| ## instead of "EXTRA_DIST = ../bar". This prefixing is needed only for files | |
| ## above the current directory. Fortunately, apart from auxdir files which | |
| ## can be located in .. or ../.., this situation hardly occurs in practice. | |
| ## | |
| ## Also rewrite $(top_srcdir) (which sometimes appears in DISTFILES, and can | |
| ## be absolute) by $(top_builddir) (which is always relative). $(srcdir) will | |
| ## be prepended later. | |
| list='$(DISTFILES)'; \ | |
| dist_files=`for file in $$list; do echo $$file; done | \ | |
| sed -e "s|^$$srcdirstrip/||;t" \ | |
| -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | |
| ## (The second 't' command clears the flag for the next round.) | |
| ## | |
| ## Make the subdirectories for the files. | |
| ## | |
| case $$dist_files in \ | |
| */*) $(MKDIR_P) `echo "$$dist_files" | \ | |
| sed "/\//!d;s|^|$$am__distdir/|;s,/[^/]*$$,," | \ | |
| sort -u` ;; \ | |
| esac; \ | |
| ## | |
| ## | |
| for file in $$dist_files; do \ | |
| ## | |
| ## Always look for the file in the build directory first. That way | |
| ## for something like yacc output we will correctly pick up the latest | |
| ## version. Also check for directories in the build directory first, | |
| ## so one can ship generated directories. | |
| ## | |
| if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | |
| ## | |
| ## Use cp, not ln. There are situations in which "ln" can fail. For | |
| ## instance a file to distribute could actually be a cross-filesystem | |
| ## symlink -- this can easily happen if "gettextize" was run on the | |
| ## distribution. | |
| ## | |
| if test -d $$d/$$file; then \ | |
| ## Don't mention $$file in the destination argument, since this fails if | |
| ## the destination directory already exists. Also, use '-R' and not '-r'. | |
| ## '-r' is almost always incorrect. | |
| ## | |
| ## If a directory exists both in '.' and $(srcdir), then we copy the | |
| ## files from $(srcdir) first and then install those from '.'. This | |
| ## can help people who distribute directories made of source files | |
| ## *and* generated files. It is also important when the directory | |
| ## exists only in $(srcdir), because some vendor Make (such as Tru64) | |
| ## will magically create an empty directory in '.'. | |
| dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | |
| ## If the destination directory already exists, it may contain read-only | |
| ## files, e.g., during "make distcheck". | |
| if test -d "$(distdir)/$$file"; then \ | |
| find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
| fi; \ | |
| if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | |
| cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | |
| find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | |
| fi; \ | |
| cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | |
| else \ | |
| ## Test for file existence because sometimes a file gets included in | |
| ## DISTFILES twice. For example this happens when a single source | |
| ## file is used in building more than one program. | |
| ## See also test 'dist-repeated.sh'. | |
| test -f "$(distdir)/$$file" \ | |
| || cp -p $$d/$$file "$(distdir)/$$file" \ | |
| || exit 1; \ | |
| fi; \ | |
| done | |
| if %?DIST-IF-PRESENT% | |
| @list='$(am__DIST_COMMON_IF_PRESENT)'; for file in $$list; do \ | |
| if test -f $$file; then d=.; else d=$(srcdir); fi; \ | |
| test -f $$d/$$file || continue; \ | |
| test -f "$(distdir)/$$file" \ | |
| || cp -p $$d/$$file "$(distdir)/$$file" \ | |
| || exit 1; \ | |
| done | |
| endif %?DIST-IF-PRESENT% | |
| if %?YLWRAP-DIST% | |
| @if test "$(srcdir)" != .; then \ | |
| srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
| list='$(am__ylwrap_dist_files)'; for file in $$list; do \ | |
| case $$file in "$(srcdir)"/*) continue;; esac; \ | |
| test -f $$file && test -f "$(distdir)/$$file" || continue; \ | |
| rm -f "$(distdir)/$$file" \ | |
| && sed -e "/^#/!b" \ | |
| -e "s|^\(#[ ]*\(line[ ][ ]*\)\{0,1\}[0-9][0-9]*[ ][ ]*\"\)$$srcdirstrip/|\1|" \ | |
| $$file >"$(distdir)/$$file" \ | |
| && touch -r $$file "$(distdir)/$$file" \ | |
| || exit 1; \ | |
| done; \ | |
| fi | |
| endif %?YLWRAP-DIST% | |
| ## | |
| ## Test for directory existence here because a previous automake | |
| ## invocation might have created some directories. Note that we | |
| ## explicitly set distdir for the subdir make; that lets us mix-n-match | |
| ## many automake-using packages into one large package, and have "dist" | |
| ## at the top level do the right thing. If we're in the topmost | |
| ## directory, then we use 'distdir' instead of 'top_distdir'; this lets | |
| ## us work correctly with an enclosing package. | |
| if %?SUBDIRS% | |
| @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ | |
| if test "$$subdir" = .; then :; else \ | |
| $(am__make_dryrun) \ | |
| || test -d "$(distdir)/$$subdir" \ | |
| || $(MKDIR_P) "$(distdir)/$$subdir" \ | |
| || exit 1; \ | |
| dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ | |
| $(am__relativize); \ | |
| new_distdir=$$reldir; \ | |
| dir1=$$subdir; dir2="$(top_distdir)"; \ | |
| $(am__relativize); \ | |
| new_top_distdir=$$reldir; \ | |
| echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ | |
| echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ | |
| ($(am__cd) $$subdir && \ | |
| $(MAKE) $(AM_MAKEFLAGS) \ | |
| top_distdir="$$new_top_distdir" \ | |
| distdir="$$new_distdir" \ | |
| ## Disable am__remove_distdir so that sub-packages do not clear a | |
| ## directory we have already cleared and might even have populated | |
| ## (e.g. shared AUX dir in the sub-package). | |
| am__remove_distdir=: \ | |
| ## Disable filename length check: | |
| am__skip_length_check=: \ | |
| ## No need to fix modes more than once: | |
| am__skip_mode_fix=: \ | |
| distdir) \ | |
| || exit 1; \ | |
| fi; \ | |
| done | |
| endif %?SUBDIRS% | |
| ## | |
| ## We might have to perform some last second updates, such as updating | |
| ## info files. | |
| ## We must explicitly set distdir and top_distdir for these sub-makes. | |
| ## | |
| if %?DIST-TARGETS% | |
| $(MAKE) $(AM_MAKEFLAGS) \ | |
| top_distdir="$(top_distdir)" distdir="$(distdir)" \ | |
| %DIST-TARGETS% | |
| endif %?DIST-TARGETS% | |
| ## | |
| ## This complex find command will try to avoid changing the modes of | |
| ## links into the source tree, in case they're hard-linked. | |
| ## | |
| ## Ignore return result from chmod, because it might give an error | |
| ## if we chmod a symlink. | |
| ## | |
| ## Another nastiness: if the file is unreadable by us, we make it | |
| ## readable regardless of the number of links to it. This only | |
| ## happens in perverse cases. | |
| ## | |
| ## We use $(install_sh) because that is a known-portable way to modify | |
| ## the file in place in the source tree. | |
| ## | |
| ## If we are being invoked recursively, then there is no need to walk | |
| ## the whole subtree again. This is a complexity reduction for a deep | |
| ## hierarchy of subpackages. | |
| ## | |
| if %?TOPDIR_P% | |
| -test -n "$(am__skip_mode_fix)" \ | |
| || find "$(distdir)" -type d ! -perm -755 \ | |
| -exec chmod u+rwx,go+rx {} \; -o \ | |
| ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ | |
| ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ | |
| ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ | |
| || chmod -R a+r "$(distdir)" | |
| if %?FILENAME_FILTER% | |
| ## %FILENAME_FILTER% is one dot longer than the requested maximum, so | |
| ## that it matches only the file names that exceed it. | |
| @if test -z "$(am__skip_length_check)" && find "$(distdir)" -type f -print | \ | |
| grep '^%FILENAME_FILTER%' 1>&2; then \ | |
| echo 'error: the above filenames are too long' \ | |
| '(see the filename-length-max option)' 1>&2; \ | |
| exit 1; \ | |
| else :; fi | |
| endif %?FILENAME_FILTER% | |
| endif %?TOPDIR_P% | |
| ## ------------------------------------- ## | |
| ## Listing the files of the distribution. ## | |
| ## ------------------------------------- ## | |
| ## Sub-makes may print "Entering directory" on stdout... | |
| am__distfiles_out = | |
| am__distfiles_prefix = | |
| .PHONY: print-distfiles print-distfiles-am | |
| if %?SUBDIRS% | |
| AM_RECURSIVE_TARGETS += print-distfiles print-distfiles-am | |
| endif %?SUBDIRS% | |
| print-distfiles: | |
| @out=`pwd`/am-dlist.tmp; rm -f "$$out"; \ | |
| $(MAKE) $(AM_MAKEFLAGS) am__distfiles_out="$$out" \ | |
| am__distfiles_prefix= print-distfiles-am >/dev/null \ | |
| || { rm -f "$$out"; exit 1; }; \ | |
| if test -f "$$out"; then LC_ALL=C sort -u "$$out"; fi; \ | |
| rm -f "$$out" | |
| print-distfiles-am: | |
| @if test -z "$(am__distfiles_out)"; then \ | |
| echo 'print-distfiles-am: am__distfiles_out is not set;' \ | |
| 'use print-distfiles instead' 1>&2; \ | |
| exit 1; \ | |
| fi; \ | |
| srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
| topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
| { \ | |
| list='$(DISTFILES)'; for file in $$list; do echo "$$file"; done; \ | |
| list='$(am__DIST_COMMON_IF_PRESENT)'; for file in $$list; do \ | |
| if test -f $$file || test -f $(srcdir)/$$file; then \ | |
| echo "$$file"; \ | |
| fi; \ | |
| done; \ | |
| } | sed -e "s|^$$srcdirstrip/||;t" \ | |
| -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t" | \ | |
| while read file; do \ | |
| if test -d $$file || test -d $(srcdir)/$$file; then \ | |
| list='$(srcdir) .'; for d in $$list; do \ | |
| test -d $$d/$$file || continue; \ | |
| ($(am__cd) $$d && find "$$file" ! -type d -print) || exit 1; \ | |
| done; \ | |
| else \ | |
| echo "$$file"; \ | |
| fi; \ | |
| done | \ | |
| sed -e 's|^|$(am__distfiles_prefix)|' \ | |
| -e ':a' -e 's|^\./||' -e 's|/\./|/|' -e 's|//*$$||' \ | |
| -e 's|^[^./][^/]*/\.\./||' -e 's|/[^./][^/]*/\.\./|/|' -e 'ta' \ | |
| >> "$(am__distfiles_out)" | |
| if %?SUBDIRS% | |
| @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ | |
| if test "$$subdir" = .; then continue; fi; \ | |
| if test -f $$subdir/Makefile \ | |
| && grep '^print-distfiles-am[ ]*:' $$subdir/Makefile >/dev/null; \ | |
| then \ | |
| ($(am__cd) $$subdir && \ | |
| $(MAKE) $(AM_MAKEFLAGS) \ | |
| am__distfiles_out="$(am__distfiles_out)" \ | |
| am__distfiles_prefix="$(am__distfiles_prefix)$$subdir/" \ | |
| print-distfiles-am) \ | |
| || exit 1; \ | |
| else \ | |
| echo "print-distfiles: cannot list the files in '$$subdir'" 1>&2; \ | |
| echo "$(am__distfiles_prefix)$$subdir" >> "$(am__distfiles_out)"; \ | |
| fi; \ | |
| done | |
| endif %?SUBDIRS% | |
| ## --------------------------------------- ## | |
| ## Building various distribution flavors. ## | |
| ## --------------------------------------- ## | |
| ## Note that we don't use GNU tar's '-z' option. One reason (but not | |
| ## the only reason) is that some versions of tar (e.g., OSF1) | |
| ## interpret '-z' differently. | |
| ## | |
| ## The -o option of GNU tar used to exclude empty directories. This | |
| ## behavior was fixed in tar 1.12 (released on 1997-04-25). But older | |
| ## versions of tar are still used (for instance NetBSD 1.6.1 ships | |
| ## with tar 1.11.2). We do not do anything specific w.r.t. this | |
| ## incompatibility since packages where empty directories need to be | |
| ## present in the archive are really unusual. | |
| ## | |
| ## We order DIST_TARGETS by expected duration of the compressors, | |
| ## slowest first, for better parallelism in "make dist". Do not | |
| ## reorder DIST_ARCHIVES, users may expect gzip to be first. | |
| ## | |
| ## Traditionally, gzip prepended the contents of the GZIP environment | |
| ## variable to its arguments, and the commands below formerly used | |
| ## this by invoking 'GZIP=$(GZIP_ENV) gzip'. The GZIP environment | |
| ## variable is now considered to be obsolescent, so the commands below | |
| ## now use 'eval GZIP= gzip $(GZIP_ENV)' instead; this should work | |
| ## with both older and newer gzip implementations. The 'eval' is to | |
| ## support makefile assignments like 'GZIP_ENV = "-9 -n"' that quote | |
| ## the GZIP_ENV right-hand side because that was needed with the | |
| ## former invocation pattern. | |
| if %?TOPDIR_P% | |
| ## Build the tarball here instead of piping tar into the compressor. | |
| ## A pipeline reports only its last exit status, and 'pipefail' is not | |
| ## portable, so a failing tar would go unnoticed and ship a truncated | |
| ## archive (automake bug#19614). This also runs tar once for all | |
| ## formats. | |
| ## | |
| ## Some tar implementations only warn about what they cannot archive | |
| ## and still exit 0, so anything on tar's standard error counts as a | |
| ## failure. configure exempts archivers that write there when all is | |
| ## well, cpio for one. | |
| # Exists only to be overridden by the user if desired. | |
| AM_DIST_TAR_IGNORE_STDERR = $(am__tar_ignore_stderr) | |
| am__distdir.tar: distdir | |
| am__distdir="$(distdir)"; \ | |
| am__tar_rc=0; \ | |
| am__tar_msg=`tardir=$$am__distdir && $(am__tar) 2>&1 >am__distdir.tar` \ | |
| || am__tar_rc=$$?; \ | |
| test -z "$$am__tar_msg" || { printf '%s\n' "$$am__tar_msg" >&2; \ | |
| test x"$(AM_DIST_TAR_IGNORE_STDERR)" = xyes || am__tar_rc=1; }; \ | |
| test $$am__tar_rc -eq 0 || { rm -f am__distdir.tar; \ | |
| echo "$(distdir).tar: cannot create the distribution archive" >&2; exit 1; } | |
| .INTERMEDIATE: am__distdir.tar | |
| ?GZIP?DIST_ARCHIVES += $(distdir).tar.gz | |
| GZIP_ENV = -9 | |
| .PHONY: dist-gzip am--dist-gzip | |
| dist-gzip: am--dist-gzip | |
| $(am__post_remove_distdir) | |
| am--dist-gzip: am__distdir.tar | |
| @$(am__ensure_distdir_tar) | |
| am__archive=$(distdir).tar.gz; \ | |
| eval GZIP= gzip $(GZIP_ENV) -c <am__distdir.tar >$$am__archive \ | |
| || { $(am__dist_compress_failed); } | |
| ?BZIP2?DIST_ARCHIVES += $(distdir).tar.bz2 | |
| .PHONY: dist-bzip2 am--dist-bzip2 | |
| dist-bzip2: am--dist-bzip2 | |
| $(am__post_remove_distdir) | |
| am--dist-bzip2: am__distdir.tar | |
| @$(am__ensure_distdir_tar) | |
| am__archive=$(distdir).tar.bz2; \ | |
| BZIP2=$${BZIP2--9} bzip2 -c <am__distdir.tar >$$am__archive \ | |
| || { $(am__dist_compress_failed); } | |
| ?BZIP3?DIST_ARCHIVES += $(distdir).tar.bz3 | |
| .PHONY: dist-bzip3 am--dist-bzip3 | |
| ## bzip3 does not read any envvars. | |
| dist-bzip3: am--dist-bzip3 | |
| $(am__post_remove_distdir) | |
| am--dist-bzip3: am__distdir.tar | |
| @$(am__ensure_distdir_tar) | |
| am__archive=$(distdir).tar.bz3; \ | |
| bzip3 -c <am__distdir.tar >$$am__archive \ | |
| || { $(am__dist_compress_failed); } | |
| ?LZIP?DIST_ARCHIVES += $(distdir).tar.lz | |
| .PHONY: dist-lzip am--dist-lzip | |
| dist-lzip: am--dist-lzip | |
| $(am__post_remove_distdir) | |
| am--dist-lzip: am__distdir.tar | |
| @$(am__ensure_distdir_tar) | |
| am__archive=$(distdir).tar.lz; \ | |
| lzip -c $${LZIP_OPT--9} <am__distdir.tar >$$am__archive \ | |
| || { $(am__dist_compress_failed); } | |
| ?XZ?DIST_ARCHIVES += $(distdir).tar.xz | |
| .PHONY: dist-xz am--dist-xz | |
| dist-xz: am--dist-xz | |
| $(am__post_remove_distdir) | |
| am--dist-xz: am__distdir.tar | |
| @$(am__ensure_distdir_tar) | |
| am__archive=$(distdir).tar.xz; \ | |
| XZ_OPT=$${XZ_OPT--e} xz -c <am__distdir.tar >$$am__archive \ | |
| || { $(am__dist_compress_failed); } | |
| ?ZSTD?DIST_ARCHIVES += $(distdir).tar.zst | |
| .PHONY: dist-zstd am--dist-zstd | |
| dist-zstd: am--dist-zstd | |
| $(am__post_remove_distdir) | |
| am--dist-zstd: am__distdir.tar | |
| @$(am__ensure_distdir_tar) | |
| am__archive=$(distdir).tar.zst; \ | |
| am__zstd_opts=$${ZSTD_OPT--19}; \ | |
| test "$${ZSTD_CLEVEL+set}" != set || am__zstd_opts=; \ | |
| zstd -c $$am__zstd_opts <am__distdir.tar >$$am__archive \ | |
| || { $(am__dist_compress_failed); } | |
| ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z | |
| .PHONY: dist-tarZ am--dist-tarZ | |
| dist-tarZ: am--dist-tarZ | |
| $(am__post_remove_distdir) | |
| am--dist-tarZ: am__distdir.tar | |
| @$(am__ensure_distdir_tar) | |
| @echo WARNING: "Support for distribution archives compressed with" \ | |
| "legacy program 'compress' is deprecated." >&2 | |
| @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | |
| am__archive=$(distdir).tar.Z; \ | |
| compress -c <am__distdir.tar >$$am__archive \ | |
| || { $(am__dist_compress_failed); } | |
| ?SHAR?DIST_ARCHIVES += $(distdir).shar.gz | |
| .PHONY: dist-shar am--dist-shar | |
| dist-shar: am--dist-shar | |
| $(am__post_remove_distdir) | |
| am--dist-shar: distdir | |
| @echo WARNING: "Support for shar distribution archives is" \ | |
| "deprecated." >&2 | |
| @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | |
| ## shar is expected to be chatty on its standard error, so only its exit | |
| ## status is checked here. | |
| shar $(distdir) >$(distdir).shar || { rm -f $(distdir).shar; exit 1; } | |
| eval GZIP= gzip $(GZIP_ENV) -f $(distdir).shar | |
| ?ZIP?DIST_ARCHIVES += $(distdir).zip | |
| .PHONY: dist-zip am--dist-zip | |
| dist-zip: am--dist-zip | |
| $(am__post_remove_distdir) | |
| am--dist-zip: distdir | |
| -rm -f $(distdir).zip | |
| zip -rq $(distdir).zip $(distdir) | |
| ?LZIP?DIST_TARGETS += dist-lzip | |
| ?XZ?DIST_TARGETS += dist-xz | |
| ?SHAR?DIST_TARGETS += dist-shar | |
| ?BZIP2?DIST_TARGETS += dist-bzip2 | |
| ?BZIP3?DIST_TARGETS += dist-bzip3 | |
| ?GZIP?DIST_TARGETS += dist-gzip | |
| ?ZIP?DIST_TARGETS += dist-zip | |
| ?ZSTD?DIST_TARGETS += dist-zstd | |
| ?COMPRESS?DIST_TARGETS += dist-tarZ | |
| endif %?TOPDIR_P% | |
| ## ------------------------------------------------- ## | |
| ## Building all the requested distribution flavors. ## | |
| ## ------------------------------------------------- ## | |
| ## Currently we cannot use if/endif inside a rule. The file_contents | |
| ## parser needs work. | |
| if %?TOPDIR_P% | |
| .PHONY: dist dist-all | |
| if %?SUBDIRS% | |
| AM_RECURSIVE_TARGETS += dist dist-all | |
| endif %?SUBDIRS% | |
| dist dist-all: | |
| ## $(am__optional_dist_targets) comes from AM_OPTIONAL_AUTOMAKE, if used. | |
| am__dist_keep_dir="$(abs_builddir)" $(MAKE) $(AM_MAKEFLAGS) \ | |
| $(DIST_TARGETS) $(am__optional_dist_targets) | |
| @rm -f am__distdir.tar | |
| $(am__post_remove_distdir) | |
| endif %?TOPDIR_P% | |
| ## ------------------------- ## | |
| ## Checking a distribution. ## | |
| ## ------------------------- ## | |
| if %?TOPDIR_P% | |
| if %?SUBDIRS% | |
| AM_RECURSIVE_TARGETS += distcheck | |
| endif %?SUBDIRS% | |
| # Documentation target run by distcheck, e.g., dvi, pdf or html. None by | |
| # default; exists only to be overridden by the user if desired. | |
| AM_DISTCHECK_DVI_TARGET = | |
| # This target untars the dist file and tries a VPATH configuration. Then | |
| # it guarantees that the distribution is self-contained by making another | |
| # tarfile. | |
| .PHONY: distcheck | |
| distcheck: dist | |
| case "$(DIST_ARCHIVES)" in \ | |
| *.tar.gz*) \ | |
| eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ | |
| *.tar.bz2*) \ | |
| bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ | |
| *.tar.bz3*) \ | |
| bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\ | |
| *.tar.lz*) \ | |
| lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ | |
| *.tar.xz*) \ | |
| xz -dc $(distdir).tar.xz | $(am__untar) ;;\ | |
| *.tar.Z*) \ | |
| uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ | |
| *.shar.gz*) \ | |
| eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ | |
| *.zip*) \ | |
| unzip $(distdir).zip ;;\ | |
| *.tar.zst*) \ | |
| zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ | |
| esac | |
| ## Make the new source tree read-only. Distributions ought to work in | |
| ## this case. However, make the top-level directory writable so we | |
| ## can make our new subdirs. | |
| chmod -R a-w $(distdir) | |
| chmod u+w $(distdir) | |
| mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst | |
| ## Undo the write access. | |
| chmod a-w $(distdir) | |
| ## With GNU make, the following command will be executed even with "make -n", | |
| ## due to the presence of '$(MAKE)'. That is normally all well (and '$(MAKE)' | |
| ## is necessary for things like parallel distcheck), but here we don't want | |
| ## execution. To avoid MAKEFLAGS parsing hassles, use a witness file that a | |
| ## non-'-n' run would have just created. | |
| am__distdir="$(distdir)"; \ | |
| am__distarchives="$(DIST_ARCHIVES)"; \ | |
| test -d "$$am__distdir/_build" || exit 0; \ | |
| ## Compute the absolute path of '_inst'. Strip any leading DOS drive | |
| ## to allow DESTDIR installations. Otherwise "$(DESTDIR)$(prefix)" would | |
| ## expand to "c:/temp/am-dc-5668/c:/src/package/package-1.0/_inst". | |
| dc_install_base=`$(am__cd) "$$am__distdir/_inst" && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ | |
| ## We will attempt a DESTDIR install in $dc_destdir. We don't | |
| ## create this directory under $dc_install_base, because it would | |
| ## create very long directory names. | |
| && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ | |
| ?DISTCHECK-HOOK? && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ | |
| ## Parallel BSD make may not start a new shell for each command in a recipe, | |
| ## so be sure to 'cd' back to the original directory after this. | |
| && am__cwd=`pwd` \ | |
| ## If we merely used '$(distdir)/_build' here, "make distcheck" could | |
| ## sometimes fail to detect missing files in the distribution tarball, | |
| ## especially in those cases where both the generated files and their | |
| ## dependencies are explicitly in $(srcdir). See automake bug#18286. | |
| && $(am__cd) "$$am__distdir/_build/sub" \ | |
| && ../../configure \ | |
| ?GETTEXT? --with-included-gettext \ | |
| ## Additional flags for configure. | |
| $(AM_DISTCHECK_CONFIGURE_FLAGS) \ | |
| $(DISTCHECK_CONFIGURE_FLAGS) \ | |
| ## At the moment, the code doesn't actually support changes in these --srcdir | |
| ## and --prefix values, so don't allow them to be overridden by the user or | |
| ## the developer. That used to be allowed, and caused issues in practice | |
| ## (in corner-case usages); see automake bug#14991. | |
| --srcdir=../.. --prefix="$$dc_install_base" \ | |
| && $(MAKE) $(AM_MAKEFLAGS) \ | |
| && { test -z "$(AM_DISTCHECK_DVI_TARGET)" \ | |
| || $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET); } \ | |
| && $(MAKE) $(AM_MAKEFLAGS) check \ | |
| && $(MAKE) $(AM_MAKEFLAGS) install \ | |
| && $(MAKE) $(AM_MAKEFLAGS) installcheck \ | |
| && $(MAKE) $(AM_MAKEFLAGS) uninstall \ | |
| && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ | |
| distuninstallcheck \ | |
| ## Make sure the package has proper DESTDIR support (we could not test this | |
| ## in the previous install/installcheck/uninstall test, because it's reasonable | |
| ## for installcheck to fail in a DESTDIR install). | |
| ## We make the '$dc_install_base' read-only because this is where files | |
| ## with missing DESTDIR support are likely to be installed. | |
| && chmod -R a-w "$$dc_install_base" \ | |
| ## The logic here is quite convoluted because we must clean $dc_destdir | |
| ## whatever happens (it won't be erased by the next run of distcheck like | |
| ## $(distdir) is). | |
| && ({ \ | |
| ## Build the directory, so we can cd into it even if "make install" | |
| ## didn't create it. Use mkdir, not $(MKDIR_P) because we want to | |
| ## fail if the directory already exists (PR/413). | |
| (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ | |
| && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ | |
| && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ | |
| && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ | |
| distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ | |
| } || { rm -rf "$$dc_destdir"; exit 1; }) \ | |
| && rm -rf "$$dc_destdir" \ | |
| && $(MAKE) $(AM_MAKEFLAGS) dist \ | |
| ## Make sure to remove the dists we created in the test build directory. | |
| && rm -rf $$am__distarchives \ | |
| && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ | |
| ## Cater to parallel BSD make (see above). | |
| && cd "$$am__cwd" \ | |
| || exit 1 | |
| $(am__post_remove_distdir) | |
| @(echo "$(distdir) archives ready for distribution: "; \ | |
| list="$(DIST_ARCHIVES)"; for i in $$list; do echo $$i; done) | \ | |
| sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' | |
| ## Define distuninstallcheck_listfiles and distuninstallcheck separately | |
| ## from distcheck, so that they can be overridden by the user. | |
| .PHONY: distuninstallcheck | |
| distuninstallcheck_listfiles = find . \( -type f -o -type l \) -print | |
| ## The 'dir' file (created by install-info) might still exist after | |
| ## uninstall, so we must be prepared to account for it. The following | |
| ## check is not 100% strict, but is definitely good enough, and even | |
| ## accounts for overridden $(infodir). | |
| am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | |
| | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | |
| distuninstallcheck: | |
| @test -n '$(distuninstallcheck_dir)' || { \ | |
| echo 'ERROR: trying to run $@ with an empty' \ | |
| '$$(distuninstallcheck_dir)' >&2; \ | |
| exit 1; \ | |
| }; \ | |
| $(am__cd) '$(distuninstallcheck_dir)' || { \ | |
| echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ | |
| exit 1; \ | |
| }; \ | |
| test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ | |
| || { echo "ERROR: files left after uninstall:" ; \ | |
| if test -n "$(DESTDIR)"; then \ | |
| echo " (check DESTDIR support)"; \ | |
| fi ; \ | |
| $(am__distuninstallcheck_listfiles) ; \ | |
| exit 1; } >&2 | |
| ## Define distcleancheck_listfiles and distcleancheck separately | |
| ## from distcheck, so that they can be overridden by the user. | |
| .PHONY: distcleancheck | |
| distcleancheck_listfiles = \ | |
| find . \( -type f -a \! \ | |
| \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print | |
| distcleancheck: distclean | |
| @if test '$(srcdir)' = . ; then \ | |
| echo "ERROR: distcleancheck can only run from a VPATH build" ; \ | |
| exit 1 ; \ | |
| fi | |
| @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ | |
| || { echo "ERROR: files left in build directory after distclean:" ; \ | |
| $(distcleancheck_listfiles) ; \ | |
| exit 1; } >&2 | |
| endif %?TOPDIR_P% |