Makefile.am 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # This Makefile.am is in the public domain
  2. ACLOCAL_AMFLAGS = -I m4
  3. SUBDIRS = contrib m4 src .
  4. DIST_SUBDIRS = $(SUBDIRS) po
  5. EXTRA_PO_DIST = po/ABOUT-NLS $(top_srcdir)/po/configure.ac po/configure
  6. W32COMMON = w32/common/gen_dll_res.ps1 w32/common/microhttpd_dll_res_vc.rc.in w32/common/microhttpd_dll_res_vc.rc \
  7. w32/common/MHD_config.h w32/common/vs_dirs.props w32/common/common-build-settings.vcxproj \
  8. w32/common/libmicrohttpd-build-settings.vcxproj w32/common/libmicrohttpd-files.vcxproj w32/common/libmicrohttpd-filters.vcxproj \
  9. w32/common/hellobrowser-files.vcxproj w32/common/hellobrowser-filters.vcxproj \
  10. w32/common/apps-build-settings.vcxproj
  11. W32VS2013 = w32/VS2013/libmicrohttpd.vcxproj w32/VS2013/libmicrohttpd.vcxproj.filters \
  12. w32/VS2013/hellobrowser.vcxproj w32/VS2013/hellobrowser.vcxproj.filters \
  13. w32/VS2013/simplepost.vcxproj w32/VS2013/largepost.vcxproj \
  14. w32/VS2013/libmicrohttpd.sln
  15. W32VS2015 = w32/VS2015/libmicrohttpd.vcxproj w32/VS2015/libmicrohttpd.vcxproj.filters \
  16. w32/VS2015/hellobrowser.vcxproj w32/VS2015/hellobrowser.vcxproj.filters \
  17. w32/VS2015/simplepost.vcxproj w32/VS2015/largepost.vcxproj \
  18. w32/VS2015/libmicrohttpd.sln
  19. W32VS2017 = w32/VS2017/libmicrohttpd.vcxproj w32/VS2017/libmicrohttpd.vcxproj.filters \
  20. w32/VS2017/hellobrowser.vcxproj w32/VS2017/hellobrowser.vcxproj.filters \
  21. w32/VS2017/simplepost.vcxproj w32/VS2017/largepost.vcxproj \
  22. w32/VS2017/libmicrohttpd.sln
  23. EXTRA_DIST = \
  24. acinclude.m4 \
  25. libmicrohttpd.pc.in \
  26. $(EXTRA_PO_DIST) \
  27. $(W32COMMON) $(W32VS2013) $(W32VS2015) $(W32VS2017)
  28. pkgconfigdir = $(libdir)/pkgconfig
  29. pkgconfig_DATA = libmicrohttpd.pc
  30. if BUILD_DOC
  31. SUBDIRS += doc
  32. endif
  33. .PHONY: po-files update-po-files po-files-pre-distdir renew-po-configure.ac update-POTFILES.in
  34. # Do not override automake rule, only add prerequisite
  35. distdir@EMPTY_VAR@: po-files-pre-distdir
  36. # Do not override automake rule, only add prerequisite
  37. distclean-recursive@EMPTY_VAR@: po/Makefile
  38. srcdir_po = $(top_srcdir)/po
  39. # Test target: build main po file
  40. po-files: $(srcdir_po)/libmicrohttpd.pot
  41. # Test target: force update all po files
  42. update-po-files: po-files-pre-distdir Makefile
  43. @$(am__cd) po && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.pot-update
  44. # Update po-related files before make distdir
  45. po-files-pre-distdir: update-POTFILES.in renew-po-configure.ac
  46. @$(MAKE) $(AM_MAKEFLAGS) po/Makefile
  47. # Clean in po directory only if po/Makefile was generated to avoid
  48. # useless generation of po/Makefile only for 'clean' target
  49. clean-local:
  50. @ if test -f po/Makefile; then \
  51. $(MAKE) $(AM_MAKEFLAGS) po/Makefile && \
  52. $(am__cd) po && $(MAKE) $(AM_MAKEFLAGS) clean || exit 1; \
  53. fi;
  54. po/Makefile: $(srcdir_po)/Makefile.in.in $(srcdir_po)/Makevars $(srcdir_po)/POTFILES.in po/config.status
  55. @$(am__cd) po && @SHELL@ ./config.status ./Makefile.in po-directories
  56. po/configargs.stamp:
  57. @$(MAKE) $(AM_MAKEFLAGS) $(top_builddir)/config.status && \
  58. @SHELL@ ./config.status po/configargs.stamp
  59. # Regenerate po/config.status if 'po/configure' was updated or 'configure' parameters was changed
  60. po/config.status: $(srcdir_po)/configure po/configargs.stamp
  61. @$(MKDIR_P) po && $(am__cd) po && echo "cd po && @SHELL@ ./configure @ac_configure_args@" && \
  62. @SHELL@ $(abs_top_srcdir)/po/configure @ac_configure_args@ --srcdir=$(abs_top_srcdir)/po \
  63. --disable-option-checking --no-create --no-recursion
  64. # Next rules actually create files in source tree, not in build tree, but those files should
  65. # stay in source tree and should be distributed in tarball, i.e. should not be created during
  66. # normal builds.
  67. $(srcdir_po)/libmicrohttpd.pot: po/Makefile
  68. @$(am__cd) po && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.pot
  69. # This target doesn't depend on po/configure.acT so po/configure.ac (and po/configure) will not be
  70. # forced to regenerate after each run of main configure.
  71. # If po/configure.ac is missing - it will be generated.
  72. $(srcdir_po)/configure.ac:
  73. @$(MAKE) $(AM_MAKEFLAGS) renew-po-configure.ac
  74. # Update po/configure.ac only if po/configure.acT (generated by main configure) is different.
  75. # If po/configure.ac is unchanged then po/configure will not be regenerated
  76. renew-po-configure.ac:
  77. @$(MAKE) $(AM_MAKEFLAGS) po/configure.acT && \
  78. if ! test -f $(srcdir_po)/configure.ac || \
  79. ! cmp -s po/configure.acT $(srcdir_po)/configure.ac ; then \
  80. echo "cp po/configure.acT $(srcdir_po)/configure.ac" && \
  81. cp po/configure.acT $(srcdir_po)/configure.ac || exit 1; \
  82. fi
  83. $(srcdir_po)/configure: $(srcdir_po)/configure.ac
  84. @$(am__cd) $(srcdir_po) && echo "Creating po/configure..." && \
  85. echo "@ACLOCAL@" && @ACLOCAL@ && \
  86. echo "@AUTOCONF@" && @AUTOCONF@
  87. # Generate po/POTFILES.in if po/POTFILES.in is missing
  88. $(srcdir_po)/POTFILES.in:
  89. @$(MAKE) $(AM_MAKEFLAGS) update-POTFILES.in
  90. update-POTFILES.in:
  91. @$(am__cd) $(srcdir_po) && echo @ECHO_N@ "Creating po/POTFILES.in... @ECHO_C@" && chmod o+w . && \
  92. find '../src/include' ! -name 'include' -prune -name '*.h' ! -name 'mhd_options.h' > POTFILES.in && \
  93. find '../src/microhttpd' ! -name 'microhttpd' -prune \( -name '*.h' -o -name '*.c' \) ! -name 'test_*' >> POTFILES.in && \
  94. echo "@ECHO_T@done." || (rm -f POTFILES.in ; echo "@ECHO_T@failed." && false)