don't include config.g in src/hugehelp.c unless HAVE_CONFIG_H is defined
[platform/upstream/curl.git] / src / 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 AUTOMAKE_OPTIONS = foreign nostdinc
24
25 # we use srcdir/include for the static global include files
26 # we use builddir/src for the generated src/config.h file to get found
27 # we use srcdir/lib for the client-private header files
28 INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/src -I$(top_srcdir)/src
29
30 bin_PROGRAMS = curl
31
32 curl_SOURCES = main.c hugehelp.c hugehelp.h urlglob.c writeout.c setup.h \
33         config-win32.h config-mac.h config-vms.h config-riscos.h \
34         urlglob.h version.h writeout.h writeenv.c writeenv.h \
35         getpass.c getpass.h homedir.c homedir.h $(top_srcdir)/lib/strtoofft.c
36
37 curl_LDADD = ../lib/libcurl.la
38 curl_DEPENDENCIES = ../lib/libcurl.la
39 BUILT_SOURCES = hugehelp.c
40 CLEANFILES = hugehelp.c
41 NROFF=@NROFF@
42
43 EXTRA_DIST = mkhelp.pl curlmsg.msg makefile.dj \
44         Makefile.vc6 Makefile.b32 Makefile.m32 Makefile.riscos config.h.in \
45         macos/curl.mcp.xml.sit.hqx \
46         macos/MACINSTALL.TXT \
47         macos/src/curl_GUSIConfig.cpp \
48         macos/src/macos_main.cpp curlmsg.h curlmsg.sdl curlmsg_vms.h \
49         config-amigaos.h makefile.amiga
50
51 MANPAGE=$(top_srcdir)/docs/curl.1
52 README=$(top_srcdir)/docs/MANUAL
53 MKHELP=$(top_srcdir)/src/mkhelp.pl
54 HUGE=hugehelp.c
55
56 if HAVE_LIBZ
57 # This generates the hugehelp.c file in both uncompressed and compressed formats
58 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
59         echo '#ifdef HAVE_CONFIG_H' > $(HUGE)
60         echo '#include "config.h"' >> $(HUGE)
61         echo '#endif' >> $(HUGE)
62         echo '#ifndef HAVE_LIBZ' >> $(HUGE)
63         $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
64         echo '#else' >> $(HUGE)
65         $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
66         echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
67 else
68 # This generates the hugehelp.c file uncompressed only
69 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
70         $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(README) > $(HUGE)
71 endif