Remove manual dependency tracking
Hrvoje Niksic <[email protected]> Wed, 22 Jun 2005 01:21:24 +0200
| Newsgroups | gmane.comp.web.wget.patches |
|---|---|
| Message-ID | <[email protected]> |
The dependencies in Makefile.in used to be maintained by a script that I now lost, so they are mostly obsolete. Automake supports automatic dependency maintenance using weird GCC-specific features, but those are too tedious to maintain without the Automake apparatus. In this case, it might be a better idea to simply force a recompile when a header changes. This seems a bit harsh at first, but in reality that's exactly what I did previously -- ran `make clean' after changing a header. With Wget's size and today's compilation speeds for C, this shouldn't be a problem in practice. src/ChangeLog 2005-06-22 Hrvoje Niksic <[email protected]> * Makefile.in: Remove the manually maintained dependency list; make all object files depend on every header. windows/ChangeLog: 2005-06-22 Hrvoje Niksic <[email protected]> * Makefile.src, Makefile.src.bor, Makefile.src.mingw: Make OBJS depend on all headers. * wget.dep: Removed. Index: src/Makefile.in =================================================================== --- src/Makefile.in (revision 1732) +++ src/Makefile.in (working copy) @@ -76,7 +76,7 @@ host.o html-parse.o html-url.o http.o $(NTLM_OBJ) init.o \ log.o main.o $(MD5_OBJ) netrc.o progress.o ptimer.o recur.o \ res.o retr.o safe-ctype.o snprintf.o $(SSL_OBJ) url.o \ - utils.o version.o xmalloc.o + utils.o version.o xmalloc.o .SUFFIXES: .SUFFIXES: .c .o @@ -89,6 +89,18 @@ wget$(exeext): $(OBJ) $(LINK) $(OBJ) $(LIBS) +# We make object files depend on every header. Rather than attempt to +# track dependencies, everything gets recompiled when a header +# changes. With a program of Wget's size this doesn't waste much +# time, and it's a lot safer than attempting to get all the +# dependencies right. + +$(OBJ): config-post.h connect.h convert.h cookies.h ftp.h gen-md5.h \ + getopt.h gnu-md5.h hash.h host.h html-parse.h http-ntlm.h \ + init.h log.h mswindows.h netrc.h options.h progress.h \ + ptimer.h recur.h res.h retr.h safe-ctype.h ssl.h sysdep.h \ + url.h utils.h wget.h xmalloc.h + # # Dependencies for installing # @@ -129,50 +141,3 @@ TAGS: *.c *.h -$(ETAGS) *.c *.h - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -alloca.o: -cmpt.o: wget.h sysdep.h options.h safe-ctype.h -connect.o: wget.h sysdep.h options.h safe-ctype.h utils.h connect.h host.h -convert.o: wget.h convert.h url.h recur.h utils.h hash.h -cookies.o: wget.h sysdep.h options.h safe-ctype.h cookies.h hash.h url.h utils.h -ftp-basic.o: wget.h sysdep.h options.h safe-ctype.h utils.h connect.h \ - host.h ftp.h -ftp-ls.o: wget.h sysdep.h options.h safe-ctype.h utils.h ftp.h host.h \ - url.h -ftp-opie.o: wget.h sysdep.h options.h safe-ctype.h gen-md5.h -ftp.o: wget.h sysdep.h options.h safe-ctype.h utils.h url.h retr.h \ - ftp.h host.h connect.h netrc.h -gen-md5.o: wget.h sysdep.h options.h safe-ctype.h gen-md5.h -openssl.o: wget.h sysdep.h options.h safe-ctype.h utils.h connect.h host.h \ - url.h -getopt.o: wget.h sysdep.h options.h safe-ctype.h getopt.h -gnu-md5.o: wget.h sysdep.h options.h safe-ctype.h gnu-md5.h -hash.o: wget.h sysdep.h options.h safe-ctype.h utils.h hash.h -host.o: wget.h sysdep.h options.h safe-ctype.h utils.h host.h url.h hash.h -html-parse.o: wget.h sysdep.h options.h safe-ctype.h html-parse.h -html-url.o: wget.h sysdep.h options.h safe-ctype.h html-parse.h url.h utils.h -http.o: wget.h sysdep.h options.h safe-ctype.h utils.h url.h host.h \ - retr.h connect.h host.h netrc.h ssl.h \ - cookies.h gen-md5.h -init.o: wget.h sysdep.h options.h safe-ctype.h utils.h init.h host.h recur.h \ - netrc.h cookies.h progress.h -log.o: wget.h sysdep.h options.h safe-ctype.h utils.h -main.o: wget.h sysdep.h options.h safe-ctype.h utils.h init.h retr.h \ - recur.h host.h cookies.h url.h progress.h ssl.h getopt.h -gnu-md5.o: wget.h sysdep.h options.h safe-ctype.h gnu-md5.h -mswindows.o: wget.h sysdep.h options.h safe-ctype.h utils.h url.h -netrc.o: wget.h sysdep.h options.h safe-ctype.h utils.h netrc.h init.h -progress.o: wget.h sysdep.h options.h safe-ctype.h progress.h utils.h retr.h -recur.o: wget.h sysdep.h options.h safe-ctype.h url.h recur.h utils.h retr.h \ - ftp.h host.h hash.h -res.o: wget.h sysdep.h options.h safe-ctype.h utils.h hash.h url.h retr.h res.h -retr.o: wget.h sysdep.h options.h safe-ctype.h utils.h retr.h url.h \ - recur.h ftp.h host.h connect.h hash.h -safe-ctype.o: safe-ctype.h -snprintf.o: safe-ctype.h -url.o: wget.h sysdep.h options.h safe-ctype.h utils.h url.h host.h hash.h -utils.o: wget.h sysdep.h options.h safe-ctype.h utils.h hash.h -version.o: -xmalloc.o: wget.h xmalloc.h 2005-06-20 Hrvoje Niksic <[email protected]> * hash.c: Rename "mapping" to "cell" to avoid confusion with the Index: windows/Makefile.src.mingw =================================================================== --- windows/Makefile.src.mingw (revision 1732) +++ windows/Makefile.src.mingw (working copy) @@ -41,6 +41,10 @@ wget.exe: $(OBJS) ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} +$(OBJS): config-post.h connect.h convert.h cookies.h ftp.h gen-md5.h \ + getopt.h gnu-md5.h hash.h host.h html-parse.h http-ntlm.h \ + init.h log.h mswindows.h netrc.h options.h progress.h \ + ptimer.h recur.h res.h retr.h safe-ctype.h ssl.h sysdep.h \ + url.h utils.h wget.h xmalloc.h + o = ${OBJ_EXT} - -include ../windows/wget.dep Index: windows/Makefile.src.bor =================================================================== --- windows/Makefile.src.bor (revision 1732) +++ windows/Makefile.src.bor (working copy) @@ -58,8 +58,12 @@ $(LIBDIR)\import32.lib+ $(LIBDIR)\cw32.lib +$(OBJS): config-post.h connect.h convert.h cookies.h ftp.h gen-md5.h \ + getopt.h gnu-md5.h hash.h host.h html-parse.h http-ntlm.h \ + init.h log.h mswindows.h netrc.h options.h progress.h \ + ptimer.h recur.h res.h retr.h safe-ctype.h ssl.h sysdep.h \ + url.h utils.h wget.h xmalloc.h - | @@ -79,5 +83,3 @@ $(RM) wget.tds o = .obj - -!include "..\windows\wget.dep" Index: windows/Makefile.src =================================================================== --- windows/Makefile.src (revision 1732) +++ windows/Makefile.src (working copy) @@ -32,7 +32,6 @@ !ifndef NO_SSL SSLDEFS = /DHAVE_SSL SSLLIBS = libeay32.lib ssleay32.lib -SSLSRC = openssl.c http-ntlm.c SSLOBJ = openssl$o http-ntlm$o !endif @@ -67,13 +66,6 @@ LDFLAGS = $(LDFLAGS) /ltcg:status !endif - -SRC = cmpt.c safe-ctype.c convert.c connect.c host.c http.c netrc.c \ - ftp-basic.c ftp.c ftp-ls.c ftp-opie.c getopt.c hash.c \ - html-parse.c html-url.c progress.c retr.c recur.c res.c url.c cookies.c \ - init.c utils.c main.c ptimer.c version.c xmalloc.c mswindows.c \ - gen-md5.c gnu-md5.c log.c $(SSLSRC) - OBJ = cmpt$o safe-ctype$o convert$o connect$o host$o http$o netrc$o \ ftp-basic$o ftp$o ftp-ls$o ftp-opie$o getopt$o hash$o \ html-parse$o html-url$o progress$o retr$o recur$o res$o url$o cookies$o \ @@ -92,6 +84,11 @@ $(LD) @<< $(LDFLAGS) /out:$@ $(OBJ) $(LIBS) << +$(OBJ): config-post.h connect.h convert.h cookies.h ftp.h gen-md5.h \ + getopt.h gnu-md5.h hash.h host.h html-parse.h http-ntlm.h \ + init.h log.h mswindows.h netrc.h options.h progress.h \ + ptimer.h recur.h res.h retr.h safe-ctype.h ssl.h sysdep.h \ + url.h utils.h wget.h xmalloc.h # # Dependencies for cleanup @@ -111,8 +108,3 @@ realclean: distclean $(RM) TAGS - -# Dependencies: - -!include "..\windows\wget.dep" - Index: windows/wget.dep =================================================================== --- windows/wget.dep (revision 1732) +++ windows/wget.dep (working copy) @@ -1,33 +0,0 @@ -alloca$o: alloca.c config.h -ansi2knr$o: ansi2knr.c config.h -cmpt$o: cmpt.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h -connect$o: connect.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h connect.h host.h -convert$o: convert.c config.h wget.h convert.h url.h recur.h utils.h hash.h -cookies$o: cookies.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h cookies.h hash.h url.h utils.h -ftp-basic$o: ftp-basic.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h connect.h host.h ftp.h -ftp-ls$o: ftp-ls.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h ftp.h url.h -ftp-opie$o: ftp-opie.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h gen-md5.h -ftp$o: ftp.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h url.h retr.h ftp.h connect.h host.h netrc.h -gen-md5$o: gen-md5.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h gen-md5.h -openssl$o: openssl.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h connect.h host.h url.h -getopt$o: getopt.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h getopt.h -gnu-md5$o: gnu-md5.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h gnu-md5.h -hash$o: hash.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h hash.h -host$o: host.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h host.h url.h hash.h -html-parse$o: html-parse.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h html-parse.h -html-url$o: html-url.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h html-parse.h url.h utils.h -http$o: http.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h url.h host.h retr.h connect.h netrc.h gen-md5.h -init$o: init.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h init.h host.h recur.h netrc.h cookies.h progress.h -log$o: log.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h -main$o: main.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h getopt.h init.h retr.h recur.h host.h ssl.h getopt.h -mswindows$o: mswindows.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h url.h -netrc$o: netrc.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h netrc.h init.h -progress$o: progress.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h retr.h -recur$o: recur.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h url.h recur.h utils.h retr.h ftp.h host.h hash.h -retr$o: retr.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h retr.h url.h recur.h ftp.h host.h connect.h hash.h -safe-ctype$o: safe-ctype.c config.h safe-ctype.h -snprintf$o: snprintf.c config.h safe-ctype.h -url$o: url.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h url.h host.h hash.h -utils$o: utils.c config.h wget.h sysdep.h mswindows.h options.h safe-ctype.h utils.h hash.h -version$o: version.c -xmalloc$o: wget.h xmalloc.h