| ## automake - create Makefile.in from Makefile.am |
| ## Copyright (C) 2004-2025 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 2, 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/>. |
| |
| if %?FIRST% |
| |
| ## These variables help stripping any $(VPATH) that some |
| ## Make implementations prepend before VPATH-found files. |
| ## The issue is discussed at length in distdir.am. |
| am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; |
| am__vpath_adj = case $$p in \ |
| $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ |
| *) f=$$p;; \ |
| esac; |
| ## Strip all directories. |
| am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; |
| ## Number of files to install concurrently. |
| am__install_max = 40 |
| ## Take a $list of nobase files, strip $(srcdir) from them. |
| ## Split apart in setup variable and an action that can be used |
| ## in backticks or in a pipe. |
| am__nobase_strip_setup = \ |
| srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` |
| am__nobase_strip = \ |
| for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" |
| ## Take a $list of nobase files, collect them, indexed by their |
| ## srcdir-stripped dirnames. For up to am__install_max files, output |
| ## a line containing the dirname and the files, space-separated. |
| ## The arbitrary limit helps avoid the quadratic scaling exhibited by |
| ## string concatenation in most shells, and should avoid line length |
| ## limitations, while still offering only negligible performance impact |
| ## through spawning more install commands than absolutely needed. |
| am__nobase_list = $(am__nobase_strip_setup); \ |
| for p in $$list; do echo "$$p $$p"; done | \ |
| sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ |
| $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ |
| if (++n[$$2] == $(am__install_max)) \ |
| { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ |
| END { for (dir in files) print dir, files[dir] }' |
| ## Collect up to 40 files per line from stdin. |
| am__base_list = \ |
| sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ |
| sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' |
| |
| ## A shell code fragment to uninstall files from a given directory. |
| ## It expects the $dir and $files shell variables to be defined respectively |
| ## to the directory where the files to be removed are, and to the list of |
| ## such files. |
| am__uninstall_files_from_dir = { \ |
| ## At least Solaris /bin/sh still lacks 'test -e', so we use the multiple |
| ## tests below instead. We expect $dir to be either non-existent or a |
| ## directory, so the failure we'll experience if it is a regular file |
| ## is indeed desired and welcome (better to fail loudly thasn silently). |
| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ |
| || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ |
| $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ |
| } |
| |
| endif %?FIRST% |