diff options
author | Darshit Shah <darnir@gnu.org> | 2022-02-26 15:32:12 +0100 |
---|---|---|
committer | Darshit Shah <darnir@gnu.org> | 2022-02-26 15:45:02 +0100 |
commit | 3a470a90f2811832166c47edb7636b5d7652a2ab (patch) | |
tree | 0a09bafe1346537d9700a41f6192b63f6f214dea | |
parent | f5263969fa4aa518384b44d7bb334fdb232f7a0a (diff) | |
download | wget-3a470a90f2811832166c47edb7636b5d7652a2ab.tar.gz |
Cleanup some incorrect uses of AM Conditionals
* configure.ac: Replace IRI_IS_ENABLED with WITH_IRI and
METALINK_IS_ENABLED with WITH_METALINK
* src/Makefile.am: Add the .c and .h files for IRI, Metalink and
Xattr support to wget_SOURCES directly when needed instead of
adding them as object files.
* testenv/Makefile.am: Rename METALINK_IS_ENABLED to WITH_METALINK
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/Makefile.am | 31 | ||||
-rw-r--r-- | testenv/Makefile.am | 2 |
3 files changed, 19 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index f0189937..91baf393 100644 --- a/configure.ac +++ b/configure.ac @@ -972,9 +972,9 @@ test "X${ENABLE_XATTR}" = "Xyes" && AC_DEFINE([ENABLE_XATTR], 1, [Define if you want file meta-data storing into POSIX Extended Attributes compiled in.]) dnl Needed by src/Makefile.am -AM_CONDITIONAL([IRI_IS_ENABLED], [test "X$iri" != "Xno"]) +AM_CONDITIONAL([WITH_IRI], [test "X$iri" != "Xno"]) AM_CONDITIONAL([WITH_SSL], [test "X$with_ssl" != "Xno"]) -AM_CONDITIONAL([METALINK_IS_ENABLED], [test "X$with_metalink" != "Xno"]) +AM_CONDITIONAL([WITH_METALINK], [test "X$with_metalink" != "Xno"]) AM_CONDITIONAL([WITH_XATTR], [test "X$ENABLE_XATTR" != "Xno"]) AM_CONDITIONAL([WITH_NTLM], [test "X$ENABLE_NTLM" = "Xyes"]) AM_CONDITIONAL([WITH_OPIE], [test x"$ENABLE_OPIE" = x"yes"]) diff --git a/src/Makefile.am b/src/Makefile.am index dc8b2347..c3ced0aa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,17 +30,6 @@ # Version: @VERSION@ # -if IRI_IS_ENABLED -IRI_OBJ = iri.c -endif - -if METALINK_IS_ENABLED -METALINK_OBJ = metalink.c -endif - -if WITH_XATTR -XATTR_OBJ = xattr.c -endif # The following line is losing on some versions of make! DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\" @@ -52,14 +41,26 @@ wget_SOURCES = connect.c convert.c cookies.c ftp.c \ css_.c css-url.c \ ftp-basic.c ftp-ls.c hash.c host.c hsts.c html-parse.c html-url.c \ http.c init.c log.c main.c netrc.c progress.c ptimer.c \ - recur.c res.c retr.c spider.c url.c warc.c $(XATTR_OBJ) \ - utils.c exits.c build_info.c $(IRI_OBJ) $(METALINK_OBJ) \ + recur.c res.c retr.c spider.c url.c warc.c \ + utils.c exits.c build_info.c \ css-url.h css-tokens.h connect.h convert.h cookies.h \ ftp.h hash.h host.h hsts.h html-parse.h html-url.h \ http.h init.h log.h netrc.h \ options.h progress.h ptimer.h recur.h res.h retr.h \ - spider.h ssl.h sysdep.h url.h warc.h utils.h wget.h iri.h \ - exits.h version.h metalink.h xattr.h + spider.h ssl.h sysdep.h url.h warc.h utils.h wget.h \ + exits.h version.h + +if WITH_IRI +wget_SOURCES += iri.c iri.h +endif + +if WITH_XATTR +wget_SOURCES += xattr.c xattr.h +endif + +if WITH_METALINK +wget_SOURCES += metalink.c metalink.h +endif if WITH_OPIE wget_SOURCES += ftp-opie.c diff --git a/testenv/Makefile.am b/testenv/Makefile.am index 6e3362f6..f222ff3d 100644 --- a/testenv/Makefile.am +++ b/testenv/Makefile.am @@ -116,7 +116,7 @@ endif if HAVE_PYTHON3 TESTS = $(DEFAULT_TESTS) -if METALINK_IS_ENABLED +if WITH_METALINK TESTS += $(METALINK_TESTS) endif endif |