]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
autotools: tidy-ups in `src/Makefile.inc`
authorViktor Szakats <commit@vsz.me>
Fri, 6 Sep 2024 18:10:10 +0000 (20:10 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 19 Sep 2024 13:44:59 +0000 (15:44 +0200)
- move `EXTRA_DIST` to the top of file.
- move `checksrc` init next to use.
- use variable `HUGE` instead of repeating a literal.

Cherry-picked from #14815
Closes #14933

src/Makefile.am

index ebfb98c15b51bbf47f9e7c20393d5d6d1b5e8f32..55f348d745eb46ff7cfc50b0c0303f750d29db4d 100644 (file)
@@ -26,6 +26,9 @@ AUTOMAKE_OPTIONS = foreign nostdinc
 # remove targets if the command fails
 .DELETE_ON_ERROR:
 
+EXTRA_DIST = mk-file-embed.pl mkhelp.pl \
+ Makefile.mk curl.rc Makefile.inc CMakeLists.txt .checksrc
+
 # 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
@@ -84,11 +87,6 @@ libcurltool_la_LDFLAGS = -static $(LINKFLAGS)
 libcurltool_la_SOURCES = $(CURL_FILES)
 endif
 
-CLEANFILES = tool_hugehelp.c
-
-EXTRA_DIST = mk-file-embed.pl mkhelp.pl \
- Makefile.mk curl.rc Makefile.inc CMakeLists.txt .checksrc
-
 # Use absolute directory to disable VPATH
 ASCIIPAGE=$(top_builddir)/docs/cmdline-opts/curl.txt
 MKHELP=$(top_srcdir)/src/mkhelp.pl
@@ -99,11 +97,6 @@ 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
 AM_CPPFLAGS += -DUSE_MANUAL
@@ -134,6 +127,8 @@ $(HUGE):
        echo '#include "tool_hugehelp.h"' >> $(HUGE)
 endif
 
+CLEANFILES = $(HUGE)
+
 CA_EMBED_CSOURCE = tool_ca_embed.c
 CURL_CFILES += $(CA_EMBED_CSOURCE)
 CLEANFILES += $(CA_EMBED_CSOURCE)
@@ -147,6 +142,11 @@ $(CA_EMBED_CSOURCE):
        echo 'extern const void *curl_ca_embed; const void *curl_ca_embed;' > $(CA_EMBED_CSOURCE)
 endif
 
+CHECKSRC = $(CS_$(V))
+CS_0 = @echo "  RUN     " $@;
+CS_1 =
+CS_ = $(CS_0)
+
 # ignore generated C files since they play by slightly different rules!
 checksrc:
        $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \