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