456e3402c8f9279aa3f5d0f4520857eb9496a1f1
[platform/upstream/curl.git] / Makefile.am
1 #***************************************************************************
2 #                                  _   _ ____  _
3 #  Project                     ___| | | |  _ \| |
4 #                             / __| | | | |_) | |
5 #                            | (__| |_| |  _ <| |___
6 #                             \___|\___/|_| \_\_____|
7 #
8 # Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
9 #
10 # This software is licensed as described in the file COPYING, which
11 # you should have received as part of this distribution. The terms
12 # are also available at http://curl.haxx.se/docs/copyright.html.
13 #
14 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 # copies of the Software, and permit persons to whom the Software is
16 # furnished to do so, under the terms of the COPYING file.
17 #
18 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 # KIND, either express or implied.
20 #
21 # $Id$
22 ###########################################################################
23
24 AUTOMAKE_OPTIONS = foreign
25
26 EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist       \
27   curl-config.in build_vms.com curl-style.el sample.emacs testcurl.sh \
28   RELEASE-NOTES
29
30 bin_SCRIPTS = curl-config
31
32 SUBDIRS = lib src
33 DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
34
35 dist-hook:
36         rm -rf $(top_builddir)/tests/log
37         find $(distdir) -name "*.dist" -exec rm {} \;
38         (distit=`find $(srcdir) -name "*.dist"`; \
39         for file in $$distit; do \
40           strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
41           cp $$file $(distdir)$$strip; \
42         done)
43
44 html:
45         cd docs; make html
46
47 pdf:
48         cd docs; make pdf
49
50 check: test
51
52 test:
53         @(cd tests; $(MAKE) all quiet-test)
54
55 test-full:
56         @(cd tests; $(MAKE) all full-test)
57
58 #
59 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
60 # must contain the following line:
61 # %_topdir /home/loic/local/rpm
62 # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
63 #
64 # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
65 #
66 # If additional configure flags are needed to build the package, add the
67 # following in ~/.rpmmacros
68 # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
69 # and run make rpm in the following way:
70 # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
71 #
72
73 rpms:
74         $(MAKE) RPMDIST=curl rpm
75         $(MAKE) RPMDIST=curl-ssl rpm
76
77 rpm:
78         RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
79         cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
80         cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
81         rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
82         mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
83         mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
84
85 #
86 # Build a Solaris pkkgadd format file
87 # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
88 # file (which ends up back in this directory).
89 # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
90 # pkgadd -d ./HAXXcurl-*
91 #
92
93 # gak - libtool requires an absoulte directory, hence the pwd below...
94 pkgadd:
95         umask 022 ; \
96         make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
97         cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
98         cd $(srcdir)/packages/Solaris && $(MAKE) package
99
100 #
101 # Build a cygwin binary tarball installation file
102 # resulting .tar.bz2 file will end up at packages/Win32/cygwin
103 cygwinbin:
104         $(MAKE) -C packages/Win32/cygwin cygwinbin
105
106 # We extend the standard install with a custom hook:
107 install-data-hook:
108         cd include && $(MAKE) install
109         cd docs && $(MAKE) install
110
111 # We extend the standard uninstall with a custom hook:
112 uninstall-hook:
113         cd include && $(MAKE) uninstall
114         cd docs && $(MAKE) uninstall