1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
curl/src/Makefile.am
Daniel Stenberg 265b14d6b3
metalink: remove
Warning: this will make existing curl command lines that use metalink to
stop working.

Reasons for removal:

1. We've found several security problems and issues involving the
   metalink support in curl. The issues are not detailed here. When
   working on those, it become apparent to the team that several of the
   problems are due to the system design, metalink library API and what
   the metalink RFC says. They are very hard to fix on the curl side
   only.

2. The metalink usage with curl was only very briefly documented and was
   not following the "normal" curl usage pattern in several ways, making
   it surprising and non-intuitive which could lead to further security
   issues.

3. The metalink library was last updated 6 years ago and wasn't so
   active the years before that either. An unmaintained library means
   there's a security problem waiting to happen. This is probably reason
   enough.

4. Metalink requires an XML parsing library, which is complex code (even
   the smaller alternatives) and to this day often gets security
   updates.

5. Metalink is not a widely used curl feature. In the 2020 curl user
   survey, only 1.4% of the responders said that they'd are using it. In
   2021 that number was 1.2%. Searching the web also show very few
   traces of it being used, even with other tools.

6. The torrent format and associated technology clearly won for
   downloading large files from multiple sources in parallel.

Cloes #7176
2021-06-07 08:14:25 +02:00

153 lines
5.3 KiB
Makefile

#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
###########################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
# remove targets if the command fails
.DELETE_ON_ERROR:
# Specify our include paths here, and do it relative to $(top_srcdir) and
# $(top_builddir), to ensure that these paths which belong to the library
# being currently built and tested are searched before the library which
# might possibly already be installed in the system.
#
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_builddir)/src is for curl's generated src/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_builddir)/src \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/src
bin_PROGRAMS = curl
SUBDIRS = ../docs
if USE_CPPFLAG_CURL_STATICLIB
AM_CPPFLAGS += -DCURL_STATICLIB
endif
include Makefile.inc
# CURL_FILES comes from Makefile.inc
curl_SOURCES = $(CURL_FILES)
# This might hold -Werror
CFLAGS += @CURL_CFLAG_EXTRAS@
# Prevent LIBS from being used for all link targets
LIBS = $(BLANK_AT_MAKETIME)
if USE_EXPLICIT_LIB_DEPS
curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
else
curl_LDADD = $(top_builddir)/lib/libcurl.la @NSS_LIBS@ @SSL_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
endif
# if unit tests are enabled, build a static library to link them with
if BUILD_UNITTESTS
noinst_LTLIBRARIES = libcurltool.la
libcurltool_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DCURL_STATICLIB -DUNITTESTS
libcurltool_la_CFLAGS =
libcurltool_la_LDFLAGS = -static $(LINKFLAGS)
libcurltool_la_SOURCES = $(curl_SOURCES)
endif
CLEANFILES = tool_hugehelp.c
# Use the C locale to ensure that only ASCII characters appear in the
# embedded text.
NROFF=env LC_ALL=C @NROFF@ @MANOPT@ # figured out by the configure script
EXTRA_DIST = mkhelp.pl makefile.dj \
Makefile.m32 macos/curl.mcp.xml.sit.hqx macos/MACINSTALL.TXT \
macos/src/curl_GUSIConfig.cpp macos/src/macos_main.cpp makefile.amiga \
curl.rc Makefile.netware Makefile.inc CMakeLists.txt
# Use absolute directory to disable VPATH
MANPAGE=$(abs_top_builddir)/docs/curl.1
MKHELP=$(top_srcdir)/src/mkhelp.pl
HUGE=tool_hugehelp.c
HUGECMD = $(HUGEIT_$(V))
HUGEIT_0 = @echo " HUGE " $@;
HUGEIT_1 =
HUGEIT_ = $(HUGEIT_0)
CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
CS_1 =
CS_ = $(CS_0)
if USE_MANUAL
# Here are the stuff to create a built-in manual
$(MANPAGE):
cd $(top_builddir)/docs && $(MAKE)
if HAVE_LIBZ
# This generates the tool_hugehelp.c file in both uncompressed and
# compressed formats.
$(HUGE): $(MANPAGE) $(MKHELP)
$(HUGECMD) (echo '#include "tool_setup.h"' > $(HUGE); \
echo '#ifndef HAVE_LIBZ' >> $(HUGE); \
$(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) >> $(HUGE); \
echo '#else' >> $(HUGE); \
$(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c >> $(HUGE); \
echo '#endif /* HAVE_LIBZ */' >> $(HUGE) )
else # HAVE_LIBZ
# This generates the tool_hugehelp.c file uncompressed only
$(HUGE): $(MANPAGE) $(MKHELP)
$(HUGECMD)(echo '#include "tool_setup.h"' > $(HUGE); \
$(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) >> $(HUGE) )
endif
else # USE_MANUAL
# built-in manual has been disabled, make a blank file
$(HUGE):
$(HUGECMD)(echo "/* built-in manual is disabled, blank function */" > $(HUGE); \
echo '#include "tool_hugehelp.h"' >> $(HUGE); \
echo "void hugehelp(void) {}" >>$(HUGE) )
endif
# ignore tool_hugehelp.c since it is generated source code and it plays
# by slightly different rules!
checksrc:
$(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(srcdir) \
-W$(srcdir)/tool_hugehelp.c $(srcdir)/*.[ch])
if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
all-local: checksrc
endif
# disable the tests that are mostly causing false positives
TIDYFLAGS=-checks=-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-valist.Uninitialized,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-core.NullDereference
TIDY:=clang-tidy
tidy:
$(TIDY) $(CURL_CFILES) $(TIDYFLAGS) -- $(curl_CPPFLAGS) $(CPPFLAGS) -DHAVE_CONFIG_H