From 671661849a8565657c8023860eb6ff62597229ff Mon Sep 17 00:00:00 2001 From: Cosmin Truta Date: Mon, 22 Jan 2024 15:16:10 +0200 Subject: [PATCH] build: Move scripts/*.m4 to scripts/autoconf/ Move all Autoconf macro files (except for those that need to be in the top-level directory) to their own subdirectory scripts/autoconf/ In this commit, we introduce a better way to organize the scripts dir, and we make a better separation between the build scripts under the libpng license vs. the build scripts that fall under other licenses. Please see scripts/autoconf/README.md for more information. --- Makefile.am | 6 +++--- Makefile.in | 16 ++++++++-------- aclocal.m4 | 10 +++++----- autogen.sh | 5 +++-- configure.ac | 4 ++-- scripts/autoconf/README.md | 7 +++++++ scripts/{ => autoconf}/libtool.m4 | 0 scripts/{ => autoconf}/ltoptions.m4 | 0 scripts/{ => autoconf}/ltsugar.m4 | 0 scripts/{ => autoconf}/ltversion.m4 | 0 scripts/{ => autoconf}/lt~obsolete.m4 | 0 11 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 scripts/autoconf/README.md rename scripts/{ => autoconf}/libtool.m4 (100%) rename scripts/{ => autoconf}/ltoptions.m4 (100%) rename scripts/{ => autoconf}/ltsugar.m4 (100%) rename scripts/{ => autoconf}/ltversion.m4 (100%) rename scripts/{ => autoconf}/lt~obsolete.m4 (100%) diff --git a/Makefile.am b/Makefile.am index 43ad6e2a1..1f06c703a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ # Makefile.am, the source file for Makefile.in (and hence Makefile), is # -# Copyright (c) 2018-2023 Cosmin Truta +# Copyright (c) 2018-2024 Cosmin Truta # Copyright (c) 2004-2016 Glenn Randers-Pehrson # # This code is released under the libpng license. @@ -9,7 +9,7 @@ PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ -ACLOCAL_AMFLAGS = -I scripts +ACLOCAL_AMFLAGS = -I scripts/autoconf # test programs - run on make check, make distcheck if ENABLE_TESTS @@ -183,7 +183,7 @@ pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc EXTRA_DIST= \ ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \ pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ - ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ + ${srcdir}/ci ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ $(TESTS) $(XFAIL_TESTS) tests/pngstest \ CMakeLists.txt example.c libpng-manual.txt diff --git a/Makefile.in b/Makefile.in index 337ea4e51..c9eac7dbc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,7 +16,7 @@ # Makefile.am, the source file for Makefile.in (and hence Makefile), is # -# Copyright (c) 2018-2023 Cosmin Truta +# Copyright (c) 2018-2024 Cosmin Truta # Copyright (c) 2004-2016 Glenn Randers-Pehrson # # This code is released under the libpng license. @@ -132,11 +132,11 @@ host_triplet = @host@ @DO_PNG_PREFIX_TRUE@am__append_12 = -DPNG_PREFIX='@PNG_PREFIX@' subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/scripts/libtool.m4 \ - $(top_srcdir)/scripts/ltoptions.m4 \ - $(top_srcdir)/scripts/ltsugar.m4 \ - $(top_srcdir)/scripts/ltversion.m4 \ - $(top_srcdir)/scripts/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/scripts/autoconf/libtool.m4 \ + $(top_srcdir)/scripts/autoconf/ltoptions.m4 \ + $(top_srcdir)/scripts/autoconf/ltsugar.m4 \ + $(top_srcdir)/scripts/autoconf/ltversion.m4 \ + $(top_srcdir)/scripts/autoconf/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -760,7 +760,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ -ACLOCAL_AMFLAGS = -I scripts +ACLOCAL_AMFLAGS = -I scripts/autoconf # This ensures that pnglibconf.h gets built at the start of 'make all' or # 'make check', but it does not add dependencies to the individual programs, @@ -851,7 +851,7 @@ pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc EXTRA_DIST = \ ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \ pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ - ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ + ${srcdir}/ci ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ $(TESTS) $(XFAIL_TESTS) tests/pngstest \ CMakeLists.txt example.c libpng-manual.txt diff --git a/aclocal.m4 b/aclocal.m4 index 89201a2d9..f01f23652 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1204,8 +1204,8 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([scripts/libtool.m4]) -m4_include([scripts/ltoptions.m4]) -m4_include([scripts/ltsugar.m4]) -m4_include([scripts/ltversion.m4]) -m4_include([scripts/lt~obsolete.m4]) +m4_include([scripts/autoconf/libtool.m4]) +m4_include([scripts/autoconf/ltoptions.m4]) +m4_include([scripts/autoconf/ltsugar.m4]) +m4_include([scripts/autoconf/ltversion.m4]) +m4_include([scripts/autoconf/lt~obsolete.m4]) diff --git a/autogen.sh b/autogen.sh index 9c8830a6e..4ac8f4b9e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -82,8 +82,9 @@ libpng_autotools_files="Makefile.in aclocal.m4 config.guess config.h.in libpng_autotools_extra="compile config.h.in~" # # These are separate because 'maintainer-clean' does not remove them. -libpng_libtool_files="scripts/libtool.m4 scripts/ltoptions.m4\ - scripts/ltsugar.m4 scripts/ltversion.m4 scripts/lt~obsolete.m4" +libpng_libtool_files="scripts/autoconf/libtool.m4 scripts/autoconf/ltoptions.m4\ + scripts/autoconf/ltsugar.m4 scripts/autoconf/ltversion.m4\ + scripts/autoconf/lt~obsolete.m4" libpng_autotools_dirs="autom4te.cache" # not required # diff --git a/configure.ac b/configure.ac index c485a6f34..ab117fd8f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # configure.ac -# Copyright (c) 2018-2023 Cosmin Truta +# Copyright (c) 2018-2024 Cosmin Truta # Copyright (c) 2004-2016 Glenn Randers-Pehrson # This code is released under the libpng license. @@ -26,7 +26,7 @@ AC_PREREQ([2.68]) dnl Version number stuff here: AC_INIT([libpng],[1.6.41.git],[png-mng-implement@lists.sourceforge.net]) -AC_CONFIG_MACRO_DIR([scripts]) +AC_CONFIG_MACRO_DIR([scripts/autoconf]) # libpng does not follow GNU file name conventions (hence 'foreign') # color-tests requires automake 1.11 or later diff --git a/scripts/autoconf/README.md b/scripts/autoconf/README.md new file mode 100644 index 000000000..64963b736 --- /dev/null +++ b/scripts/autoconf/README.md @@ -0,0 +1,7 @@ +Autoconf Macro Files for the PNG Reference Library +================================================== + +The Autoconf files associated with libpng are free software. +Use, modification and distribution of each individual file +are subject to the specific licensing terms and conditions +stated at the top of the file. diff --git a/scripts/libtool.m4 b/scripts/autoconf/libtool.m4 similarity index 100% rename from scripts/libtool.m4 rename to scripts/autoconf/libtool.m4 diff --git a/scripts/ltoptions.m4 b/scripts/autoconf/ltoptions.m4 similarity index 100% rename from scripts/ltoptions.m4 rename to scripts/autoconf/ltoptions.m4 diff --git a/scripts/ltsugar.m4 b/scripts/autoconf/ltsugar.m4 similarity index 100% rename from scripts/ltsugar.m4 rename to scripts/autoconf/ltsugar.m4 diff --git a/scripts/ltversion.m4 b/scripts/autoconf/ltversion.m4 similarity index 100% rename from scripts/ltversion.m4 rename to scripts/autoconf/ltversion.m4 diff --git a/scripts/lt~obsolete.m4 b/scripts/autoconf/lt~obsolete.m4 similarity index 100% rename from scripts/lt~obsolete.m4 rename to scripts/autoconf/lt~obsolete.m4