]> sjero.net Git - wget/blob - Makefile.in
4d3213452cfcd9c8e8c75c28d5945d27f60f5b21
[wget] / Makefile.in
1 # Makefile for `Wget' utility
2 # Copyright (C) 1995, 1996, 1997, 2006 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
32 SHELL = /bin/sh
33 @SET_MAKE@
34
35 top_builddir = .
36
37 srcdir = @srcdir@
38 VPATH  = @srcdir@
39
40 #
41 # User configuration section
42 #
43
44 #
45 # Install variables
46 #
47 prefix      = @prefix@
48 exec_prefix = @exec_prefix@
49 bindir      = @bindir@
50 infodir     = @infodir@
51 sysconfdir  = @sysconfdir@
52 mandir      = @mandir@
53 manext      = 1
54 localedir   = $(prefix)/share/locale
55
56 CC = @CC@
57 CFLAGS = @CFLAGS@
58 CPPFLAGS = @CPPFLAGS@
59 DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
60 LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@
61 LDFLAGS = @LDFLAGS@
62
63 #
64 # End of user configuration section.  There should be no need to change
65 # anything below this line.
66 #
67
68 DISTNAME = wget-@VERSION@
69 RM = rm -f
70
71 # These are used for maintenance only, so they are safe without
72 # special autoconf cruft.
73 FIND = find
74 GZIP = gzip
75 TAR = tar
76
77 # flags passed to recursive makes in subdirectories
78 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
79 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
80 DESTDIR='$(DESTDIR)' prefix='$(prefix)' exec_prefix='$(exec_prefix)' \
81 bindir='$(bindir)' infodir='$(infodir)' mandir='$(mandir)' \
82 manext='$(manext)'
83
84 # subdirectories in the distribution
85 SUBDIRS = src doc po tests util windows
86
87 # default target
88 all: src/config.h Makefile $(SUBDIRS)
89
90 unittest: src/config.h Makefile 
91         cd tests && $(MAKE) $(MAKEDEFS) $@
92         
93 check: all
94
95 $(SUBDIRS): FORCE
96         cd $@ && $(MAKE) $(MAKEDEFS)
97
98 # install everything
99 install: install.bin install.info install.wgetrc \
100          install.mo @COMMENT_IF_NO_POD2MAN@install.man
101
102 # install/uninstall the binary
103 install.bin uninstall.bin:
104         cd src && $(MAKE) $(MAKEDEFS) $@
105
106 # install/uninstall the info/man pages
107 install.info uninstall.info install.man uninstall.man install.wgetrc:
108         cd doc && $(MAKE) $(MAKEDEFS) $@
109
110 # Install `.mo' files
111 install.mo:
112         cd po && $(MAKE) $(MAKEDEFS) $@
113
114 # create tag files for Emacs
115 TAGS:
116         cd src && $(MAKE) $@
117
118 dist: $(srcdir)/configure DISTFILES
119         mkdir $(DISTNAME)
120         for d in `$(FIND) . -type d ! -name CVS -a ! -name RCS -print`; do \
121                 if [ "$$d" != "." -a "$$d" != "./$(DISTNAME)" ]; then \
122                         mkdir $(DISTNAME)/$$d; \
123                 fi; \
124         done
125         for f in `cat DISTFILES`; do \
126                 ln $(srcdir)/$$f $(DISTNAME)/$$f || \
127                 { echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
128         done
129         (cd $(DISTNAME); $(MAKE) distclean)
130         $(TAR) chvf - $(DISTNAME) | $(GZIP) -c --best >$(DISTNAME).tar.gz
131         $(RM) -r $(DISTNAME)
132         $(RM) DISTFILES
133
134 DISTFILES: FORCE
135         rm -rf $(DISTNAME)      
136         (cd $(srcdir); find . ! -type d -print) \
137         | sed '/\/\(CVS\|RCS\)\//d; /$@/d; /\.tar.*/d; s/^.\///; /^\.$$/d;' \
138         | sort | uniq > $@
139
140 #
141 # Cleanup dependencies
142 #
143
144 clean:          clean-recursive         clean-top
145 distclean:      distclean-recursive     distclean-top
146 realclean:      realclean-recursive     realclean-top
147
148 clean-top:
149         $(RM) *~ *.bak $(DISTNAME).tar.gz
150
151 distclean-top: clean-top
152         $(RM) Makefile config.status config.log config.cache libtool stamp-h
153         $(RM) -r autom4te.cache
154
155 realclean-top: distclean-top
156         $(RM) configure
157
158 clean-recursive distclean-recursive realclean-recursive:
159         for subdir in $(SUBDIRS); do \
160            target=`echo $@ | sed s/-recursive//`; \
161            (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
162         done
163
164 #
165 # Dependencies for maintenance
166 #
167
168 $(srcdir)/configure: configure.in
169         cd $(srcdir) && autoconf
170
171 # autoheader might not change config.h.in, so touch a stamp file.
172 $(srcdir)/src/config.h.in: stamp-h.in
173 $(srcdir)/stamp-h.in: configure.in
174         @true; # running autoheader here breaks: cd $(srcdir) && autoheader
175         echo timestamp > $(srcdir)/stamp-h.in
176
177 src/config.h: stamp-h
178 stamp-h: src/config.h.in config.status
179         ./config.status
180
181 Makefile: Makefile.in config.status
182         ./config.status
183
184 config.status: configure
185         ./config.status --recheck
186
187 FORCE: