]> sjero.net Git - wget/blob - Makefile.in
[svn] * {.,doc,src,util,windows}/Makefile.in: Moved top_builddir out of "User
[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 RM = rm -f
60
61 # These are used for maintenance only, so they are safe without
62 # special autoconf cruft.
63 FIND = find
64 GZIP = gzip
65 TAR = tar
66
67 # flags passed to recursive makes in subdirectories
68 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
69 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
70 prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
71 infodir='$(infodir)' mandir='$(mandir)' manext='$(manext)'
72
73 # subdirectories in the distribution
74 SUBDIRS = src doc po util windows
75
76 # default target
77 all: src/config.h Makefile $(SUBDIRS)
78
79 check: all
80
81 $(SUBDIRS): FORCE
82         cd $@ && $(MAKE) $(MAKEDEFS)
83
84 # install everything
85 install: install.bin install.info install.wgetrc \
86          install.mo @COMMENT_IF_NO_POD2MAN@install.man
87
88 # install/uninstall the binary
89 install.bin uninstall.bin:
90         cd src && $(MAKE) $(MAKEDEFS) $@
91
92 # install/uninstall the info/man pages
93 install.info uninstall.info install.man uninstall.man install.wgetrc:
94         cd doc && $(MAKE) $(MAKEDEFS) $@
95
96 # Install `.mo' files
97 install.mo:
98         cd po && $(MAKE) $(MAKEDEFS) $@
99
100 # create tag files for Emacs
101 TAGS:
102         cd src && $(MAKE) $@
103
104 dist: $(srcdir)/configure DISTFILES
105         mkdir $(DISTNAME)
106         for d in `$(FIND) . -type d ! -name CVS -a ! -name RCS -print`; do \
107                 if [ "$$d" != "." -a "$$d" != "./$(DISTNAME)" ]; then \
108                         mkdir $(DISTNAME)/$$d; \
109                 fi; \
110         done
111         for f in `cat DISTFILES`; do \
112                 ln $(srcdir)/$$f $(DISTNAME)/$$f || \
113                 { echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
114         done
115         (cd $(DISTNAME); $(MAKE) distclean)
116         $(TAR) chvf - $(DISTNAME) | $(GZIP) -c --best >$(DISTNAME).tar.gz
117         $(RM) -r $(DISTNAME)
118         $(RM) DISTFILES
119
120 DISTFILES: FORCE
121         rm -rf $(DISTNAME)      
122         (cd $(srcdir); find . ! -type d -print) \
123         | sed '/\/\(CVS\|RCS\)\//d; \
124                 /$@/d; \
125                 /\.tar.*/d; \
126                 s/^.\///; /^\.$$/d;' \
127         | sort | uniq > $@
128
129 #
130 # Cleanup dependencies
131 #
132
133 clean:          clean-recursive         clean-top
134 distclean:      distclean-recursive     distclean-top
135 realclean:      realclean-recursive     realclean-top
136
137 clean-top:
138         $(RM) *~ *.bak $(DISTNAME).tar.gz
139
140 distclean-top: clean-top
141         $(RM) Makefile config.status config.log config.cache stamp-h
142
143 realclean-top: distclean-top
144         $(RM) configure
145
146 clean-recursive distclean-recursive realclean-recursive:
147         for subdir in $(SUBDIRS); do \
148            target=`echo $@ | sed s/-recursive//`; \
149            (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
150         done
151
152 #
153 # Dependencies for maintenance
154 #
155
156 Makefile: Makefile.in config.status
157         CONFIG_HEADERS= ./config.status
158
159 config.status: configure
160         ./config.status --recheck
161
162 configure: configure.in aclocal.m4
163         cd $(srcdir) && autoconf
164
165 src/config.h: stamp-h
166 stamp-h: src/config.h.in config.status
167         CONFIG_FILES= CONFIG_HEADERS=src/config.h ./config.status
168
169 src/config.h.in: stamp-h.in
170 stamp-h.in: configure.in aclocal.m4
171         echo timestamp > $@
172
173 FORCE:
174