source: trunk/essentials/net-misc/wget/Makefile.in@ 3453

Last change on this file since 3453 was 3440, checked in by bird, 18 years ago

wget 1.10.2

File size: 5.2 KB
Line 
1# Makefile for `Wget' utility
2# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2 of the License, or
7# (at your option) any later version.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18# In addition, as a special exception, the Free Software Foundation
19# gives permission to link the code of its release of Wget with the
20# OpenSSL project's "OpenSSL" library (or with modified versions of it
21# that use the same license as the "OpenSSL" library), and distribute
22# the linked executables. You must obey the GNU General Public License
23# in all respects for all of the code used other than "OpenSSL". If you
24# modify this file, you may extend this exception to your version of the
25# file, but you are not obligated to do so. If you do not wish to do
26# so, delete this exception statement from your version.
27
28#
29# Version: @VERSION@
30#
31
32SHELL = /bin/sh
33@SET_MAKE@
34
35top_builddir = .
36
37srcdir = @srcdir@
38VPATH = @srcdir@
39
40#
41# User configuration section
42#
43
44#
45# Install variables
46#
47prefix = @prefix@
48exec_prefix = @exec_prefix@
49bindir = @bindir@
50infodir = @infodir@
51sysconfdir = @sysconfdir@
52mandir = @mandir@
53manext = 1
54localedir = $(prefix)/share/locale
55
56CC = @CC@
57CFLAGS = @CFLAGS@
58CPPFLAGS = @CPPFLAGS@
59DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
60LIBS = @LIBS@ @LIBSSL@
61LDFLAGS = @LDFLAGS@
62
63#
64# End of user configuration section. There should be no need to change
65# anything below this line.
66#
67
68DISTNAME = wget-@VERSION@
69RM = rm -f
70
71# These are used for maintenance only, so they are safe without
72# special autoconf cruft.
73FIND = find
74GZIP = gzip
75TAR = tar
76
77# flags passed to recursive makes in subdirectories
78MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
79CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
80prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
81infodir='$(infodir)' mandir='$(mandir)' manext='$(manext)'
82
83# subdirectories in the distribution
84SUBDIRS = src doc po util windows
85
86# default target
87all: src/config.h Makefile $(SUBDIRS)
88
89check: all
90
91$(SUBDIRS): FORCE
92 cd $@ && $(MAKE) $(MAKEDEFS)
93
94# install everything
95install: install.bin install.info install.wgetrc \
96 install.mo @COMMENT_IF_NO_POD2MAN@install.man
97
98# install/uninstall the binary
99install.bin uninstall.bin:
100 cd src && $(MAKE) $(MAKEDEFS) $@
101
102# install/uninstall the info/man pages
103install.info uninstall.info install.man uninstall.man install.wgetrc:
104 cd doc && $(MAKE) $(MAKEDEFS) $@
105
106# Install `.mo' files
107install.mo:
108 cd po && $(MAKE) $(MAKEDEFS) $@
109
110# Create configure.bat from configure.bat.in by DOS-ifying the lines.
111# This is invoked by `make dist' and deleted by `make realclean' (not
112# `make distclean' because we want to preserve it for distribution).
113configure.bat: $(srcdir)/configure.bat.in
114 awk '{ print $$0 ($$0 ~ /\r$$/ ? "" : "\r") }' $< > $@
115
116# create tag files for Emacs
117TAGS:
118 cd src && $(MAKE) $@
119
120dist: $(srcdir)/configure $(srcdir)/configure.bat DISTFILES
121 mkdir $(DISTNAME)
122 for d in `$(FIND) . -type d ! -name CVS -a ! -name RCS -print`; do \
123 if [ "$$d" != "." -a "$$d" != "./$(DISTNAME)" ]; then \
124 mkdir $(DISTNAME)/$$d; \
125 fi; \
126 done
127 for f in `cat DISTFILES`; do \
128 ln $(srcdir)/$$f $(DISTNAME)/$$f || \
129 { echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
130 done
131 (cd $(DISTNAME); $(MAKE) distclean)
132 $(TAR) chvf - $(DISTNAME) | $(GZIP) -c --best >$(DISTNAME).tar.gz
133 $(RM) -r $(DISTNAME)
134 $(RM) DISTFILES
135
136DISTFILES: FORCE
137 rm -rf $(DISTNAME)
138 (cd $(srcdir); find . ! -type d -print) \
139 | sed '/\/\(CVS\|RCS\)\//d; /$@/d; /\.tar.*/d; s/^.\///; /^\.$$/d;' \
140 | sort | uniq > $@
141
142#
143# Cleanup dependencies
144#
145
146clean: clean-recursive clean-top
147distclean: distclean-recursive distclean-top
148realclean: realclean-recursive realclean-top
149
150clean-top:
151 $(RM) *~ *.bak $(DISTNAME).tar.gz
152
153distclean-top: clean-top
154 $(RM) Makefile config.status config.log config.cache libtool stamp-h
155 $(RM) -r autom4te.cache
156
157realclean-top: distclean-top
158 $(RM) configure configure.bat
159
160clean-recursive distclean-recursive realclean-recursive:
161 for subdir in $(SUBDIRS); do \
162 target=`echo $@ | sed s/-recursive//`; \
163 (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
164 done
165
166#
167# Dependencies for maintenance
168#
169
170$(srcdir)/configure: configure.in
171 cd $(srcdir) && autoconf
172
173# autoheader might not change config.h.in, so touch a stamp file.
174$(srcdir)/src/config.h.in: stamp-h.in
175$(srcdir)/stamp-h.in: configure.in
176 @true; # running autoheader here breaks: cd $(srcdir) && autoheader
177 echo timestamp > $(srcdir)/stamp-h.in
178
179src/config.h: stamp-h
180stamp-h: src/config.h.in config.status
181 ./config.status
182
183Makefile: Makefile.in config.status
184 ./config.status
185
186config.status: configure
187 ./config.status --recheck
188
189FORCE:
Note: See TracBrowser for help on using the repository browser.