Only build in lib and src by default, make the others dist-subdirs.
[platform/upstream/curl.git] / Makefile.am
1 #
2 # $Id$
3 #
4
5 AUTOMAKE_OPTIONS = foreign
6
7 EXTRA_DIST = CHANGES COPYING maketgz SSLCERTS reconf Makefile.dist      \
8   curl-config.in build_vms.com curl-style.el sample.emacs testcurl.sh
9
10 bin_SCRIPTS = curl-config
11
12 SUBDIRS = lib src
13 DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
14
15 # create a root makefile in the distribution:
16 dist-hook:
17         rm -rf $(top_builddir)/tests/log
18         cp $(srcdir)/Makefile.dist $(distdir)/Makefile
19
20 html:
21         cd docs; make html
22
23 pdf:
24         cd docs; make pdf
25
26 check: test
27
28 test:
29         @(cd tests; $(MAKE) all quiet-test)
30
31 test-full:
32         @(cd tests; $(MAKE) all full-test)
33
34 #
35 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
36 # must contain the following line:
37 # %_topdir /home/loic/local/rpm
38 # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
39 #
40 # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
41 #
42 # If additional configure flags are needed to build the package, add the
43 # following in ~/.rpmmacros
44 # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
45 # and run make rpm in the following way:
46 # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
47 #
48
49 rpms:
50         $(MAKE) RPMDIST=curl rpm
51         $(MAKE) RPMDIST=curl-ssl rpm
52
53 rpm:
54         RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
55         cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
56         cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
57         rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
58         mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
59         mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
60
61 #
62 # Build a Solaris pkkgadd format file
63 # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
64 # file (which ends up back in this directory).
65 # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
66 # pkgadd -d ./HAXXcurl-*
67 #
68
69 # gak - libtool requires an absoulte directory, hence the pwd below...
70 pkgadd:
71         umask 022 ; \
72         make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
73         cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
74         cd $(srcdir)/packages/Solaris && $(MAKE) package
75
76 #
77 # Build a cygwin binary tarball installation file
78 # resulting .tar.bz2 file will end up at packages/Win32/cygwin
79 cygwinbin:
80         $(MAKE) -C packages/Win32/cygwin cygwinbin