2
0

inst-vars.am 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ## automake - create Makefile.in from Makefile.am
  2. ## Copyright (C) 2004-2017 Free Software Foundation, Inc.
  3. ## This program is free software; you can redistribute it and/or modify
  4. ## it under the terms of the GNU General Public License as published by
  5. ## the Free Software Foundation; either version 2, or (at your option)
  6. ## any later version.
  7. ## This program is distributed in the hope that it will be useful,
  8. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ## GNU General Public License for more details.
  11. ## You should have received a copy of the GNU General Public License
  12. ## along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. if %?FIRST%
  14. ## These variables help stripping any $(VPATH) that some
  15. ## Make implementations prepend before VPATH-found files.
  16. ## The issue is discussed at length in distdir.am.
  17. am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  18. am__vpath_adj = case $$p in \
  19. $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
  20. *) f=$$p;; \
  21. esac;
  22. ## Strip all directories.
  23. am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
  24. ## Number of files to install concurrently.
  25. am__install_max = 40
  26. ## Take a $list of nobase files, strip $(srcdir) from them.
  27. ## Split apart in setup variable and an action that can be used
  28. ## in backticks or in a pipe.
  29. am__nobase_strip_setup = \
  30. srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
  31. am__nobase_strip = \
  32. for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
  33. ## Take a $list of nobase files, collect them, indexed by their
  34. ## srcdir-stripped dirnames. For up to am__install_max files, output
  35. ## a line containing the dirname and the files, space-separated.
  36. ## The arbitrary limit helps avoid the quadratic scaling exhibited by
  37. ## string concatenation in most shells, and should avoid line length
  38. ## limitations, while still offering only negligible performance impact
  39. ## through spawning more install commands than absolutely needed.
  40. am__nobase_list = $(am__nobase_strip_setup); \
  41. for p in $$list; do echo "$$p $$p"; done | \
  42. sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
  43. $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
  44. if (++n[$$2] == $(am__install_max)) \
  45. { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
  46. END { for (dir in files) print dir, files[dir] }'
  47. ## Collect up to 40 files per line from stdin.
  48. am__base_list = \
  49. sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
  50. sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
  51. ## A shell code fragment to uninstall files from a given directory.
  52. ## It expects the $dir and $files shell variables to be defined respectively
  53. ## to the directory where the files to be removed are, and to the list of
  54. ## such files.
  55. am__uninstall_files_from_dir = { \
  56. ## Some rm implementations complain if 'rm -f' is used without arguments.
  57. test -z "$$files" \
  58. ## At least Solaris /bin/sh still lacks 'test -e', so we use the multiple
  59. ## tests below instead. We expect $dir to be either non-existent or a
  60. ## directory, so the failure we'll experience if it is a regular file
  61. ## is indeed desired and welcome (better to fail loudly thasn silently).
  62. || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
  63. || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
  64. $(am__cd) "$$dir" && rm -f $$files; }; \
  65. }
  66. endif %?FIRST%