texi-vers.am 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. DIST_COMMON += %VTEXI% %STAMPVTI%
  14. ## Don't give this rule a command (even '@:').
  15. ## %STAMPVTI% is always newer than %VTEXI%, so this rule is always
  16. ## triggered. If you equip this rule with a command, GNU make will
  17. ## assume %VTEXI% has been rebuild in the current directory and
  18. ## discard any %VTEXI% file found in a VPATH search.
  19. %VTEXI%: %MAINTAINER-MODE% %STAMPVTI%
  20. ## Depend on configure so that version number updates cause a rebuild.
  21. ## (Not configure.ac, because not all setups define the version number
  22. ## in this file.)
  23. %STAMPVTI%: %TEXI% $(top_srcdir)/configure
  24. ## It is wrong to have %STAMPVTI% dependent on %DIRSTAMP%, because
  25. ## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file
  26. ## should never be dependent upon a non-distributed built file.
  27. ## Therefore we ensure that %DIRSTAMP% exists in the rule.
  28. ## Use cp + mv so that the update of %VTEXI% is atomic even if
  29. ## the source directory is on a different file system.
  30. ?DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
  31. @(dir=.; test -f ./%TEXI% || dir=$(srcdir); \
  32. set `$(SHELL) %MDDIR%mdate-sh $$dir/%TEXI%`; \
  33. echo "@set UPDATED $$1 $$2 $$3"; \
  34. echo "@set UPDATED-MONTH $$2 $$3"; \
  35. echo "@set EDITION $(VERSION)"; \
  36. echo "@set VERSION $(VERSION)") > %VTI%.tmp$$$$ && \
  37. (cmp -s %VTI%.tmp$$$$ %VTEXI% \
  38. || (echo "Updating %VTEXI%" && \
  39. cp %VTI%.tmp$$$$ %VTEXI%.tmp$$$$ && \
  40. mv %VTEXI%.tmp$$$$ %VTEXI%)) && \
  41. rm -f %VTI%.tmp$$$$ %VTEXI%.$$$$
  42. @cp %VTEXI% $@
  43. mostlyclean-am: mostlyclean-%VTI%
  44. mostlyclean-%VTI%:
  45. -rm -f %VTI%.tmp* %VTEXI%.tmp*
  46. maintainer-clean-am: maintainer-clean-%VTI%
  47. maintainer-clean-%VTI%:
  48. %MAINTAINER-MODE% -rm -f %STAMPVTI% %VTEXI%
  49. .PHONY: mostlyclean-%VTI% maintainer-clean-%VTI%