]> sjero.net Git - wget/blob - Makefile.in
248a72aba89265b1f74b6efd608091e6a48df08a
[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 windows
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 \
84          install.mo @COMMENT_IF_NO_POD2MAN@install.man
85
86 # install/uninstall the binary
87 install.bin uninstall.bin:
88         cd src && $(MAKE) $(MAKEDEFS) $@
89
90 # install/uninstall the info/man pages
91 install.info uninstall.info install.man uninstall.man install.wgetrc:
92         cd doc && $(MAKE) $(MAKEDEFS) $@
93
94 # Install `.mo' files
95 install.mo:
96         cd po && $(MAKE) $(MAKEDEFS) $@
97
98 # create tag files for Emacs
99 TAGS:
100         cd src && $(MAKE) $@
101
102 dist: $(srcdir)/configure DISTFILES
103         mkdir $(DISTNAME)
104         for d in `$(FIND) . -type d ! -name CVS -a ! -name RCS -print`; do \
105                 if [ "$$d" != "." -a "$$d" != "./$(DISTNAME)" ]; then \
106                         mkdir $(DISTNAME)/$$d; \
107                 fi; \
108         done
109         for f in `cat DISTFILES`; do \
110                 ln $(srcdir)/$$f $(DISTNAME)/$$f || \
111                 { echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
112         done
113         (cd $(DISTNAME); $(MAKE) distclean)
114         $(TAR) chvf - $(DISTNAME) | $(GZIP) -c --best >$(DISTNAME).tar.gz
115         $(RM) -r $(DISTNAME)
116         $(RM) DISTFILES
117
118 DISTFILES: FORCE
119         rm -rf $(DISTNAME)      
120         (cd $(srcdir); find . ! -type d -print) \
121         | sed '/\/\(CVS\|RCS\)\//d; \
122                 /$@/d; \
123                 /\.tar.*/d; \
124                 s/^.\///; /^\.$$/d;' \
125         | sort | uniq > $@
126
127 #
128 # Cleanup dependencies
129 #
130
131 clean:          clean-recursive         clean-top
132 distclean:      distclean-recursive     distclean-top
133 realclean:      realclean-recursive     realclean-top
134
135 clean-top:
136         $(RM) *~ *.bak $(DISTNAME).tar.gz
137
138 distclean-top: clean-top
139         $(RM) Makefile config.status config.log config.cache stamp-h
140
141 realclean-top: distclean-top
142         $(RM) configure
143
144 clean-recursive distclean-recursive realclean-recursive:
145         for subdir in $(SUBDIRS); do \
146            target=`echo $@ | sed s/-recursive//`; \
147            (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
148         done
149
150 #
151 # Dependencies for maintenance
152 #
153
154 Makefile: Makefile.in config.status
155         CONFIG_HEADERS= ./config.status
156
157 config.status: configure
158         ./config.status --recheck
159
160 configure: configure.in aclocal.m4
161         cd $(srcdir) && autoconf
162
163 src/config.h: stamp-h
164 stamp-h: src/config.h.in config.status
165         CONFIG_FILES= CONFIG_HEADERS=src/config.h ./config.status
166
167 src/config.h.in: stamp-h.in
168 stamp-h.in: configure.in aclocal.m4
169         echo timestamp > $@
170
171 FORCE:
172