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