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