libs.am 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ## automake - create Makefile.in from Makefile.am
  2. ## Copyright (C) 1994-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 %?INSTALL%
  14. include inst-vars.am
  15. endif %?INSTALL%
  16. ## ------------ ##
  17. ## Installing. ##
  18. ## ------------ ##
  19. if %?INSTALL%
  20. am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
  21. ?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
  22. ?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
  23. install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
  24. @$(NORMAL_INSTALL)
  25. if %?BASE%
  26. ## Funny invocation because Makefile variable can be empty, leading to
  27. ## a syntax error in sh.
  28. @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
  29. list2=; for p in $$list; do \
  30. if test -f $$p; then \
  31. list2="$$list2 $$p"; \
  32. else :; fi; \
  33. done; \
  34. test -z "$$list2" || { \
  35. echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
  36. $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
  37. echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \
  38. $(INSTALL_DATA) $$list2 "$(DESTDIR)$(%NDIR%dir)" || exit $$?; }
  39. else !%?BASE%
  40. ## Funny invocation because Makefile variable can be empty, leading to
  41. ## a syntax error in sh.
  42. @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
  43. if test -n "$$list"; then \
  44. echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
  45. $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
  46. fi; \
  47. $(am__nobase_list) | while read dir files; do \
  48. xfiles=; for p in $$files; do \
  49. if test -f "$$p"; then xfiles="$$xfiles $$p"; else :; fi; done; \
  50. test -z "$$xfiles" || { \
  51. test "x$$dir" = x. || { \
  52. echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
  53. $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
  54. echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
  55. $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \
  56. done
  57. endif !%?BASE%
  58. ## We do two loops here so that $(POST_INSTALL) can be empty. If we
  59. ## merge the two loops, we get a syntax error from sh. Anyway, having
  60. ## $(POST_INSTALL) in the middle of the loop essentially renders it
  61. ## useless; sh never actually executes this command. Read the GNU
  62. ## Standards for a little enlightenment on this.
  63. @$(POST_INSTALL)
  64. @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
  65. for p in $$list; do \
  66. if test -f $$p; then \
  67. ?BASE? $(am__strip_dir) \
  68. ?!BASE? f=$$p; \
  69. ## Must ranlib after installing because mod time changes.
  70. ## cd to target directory because AIX ranlib messes up with whitespace
  71. ## in the argument.
  72. echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && $(RANLIB) $$f )"; \
  73. ( cd "$(DESTDIR)$(%NDIR%dir)" && $(RANLIB) $$f ) || exit $$?; \
  74. else :; fi; \
  75. done
  76. endif %?INSTALL%
  77. ## -------------- ##
  78. ## Uninstalling. ##
  79. ## -------------- ##
  80. if %?INSTALL%
  81. .PHONY uninstall-am: uninstall-%DIR%LIBRARIES
  82. uninstall-%DIR%LIBRARIES:
  83. @$(NORMAL_UNINSTALL)
  84. @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
  85. ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
  86. ?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
  87. dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
  88. endif %?INSTALL%
  89. ## ---------- ##
  90. ## Cleaning. ##
  91. ## ---------- ##
  92. .PHONY clean-am: clean-%DIR%LIBRARIES
  93. clean-%DIR%LIBRARIES:
  94. -test -z "$(%DIR%_LIBRARIES)" || rm -f $(%DIR%_LIBRARIES)