aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-01-13 08:48:41 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-01-13 08:48:41 +0000
commitbaf948db409e11130762e3943d54eb1ba6374db4 (patch)
tree602e867c0a87364bb0343ea6921b7a54be9644b3
parent9906eb8e19cdf68c3b936db1a34345bb7368881f (diff)
Dan Fandrich made the hugehelp.c contain both compressed and uncompressed
help if libz is available using #ifdef in the source instead, to allow the distributed source code to be easier built with compressed help text.
-rw-r--r--src/Makefile.am53
1 files changed, 33 insertions, 20 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 791e31d32..89c11b049 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,25 @@
+#############################################################################
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
#
-# $Id$
+# Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
#
-
+# In order to be useful for every potential user, curl and libcurl are
+# dual-licensed under the MPL and the MIT/X-derivate licenses.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the MPL or the MIT/X-derivate
+# licenses. You may pick one of these licenses.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# $Id$
+#############################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
# we use srcdir/include for the static global include files
@@ -11,17 +29,6 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/src -I$(top_srcdir)/src
bin_PROGRAMS = curl #memtest
-if HAVE_LIBZ
-# libz available, attempt to compress the help data
-MKHELPOPT=-c
-else
-# no libz, don't try to compress
-MKHELPOPT=
-endif
-
-#memtest_SOURCES = memtest.c
-#memtest_LDADD = $(top_srcdir)/lib/libcurl.la
-
curl_SOURCES = main.c hugehelp.c urlglob.c writeout.c setup.h \
config-win32.h config-mac.h config-vms.h config-riscos.h \
urlglob.h version.h writeout.h writeenv.c writeenv.h \
@@ -45,12 +52,18 @@ MANPAGE=$(top_srcdir)/docs/curl.1
README=$(top_srcdir)/docs/MANUAL
MKHELP=$(top_srcdir)/src/mkhelp.pl
-# This generates the hugehelp.c file
+if HAVE_LIBZ
+# This generates the hugehelp.c file in both uncompressed and compressed formats
hugehelp.c: $(README) $(MANPAGE) mkhelp.pl
- rm -f hugehelp.c
- $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(MKHELPOPT) $(README) > hugehelp.c
+ echo '#include "config.h"' > hugehelp.c
+ echo '#ifndef HAVE_LIBZ' >> hugehelp.c
+ $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> hugehelp.c
+ echo '#else' >> hugehelp.c
+ $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> hugehelp.c
+ echo '#endif /* HAVE_LIBZ */' >> hugehelp.c
+else
+# This generates the hugehelp.c file uncompressed only
+hugehelp.c: $(README) $(MANPAGE) mkhelp.pl
+ $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(README) > hugehelp.c
+endif
-# for distribution, generate an uncompressed help file!
-dist-hook:
- chmod 0644 $(distdir)/hugehelp.c
- $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(README) > $(distdir)/hugehelp.c