jobserver.m4 876 B

123456789101112131415161718192021222324
  1. dnl GNU_MAKE_JOBSERVER
  2. dnl
  3. dnl Implement a workaround for GNU mak jobserver by adding the '+' to the
  4. dnl recipe line in Makefiles generated by automake.
  5. dnl
  6. AC_DEFUN([GNU_MAKE_JOBSERVER],[dnl
  7. m4_pattern_allow(AM_V_CCLD)
  8. touch config.status.tmp
  9. dnl Must keep the same timestamps on config.status and Makefile.
  10. if touch --reference=config.status config.status.tmp > /dev/null 2>&1; then
  11. sed '/as_fn_exit 0/i \
  12. sed -e \"s/^\t\\\(\\\$(AM_V_CCLD)\\\)/\t+ \\\1/\" Makefile > Makefile.tmp \
  13. touch --reference=Makefile Makefile.tmp \
  14. mv Makefile.tmp Makefile \
  15. ' config.status > config.status.tmp
  16. touch --reference=config.status config.status.tmp
  17. mv config.status.tmp config.status
  18. chmod +x config.status
  19. sed -e "s/^\t\(\$(AM_V_CCLD)\)/\t+ \1/" Makefile > Makefile.tmp
  20. touch --reference=Makefile Makefile.tmp
  21. mv Makefile.tmp Makefile
  22. else
  23. rm -f config.status.tmp
  24. fi])