general autoconf and automake fixes
[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         curl-config.in
11
12 bin_SCRIPTS = curl-config
13
14 SUBDIRS = docs lib src include tests packages perl php
15
16 # create a root makefile in the distribution:
17 dist-hook:
18         cp $(srcdir)/Makefile.dist $(distdir)/Makefile
19
20 check: test
21
22 test:
23         @(cd tests; $(MAKE) quiet-test)
24
25 #
26 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
27 # must contain the following line:
28 # %_topdir /home/loic/local/rpm
29 # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
30 #
31 # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
32 #
33 # If additional configure flags are needed to build the package, add the
34 # following in ~/.rpmmacros
35 # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
36 # and run make rpm in the following way:
37 # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
38 #
39
40 rpms:
41         $(MAKE) RPMDIST=curl rpm
42         $(MAKE) RPMDIST=curl-ssl rpm
43
44 rpm:
45         RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
46         cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
47         cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
48         rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
49         mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
50         mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .