From: hniksic Date: Tue, 21 Jun 2005 23:21:48 +0000 (-0700) Subject: [svn] Remove manual tracking of dependencies; instead, force a recompile when a header X-Git-Tag: v1.13~974 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=63dcf343f140162aa5e22089d090424dcf137e1a [svn] Remove manual tracking of dependencies; instead, force a recompile when a header file changes. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4733eb6c..3a706a4c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-06-22 Hrvoje Niksic + + * Makefile.in: Remove the manually maintained dependency list; + make all object files depend on every header. + 2005-06-20 Hrvoje Niksic * hash.c: Rename "mapping" to "cell" to avoid confusion with the diff --git a/src/Makefile.in b/src/Makefile.in index e1e23aa5..e8121df8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -76,7 +76,7 @@ OBJ = $(ALLOCA) cmpt.o connect.o convert.o cookies.o \ 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 @@ OBJ = $(ALLOCA) cmpt.o connect.o convert.o cookies.o \ 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 @@ Makefile: Makefile.in ../config.status 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 diff --git a/windows/ChangeLog b/windows/ChangeLog index b71086f5..0ff7a51d 100644 --- a/windows/ChangeLog +++ b/windows/ChangeLog @@ -1,3 +1,10 @@ +2005-06-22 Hrvoje Niksic + + * Makefile.src, Makefile.src.bor, Makefile.src.mingw: Make OBJS + depend on all headers. + + * wget.dep: Removed. + 2005-04-05 Mauro Tortonesi * Makefile.src.mingw: removed string_t.c from list of source files. diff --git a/windows/Makefile.src b/windows/Makefile.src index 632079c5..442d6b72 100644 --- a/windows/Makefile.src +++ b/windows/Makefile.src @@ -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 @@ CFLAGS = $(CFLAGS) /GL 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 @@ wget.exe: $(OBJ) $(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 @@ distclean: clean realclean: distclean $(RM) TAGS - -# Dependencies: - -!include "..\windows\wget.dep" - diff --git a/windows/Makefile.src.bor b/windows/Makefile.src.bor index ca8ad458..6fbe79a0 100644 --- a/windows/Makefile.src.bor +++ b/windows/Makefile.src.bor @@ -58,7 +58,11 @@ $<,$*,+ $(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 @@ clean: $(RM) wget.tds o = .obj - -!include "..\windows\wget.dep" diff --git a/windows/Makefile.src.mingw b/windows/Makefile.src.mingw index 5188c440..3e5b159d 100644 --- a/windows/Makefile.src.mingw +++ b/windows/Makefile.src.mingw @@ -41,6 +41,10 @@ all: wget.exe wget.exe: $(OBJS) ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} -o = ${OBJ_EXT} +$(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 -include ../windows/wget.dep +o = ${OBJ_EXT} diff --git a/windows/wget.dep b/windows/wget.dep deleted file mode 100644 index 029c96d3..00000000 --- a/windows/wget.dep +++ /dev/null @@ -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