1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Cleanup Windows Makefiles and README.

Submitted by David Fritz.
This commit is contained in:
hniksic 2004-02-12 10:09:10 -08:00
parent a4b95084e8
commit 2bebfdb844
6 changed files with 138 additions and 102 deletions

View File

@ -1,3 +1,27 @@
2004-02-09 David Fritz <zeroxdf@att.net>
* configure.bat.in: Don't clear the screen.
* windows/README: Add introductory paragraph. Re-word a few
sentences. Correct minor typographical errors. Use consistent
capitalization of Wget, SSL, and OpenSSL. Refer to Microsoft
Visual C++ as MSVC instead of VC++. Mention the --msvc option to
configure.bat. Reflow paragraphs.
* windows/Makefile.top: Use tabs instead of spaces. Ignore errors
in clean rules. Use lowercase filenames when building distribution
.zip archive.
* windows/Makefile.doc: Use tabs instead of spaces. Ignore errors
in clean rules.
* windows/Makefile.src: Clean-up clean rules. Use tabs instead of
spaces. Link against gdi32.lib. Don't define SYSTEM_WGETRC.
Remove unused macros. Remove anachronistic and superfluous linker
flags. Don't rename wget.exe to all upper-case. Add
`preprocessor' conditionals for SSL and newer MSVC options. Use
batch rules. Don't suppress all warnings.
2003-11-26 Hrvoje Niksic <hniksic@xemacs.org> 2003-11-26 Hrvoje Niksic <hniksic@xemacs.org>
* aclocal.m4: Don't check for AI_V4MAPPED and for AI_ALL, since * aclocal.m4: Don't check for AI_V4MAPPED and for AI_ALL, since

View File

@ -26,7 +26,6 @@ rem modify this file, you may extend this exception to your version of the
rem file, but you are not obligated to do so. If you do not wish to do rem file, but you are not obligated to do so. If you do not wish to do
rem so, delete this exception statement from your version. rem so, delete this exception statement from your version.
cls
if .%1 == .--borland goto :borland if .%1 == .--borland goto :borland
if .%1 == .--mingw goto :mingw if .%1 == .--mingw goto :mingw
if .%1 == .--msvc goto :msvc if .%1 == .--msvc goto :msvc

View File

@ -28,22 +28,22 @@
# You probably need makeinfo and perl, see the README in the main # You probably need makeinfo and perl, see the README in the main
# windows directory. # windows directory.
RM = del RM = -del
CP = copy CP = copy
ATTRIB = attrib ATTRIB = attrib
MAKEINFO = makeinfo.exe MAKEINFO = makeinfo.exe
TEXI2POD = texi2pod.pl TEXI2POD = texi2pod.pl
POD2MAN = pod2man POD2MAN = pod2man
SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
WGETHLP = wget.hlp WGETHLP = wget.hlp
WGETINFO = wget.info WGETINFO = wget.info
WGETTEXI = wget.texi WGETTEXI = wget.texi
WGETHTML = wget.html WGETHTML = wget.html
WGETPOD = wget.pod WGETPOD = wget.pod
manext = 1 manext = 1
MAN = wget.$(manext) MAN = wget.$(manext)
all: $(WGETHLP) $(WGETINFO) $(WGETHTML) all: $(WGETHLP) $(WGETINFO) $(WGETHTML)
@ -76,10 +76,10 @@ $(WGETHLP): $(WGETTEXI) $(SAMPLERCTEXI)
hcrtf -xn wget.hpj hcrtf -xn wget.hpj
clean: clean:
$(RM) *.bak $(RM) *.bak
$(RM) *.hpj $(RM) *.hpj
$(RM) *.rtf $(RM) *.rtf
$(RM) *.ph $(RM) *.ph
$(RM) $(SAMPLERCTEXI) $(RM) $(SAMPLERCTEXI)
$(RM) $(MAN) $(RM) $(MAN)
$(RM) $(TEXI2POD) $(RM) $(TEXI2POD)

View File

@ -1,4 +1,4 @@
# Makefile for `wget' utility for MSVC 4.0 # Makefile for `wget' utility for MSVC
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. # Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -25,43 +25,48 @@
# file, but you are not obligated to do so. If you do not wish to do # file, but you are not obligated to do so. If you do not wish to do
# so, delete this exception statement from your version. # so, delete this exception statement from your version.
#
# Version: 1.4.4
#
#Comment these if you don't have openssl available - however https # SSL (https) support requires the OpenSSL library (see http://www.openssl.org/).
#won't work. # If you do not have OpenSSL installed or wish to build Wget without SSL
SSLDEFS = /DHAVE_SSL # support, either comment-out the following lines or define NO_SSL.
SSLLIBS = libeay32.lib ssleay32.lib !ifndef NO_SSL
SSLSRC = gen_sslfunc.c SSLDEFS = /DHAVE_SSL
SSLOBJ = gen_sslfunc$o SSLLIBS = libeay32.lib ssleay32.lib
SSLSRC = gen_sslfunc.c
SSLOBJ = gen_sslfunc$o
!endif
SHELL = command o = .obj
VPATH = . CC = cl
o = .obj LD = link
OUTDIR = . RM = -del
CC = cl DEFS = /DWINDOWS /D_CONSOLE /DHAVE_CONFIG_H $(SSLDEFS)
LD = link LIBS = kernel32.lib advapi32.lib wsock32.lib user32.lib gdi32.lib $(SSLLIBS)
CFLAGS = /nologo /MT /W0 /O2 !ifdef DEBUG
#DEBUGCF = /DENABLE_DEBUG /Zi /Od #/Fd /FR CFLAGS = /nologo /MTd /Od /Zi /I. $(DEFS)
CPPFLAGS = LDFLAGS = /debug
DEFS = /DWINDOWS /D_CONSOLE /DHAVE_CONFIG_H /DSYSTEM_WGETRC=\"wgetrc\" !else
LDFLAGS = /subsystem:console /incremental:no /warn:3 CFLAGS = /nologo /MT /O2 /I. $(DEFS)
#DEBUGLF = /pdb:wget.pdb /debug /debugtype:cv /map:wget.map /opt:noref LDFLAGS = /opt:ref #/opt:nowin98
LIBS = kernel32.lib advapi32.lib wsock32.lib user32.lib !endif
INCLUDES = /I.
COMPILE = $(CC) $(INCLUDES) $(CPPFLAGS) $(DEBUGCF) $(DEFS) $(SSLDEFS) $(CFLAGS) # The following enables security checks and is recommended if you are using
LINK = $(LD) $(LDFLAGS) $(DEBUGLF) /out:$@ # MSVC 7.0 (or later) for 80x86.
!ifdef SECURITY_CHECKS
CFLAGS = $(CFLAGS) /GS
!endif
#INSTALL = @INSTALL@ # The following enables link-time code generation (Cross-file
#INSTALL_PROGRAM = @INSTALL_PROGRAM@ # interprocedural optimizations).
!ifdef LTCG
CFLAGS = $(CFLAGS) /GL
LDFLAGS = $(LDFLAGS) /ltcg:status
!endif
RM = del
SRC = cmpt.c safe-ctype.c convert.c connect.c host.c http.c netrc.c \ 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 \ ftp-basic.c ftp.c ftp-ls.c ftp-opie.c getopt.c hash.c \
@ -77,17 +82,15 @@ OBJ = cmpt$o safe-ctype$o convert$o connect$o host$o http$o netrc$o \
.SUFFIXES: .c .obj .SUFFIXES: .c .obj
.c.obj: # If this doesn't work for you, remove the second colon.
$(COMPILE) /c $< .c.obj::
$(CC) $(CFLAGS) /c $<
# Dependencies for building # Dependencies for building
wget: wget.exe
wget.exe: $(OBJ) wget.exe: $(OBJ)
$(LD) @<< $(LDFLAGS) $(DEBUGLF) /out:$@ $(LIBS) $(SSLLIBS) $(OBJ) $(LD) @<< $(LDFLAGS) /out:$@ $(OBJ) $(LIBS)
<< <<
ren wget.exe WGET.EXE
# #
@ -95,15 +98,16 @@ wget.exe: $(OBJ)
# #
clean: clean:
$(RM) *.obj $(RM) *.bak
$(RM) *.exe $(RM) *.obj
$(RM) *.bak $(RM) *.exe
$(RM) *.pdb $(RM) *.pdb
$(RM) *.map $(RM) *.map
$(RM) config.h $(RM) *.ilk
distclean: clean distclean: clean
$(RM) Makefile $(RM) Makefile
$(RM) config.h
realclean: distclean realclean: distclean
$(RM) TAGS $(RM) TAGS
@ -111,3 +115,4 @@ realclean: distclean
# Dependencies: # Dependencies:
!include "..\windows\wget.dep" !include "..\windows\wget.dep"

View File

@ -25,7 +25,7 @@
# file, but you are not obligated to do so. If you do not wish to do # file, but you are not obligated to do so. If you do not wish to do
# so, delete this exception statement from your version. # so, delete this exception statement from your version.
RM = del RM = -del
CP = copy CP = copy
# flags passed to recursive makes in subdirectories # flags passed to recursive makes in subdirectories
@ -37,41 +37,41 @@ SUBDIRS = src doc #util
all: Makefile $(SUBDIRS) all: Makefile $(SUBDIRS)
$(SUBDIRS): FORCE $(SUBDIRS): FORCE
cd $@ cd $@
$(MAKE) $(MAKE)
cd .. cd ..
FORCE: FORCE:
# install everything # install everything
install: install:
echo Just do it. echo Just do it.
clean: clean-recursive clean-top clean: clean-recursive clean-top
distclean: distclean-recursive distclean-top distclean: distclean-recursive distclean-top
realclean: realclean-recursive realclean-top realclean: realclean-recursive realclean-top
clean-top: clean-top:
$(RM) *.bak $(RM) *.bak
$(RM) *.zip $(RM) *.zip
distclean-top: clean-top distclean-top: clean-top
$(RM) Makefile $(RM) Makefile
$(RM) config.h $(RM) config.h
realclean-top: distclean-top realclean-top: distclean-top
clean-recursive distclean-recursive realclean-recursive: clean-recursive distclean-recursive realclean-recursive:
cd src cd src
$(MAKE) $(@:-recursive=) $(MAKE) $(@:-recursive=)
cd ..\\doc cd ..\\doc
$(MAKE) $(@:-recursive=) $(MAKE) $(@:-recursive=)
cd .. cd ..
bindist: wget.zip bindist: wget.zip
wget.zip: $(SUBDIRS) wget.zip: $(SUBDIRS)
$(RM) wget.zip $(RM) wget.zip
zip -Djl9 wget.zip AUTHORS COPYING INSTALL MACHINES MAILING-LIST NEWS README DOC\\sample.wgetrc zip -Djl9 wget.zip AUTHORS COPYING INSTALL MACHINES MAILING-LIST NEWS README doc/sample.wgetrc
zip -Dj9 wget.zip SRC\\WGET.EXE DOC\\WGET.HLP zip -Dj9 wget.zip src/wget.exe doc/wget.hlp

View File

@ -1,38 +1,46 @@
-*- text -*- -*- text -*-
To build Wget with VC++ run configure.bat (in the main wget directory), You can configure the Windows port of Wget by running configure.bat (in
and then run nmake. At a certain point in time wget exposed some the main Wget directory). You can run it with no arguments to see the
compiler bugs in VC++ 5.0; VC++ 6.0 sp 5 is known to be safe. However list of possible options. Run it with the option corresponding to the
read the rest of this document before continuing. compiler you intend to use to build Wget and follow the (brief)
instructions printed on the screen. The instructions bellow are for
building Wget with Microsoft Visual C++ (MSVC); you may need to make
appropriate substitutions for your compiler and build environment.
For VC++ the current default is to configure wget with ssl support; To build Wget with MSVC run configure.bat (in the main Wget directory)
first get openssl (http://www.openssl.org), compile it and install with the argument --msvc, and then run nmake. At a certain point in time
relevant headers and libraries where your compiler can find them; Wget exposed some compiler bugs in MSVC 5.0; MSVC 6.0 SP5 is known to be
currently this could mean (presuming default installation directories) safe. However, read the rest of this document before continuing.
copy (from the compiled openssl dirctory) the whole inc32/openssl
directory and its contents to For MSVC the current default is to build Wget with SSL support. For this
"C:\Program Files\Microsoft Visual Studio\VC98\Include\openssl", to work, you will need to have OpenSSL installed. First, get OpenSSL
and from out32dll (in the openssl directory) the two needed libraries (http://www.openssl.org), compile it and install the relevant headers and
libraries where your compiler can find them; currently this could mean
(presuming default installation directories for MSVC 6.0) copy (from the
compiled OpenSSL directory) the whole inc32\openssl directory and its
contents to "C:\Program Files\Microsoft Visual Studio\VC98\Include\openssl",
and from out32dll (in the OpenSSL directory) the two needed libraries
(libeay32.lib and ssleay32.lib) to (libeay32.lib and ssleay32.lib) to
"C:\Program Files\Microsoft Visual Studio\VC98\lib". "C:\Program Files\Microsoft Visual Studio\VC98\lib". These locations
These locations aren't exactly the best but will get you started if you aren't exactly the best but will get you started if you don't know where
don't know where to place these headers and libraries. to place these headers and libraries. Usually at run-time some OpenSSL
Usually at runtime some openssl libraries (currently ssleay32.dll and libraries (currently ssleay32.dll and libeay32.dll) will need to be
libeay32.dll) will need to be available in your environment PATH. available in your environment PATH.
If you don't want to/can't compile Wget with OpenSSL comment SSL related
lines in windows\Makefile.src; then follow the normal instructions
(configure.bat and so on).
If you want to build the help file you will need a copy of makeinfo to If you want to build the help file you will need a copy of makeinfo to
convert wget.texi to rtf and html. I've made a copy available at convert wget.texi to rtf and html. I've made a copy available at
<URL:ftp://sunsite.dk/projects/wget/makeinfo.zip>. This copy of <URL:ftp://sunsite.dk/projects/wget/makeinfo.zip>. This copy of
makeinfo is from the miktxt 1.10 archive available from ctan. You also makeinfo is from the miktxt 1.10 archive available from ctan. You also
will need perl 5, one possibility is Activeperl (currently free) from will need perl 5, one possibility is ActivePerl (currently free) from
<URL:http://www.activestate.com>; you need to locate the download and <URL:http://www.activestate.com>; you need to locate the download and
install instructions for the current version available (since the install instructions for the current version available (since the
packages and installation instructions change from time to time). packages and installation instructions change from time to time).
If you don't want/can't to compile wget with openssl comment the SSL
related lines in windows\Makefile.src; then follow the normal
instructions (configure.bat and so on).
Windows contributors: Windows contributors:
* Darko Budor <dbudor@zesoi.fer.hr> -- the initial work on the Windows * Darko Budor <dbudor@zesoi.fer.hr> -- the initial work on the Windows