Makefile.am 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. EXTRA_DIST = README
  2. #
  3. # Build a Cygwin binary tar ball
  4. #
  5. # Read the README file for details on using this Makefile
  6. #
  7. # NOTE: As I'm not particularly familiar with Makefiles, this was the
  8. # best I could come up with. It should probably be enhanced someday
  9. # to actually use the correct target and pre-requisite names, etc...
  10. # If anyone else wants to volunteer, feel free ;-)
  11. #
  12. # Cygwin build number (default to "1")
  13. CYGBUILD = 1
  14. # Cygwin tarball build dir (fully-qualified name, gets deleted when done)
  15. cygwintmp = $(CURDIR)/tmp_binbuild
  16. cygwinbin:
  17. rm -rf $(cygwintmp)
  18. rm -rf $(cygwintmp)-dev
  19. $(MAKE) -C $(top_builddir) DESTDIR=$(cygwintmp) install-strip
  20. # $(STRIP) $(cygwintmp)/usr/bin/cygcurl-?.dll
  21. $(mkinstalldirs) \
  22. $(cygwintmp)$(datadir)/doc/Cygwin \
  23. $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION) \
  24. $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/libcurl \
  25. $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples \
  26. $(cygwintmp)-dev$(mandir)
  27. #
  28. # copy some files into the binary install dir
  29. cp $(srcdir)/README \
  30. $(cygwintmp)$(datadir)/doc/Cygwin/$(PACKAGE)-$(VERSION)-$(CYGBUILD).README
  31. cd $(top_srcdir) ; cp CHANGES COPYING README RELEASE-NOTES docs/* \
  32. $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION) ; pwd
  33. cd $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION) ; rm *.1 Makefile*
  34. #
  35. # copy some files into the -dev install dir, remove some from binary
  36. cp $(top_srcdir)/docs/libcurl/*.html \
  37. $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/libcurl
  38. cp $(top_srcdir)/docs/examples/* \
  39. $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples
  40. rm $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples/Makefile*
  41. cp $(top_srcdir)/docs/examples/Makefile.example \
  42. $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples
  43. mv $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION)/BINDINGS \
  44. $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)
  45. mv $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION)/INTERNALS \
  46. $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)
  47. mv $(cygwintmp)/usr/include $(cygwintmp)-dev/usr
  48. mv $(cygwintmp)/usr/lib $(cygwintmp)-dev/usr
  49. mv $(cygwintmp)$(mandir)/man3 $(cygwintmp)-dev$(mandir)
  50. #
  51. # create both tar files, and delete tmp folders
  52. cd $(cygwintmp) ; tar cjf \
  53. $(PACKAGE)-$(VERSION)-$(CYGBUILD).tar.bz2 usr
  54. mv $(cygwintmp)/*.tar.bz2 . && rm -rf $(cygwintmp)
  55. #
  56. cd $(cygwintmp)-dev ; tar cjf \
  57. $(PACKAGE)-devel-$(VERSION)-$(CYGBUILD).tar.bz2 usr
  58. mv $(cygwintmp)-dev/*.tar.bz2 . && rm -rf $(cygwintmp)-dev