our internal strlcat() is now named Curl_strlcat()
[platform/upstream/curl.git] / Makefile.am
1 #
2 # $Id$
3 #
4
5 AUTOMAKE_OPTIONS = foreign no-dependencies
6
7 EXTRA_DIST = \
8         CHANGES LEGAL maketgz MITX.txt MPL-1.1.txt \
9         config-win32.h reconf packages/README Makefile.dist
10
11 bin_SCRIPTS = curl-config
12
13 SUBDIRS = docs lib src include tests packages perl php
14
15 # create a root makefile in the distribution:
16 dist-hook:
17         cp $(srcdir)/Makefile.dist $(distdir)/Makefile
18
19 check: test
20
21 test:
22         @(cd tests; $(MAKE) quiet-test)
23
24 #
25 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
26 # must contain the following line:
27 # %_topdir /home/loic/local/rpm
28 # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
29 #
30 # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
31 #
32 # If additional configure flags are needed to build the package, add the
33 # following in ~/.rpmmacros
34 # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
35 # and run make rpm in the following way:
36 # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
37 #
38
39 rpms:
40         $(MAKE) RPMDIST=curl rpm
41         $(MAKE) RPMDIST=curl-ssl rpm
42
43 rpm:
44         RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
45         cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
46         cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
47         rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
48         mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
49         mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .