Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefile: make checksrc and hugefile commands "silent" #3681

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions docs/examples/Makefile.am
Expand Up @@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2019, 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
Expand Down Expand Up @@ -61,5 +61,10 @@ include Makefile.inc

all: $(check_PROGRAMS)

CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
CS_1 =
CS_ = $(CS_0)

checksrc:
@PERL@ $(top_srcdir)/lib/checksrc.pl -ASNPRINTF $(srcdir)/*.c
$(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl -ASNPRINTF $(srcdir)/*.c)
9 changes: 7 additions & 2 deletions include/curl/Makefile.am
Expand Up @@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2019, 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
Expand All @@ -25,8 +25,13 @@ pkginclude_HEADERS = \

pkgincludedir= $(includedir)/curl

CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
CS_1 =
CS_ = $(CS_0)

checksrc:
@@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/include/curl $(pkginclude_HEADERS)
$(CHECKSRC)@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/include/curl $(pkginclude_HEADERS)

if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
Expand Down
9 changes: 7 additions & 2 deletions lib/Makefile.am
Expand Up @@ -131,9 +131,14 @@ include Makefile.inc
libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)

CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
CS_1 =
CS_ = $(CS_0)

checksrc:
@PERL@ $(srcdir)/checksrc.pl -D$(srcdir) -W$(srcdir)/curl_config.h \
$(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] $(srcdir)/vtls/*.[ch]
$(CHECKSRC)(@PERL@ $(srcdir)/checksrc.pl -D$(srcdir) -W$(srcdir)/curl_config.h \
$(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] $(srcdir)/vtls/*.[ch])

if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
Expand Down
36 changes: 23 additions & 13 deletions src/Makefile.am
Expand Up @@ -94,6 +94,16 @@ 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

Expand All @@ -104,32 +114,32 @@ if HAVE_LIBZ
# This generates the tool_hugehelp.c file in both uncompressed and
# compressed formats.
$(HUGE): $(MANPAGE) $(MKHELP)
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)
$(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)
echo '#include "tool_setup.h"' > $(HUGE)
$(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) >> $(HUGE)
$(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):
echo "/* built-in manual is disabled, blank function */" > $(HUGE)
echo '#include "tool_hugehelp.h"' >> $(HUGE)
echo "void hugehelp(void) {}" >>$(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:
@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(srcdir) \
-W$(srcdir)/tool_hugehelp.c $(srcdir)/*.[ch]
$(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
Expand Down
9 changes: 7 additions & 2 deletions tests/libtest/Makefile.am
Expand Up @@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2019, 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
Expand Down Expand Up @@ -131,8 +131,13 @@ endif
lib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl $(top_srcdir)/include/curl/curl.h
@PERL@ $(top_srcdir)/tests/libtest/mk-lib1521.pl < $(top_srcdir)/include/curl/curl.h > lib1521.c

CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
CS_1 =
CS_ = $(CS_0)

checksrc:
@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
$(CHECKSRC)@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c

if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
Expand Down
9 changes: 7 additions & 2 deletions tests/server/Makefile.am
Expand Up @@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2019, 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
Expand Down Expand Up @@ -56,8 +56,13 @@ include Makefile.inc

EXTRA_DIST = base64.pl Makefile.inc CMakeLists.txt

CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
CS_1 =
CS_ = $(CS_0)

checksrc:
@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
$(CHECKSRC)@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c

if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
Expand Down
9 changes: 7 additions & 2 deletions tests/unit/Makefile.am
Expand Up @@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2019, 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
Expand Down Expand Up @@ -64,8 +64,13 @@ AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS
# Makefile.inc provides neat definitions
include Makefile.inc

CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
CS_1 =
CS_ = $(CS_0)

checksrc:
@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
$(CHECKSRC)@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c

if BUILD_UNITTESTS
noinst_PROGRAMS = $(UNITPROGS)
Expand Down