aboutsummaryrefslogtreecommitdiff
path: root/packages/Win32/cygwin/Makefile.am
blob: 2a682ed75f0e4eb3569775f9d7deac7c2e93ed00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
EXTRA_DIST = README

#
# Build a Cygwin binary tar ball
#
# Read the README file for details on using this Makefile
#
# NOTE: As I'm not particularly familiar with Makefiles, this was the
#  best I could come up with. It should probably be enhanced someday 
#  to actually use the correct target and pre-requisite names, etc...
#  If anyone else wants to volunteer, feel free ;-)
#

# Cygwin build number (default to "1")
CYGBUILD = 1

# Cygwin tarball build dir (fully-qualified name, gets deleted when done)
cygwintmp = $(CURDIR)/tmp_binbuild

cygwinbin:
	rm -rf $(cygwintmp)
	rm -rf $(cygwintmp)-dev
	$(MAKE) -C $(top_builddir) DESTDIR=$(cygwintmp) install-strip
# $(STRIP) $(cygwintmp)/usr/bin/cygcurl-?.dll
	$(mkinstalldirs) \
	  $(cygwintmp)/usr/doc/Cygwin \
	  $(cygwintmp)/usr/doc/$(PACKAGE)-$(VERSION) \
	  $(cygwintmp)-dev/usr/doc/$(PACKAGE)-$(VERSION)/libcurl \
	  $(cygwintmp)-dev/usr/doc/$(PACKAGE)-$(VERSION)/examples \
	  $(cygwintmp)-dev/usr/man
#
# copy some files into the binary install dir
	cp $(srcdir)/README \
	  $(cygwintmp)/usr/doc/Cygwin/$(PACKAGE)-$(VERSION)-$(CYGBUILD).README
	cd $(top_srcdir) ; cp CHANGES COPYING README UPGRADE docs/* \
	  $(cygwintmp)/usr/doc/$(PACKAGE)-$(VERSION) ; pwd
	cd $(cygwintmp)/usr/doc/$(PACKAGE)-$(VERSION) ; rm *.1 Makefile*
#
# copy some files into the -dev install dir, remove some from binary
	cp $(top_srcdir)/docs/libcurl/*.html \
	  $(cygwintmp)-dev/usr/doc/$(PACKAGE)-$(VERSION)/libcurl
	cp $(top_srcdir)/docs/examples/* \
	  $(cygwintmp)-dev/usr/doc/$(PACKAGE)-$(VERSION)/examples
	rm $(cygwintmp)-dev/usr/doc/$(PACKAGE)-$(VERSION)/examples/Makefile*
	cp $(top_srcdir)/docs/examples/Makefile.example \
	  $(cygwintmp)-dev/usr/doc/$(PACKAGE)-$(VERSION)/examples
	mv $(cygwintmp)/usr/doc/$(PACKAGE)-$(VERSION)/BINDINGS \
	   $(cygwintmp)-dev/usr/doc/$(PACKAGE)-$(VERSION)
	mv $(cygwintmp)/usr/doc/$(PACKAGE)-$(VERSION)/INTERNALS \
	   $(cygwintmp)-dev/usr/doc/$(PACKAGE)-$(VERSION)
	mv $(cygwintmp)/usr/include $(cygwintmp)-dev/usr
	mv $(cygwintmp)/usr/lib $(cygwintmp)-dev/usr
	mv $(cygwintmp)/usr/man/man3 $(cygwintmp)-dev/usr/man
#
# create both tar files, and delete tmp folders
	cd $(cygwintmp) ; tar cjf \
	  $(PACKAGE)-$(VERSION)-$(CYGBUILD).tar.bz2 usr
	mv $(cygwintmp)/*.tar.bz2 . && rm -rf $(cygwintmp)
#
	cd $(cygwintmp)-dev ; tar cjf \
	  $(PACKAGE)-devel-$(VERSION)-$(CYGBUILD).tar.bz2 usr
	mv $(cygwintmp)-dev/*.tar.bz2 . && rm -rf $(cygwintmp)-dev