From 3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:07 +0200 Subject: Merging upstream version 6.7. Signed-off-by: Daniel Baumann --- share/mk/configure/build-depends/bsdextrautils.mk | 18 ++++++ share/mk/configure/build-depends/bzip2.mk | 15 +++++ share/mk/configure/build-depends/cc.mk | 63 ++++++++++++++++++++ share/mk/configure/build-depends/checkpatch.mk | 19 ++++++ share/mk/configure/build-depends/clang-tidy.mk | 22 +++++++ share/mk/configure/build-depends/clang.mk | 19 ++++++ share/mk/configure/build-depends/coreutils.mk | 32 ++++++++++ share/mk/configure/build-depends/cpp.mk | 20 +++++++ share/mk/configure/build-depends/cppcheck.mk | 24 ++++++++ share/mk/configure/build-depends/cpplint.mk | 19 ++++++ share/mk/configure/build-depends/diffoscope.mk | 12 ++++ share/mk/configure/build-depends/findutils.mk | 13 ++++ share/mk/configure/build-depends/git.mk | 12 ++++ share/mk/configure/build-depends/grep.mk | 12 ++++ share/mk/configure/build-depends/groff-base.mk | 72 +++++++++++++++++++++++ share/mk/configure/build-depends/groff.mk | 21 +++++++ share/mk/configure/build-depends/gzip.mk | 15 +++++ share/mk/configure/build-depends/iwyu.mk | 17 ++++++ share/mk/configure/build-depends/ld.mk | 50 ++++++++++++++++ share/mk/configure/build-depends/libc-bin.mk | 12 ++++ share/mk/configure/build-depends/lzip.mk | 15 +++++ share/mk/configure/build-depends/man.mk | 12 ++++ share/mk/configure/build-depends/mandoc.mk | 15 +++++ share/mk/configure/build-depends/moreutils.mk | 12 ++++ share/mk/configure/build-depends/pkgconf.mk | 27 +++++++++ share/mk/configure/build-depends/sed.mk | 12 ++++ share/mk/configure/build-depends/tar.mk | 22 +++++++ share/mk/configure/build-depends/xz-utils.mk | 15 +++++ share/mk/configure/directory_variables.mk | 29 +++++++++ share/mk/configure/link_pages.mk | 18 ++++++ share/mk/configure/src.mk | 16 +++++ share/mk/configure/verbose.mk | 12 ++++ share/mk/configure/version.mk | 43 ++++++++++++++ share/mk/configure/xfail.mk | 18 ++++++ share/mk/configure/z.mk | 21 +++++++ 35 files changed, 774 insertions(+) create mode 100644 share/mk/configure/build-depends/bsdextrautils.mk create mode 100644 share/mk/configure/build-depends/bzip2.mk create mode 100644 share/mk/configure/build-depends/cc.mk create mode 100644 share/mk/configure/build-depends/checkpatch.mk create mode 100644 share/mk/configure/build-depends/clang-tidy.mk create mode 100644 share/mk/configure/build-depends/clang.mk create mode 100644 share/mk/configure/build-depends/coreutils.mk create mode 100644 share/mk/configure/build-depends/cpp.mk create mode 100644 share/mk/configure/build-depends/cppcheck.mk create mode 100644 share/mk/configure/build-depends/cpplint.mk create mode 100644 share/mk/configure/build-depends/diffoscope.mk create mode 100644 share/mk/configure/build-depends/findutils.mk create mode 100644 share/mk/configure/build-depends/git.mk create mode 100644 share/mk/configure/build-depends/grep.mk create mode 100644 share/mk/configure/build-depends/groff-base.mk create mode 100644 share/mk/configure/build-depends/groff.mk create mode 100644 share/mk/configure/build-depends/gzip.mk create mode 100644 share/mk/configure/build-depends/iwyu.mk create mode 100644 share/mk/configure/build-depends/ld.mk create mode 100644 share/mk/configure/build-depends/libc-bin.mk create mode 100644 share/mk/configure/build-depends/lzip.mk create mode 100644 share/mk/configure/build-depends/man.mk create mode 100644 share/mk/configure/build-depends/mandoc.mk create mode 100644 share/mk/configure/build-depends/moreutils.mk create mode 100644 share/mk/configure/build-depends/pkgconf.mk create mode 100644 share/mk/configure/build-depends/sed.mk create mode 100644 share/mk/configure/build-depends/tar.mk create mode 100644 share/mk/configure/build-depends/xz-utils.mk create mode 100644 share/mk/configure/directory_variables.mk create mode 100644 share/mk/configure/link_pages.mk create mode 100644 share/mk/configure/src.mk create mode 100644 share/mk/configure/verbose.mk create mode 100644 share/mk/configure/version.mk create mode 100644 share/mk/configure/xfail.mk create mode 100644 share/mk/configure/z.mk (limited to 'share/mk/configure') diff --git a/share/mk/configure/build-depends/bsdextrautils.mk b/share/mk/configure/build-depends/bsdextrautils.mk new file mode 100644 index 0000000..347e4bc --- /dev/null +++ b/share/mk/configure/build-depends/bsdextrautils.mk @@ -0,0 +1,18 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_BSDEXTRAUTILS_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_BSDEXTRAUTILS_INCLUDED := 1 + + +DEFAULT_COLFLAGS := \ + -b \ + -p \ + -x +EXTRA_COLFLAGS := +COLFLAGS := $(DEFAULT_COLFLAGS) $(EXTRA_COLFLAGS) +COL := col + + +endif # include guard diff --git a/share/mk/configure/build-depends/bzip2.mk b/share/mk/configure/build-depends/bzip2.mk new file mode 100644 index 0000000..71e6366 --- /dev/null +++ b/share/mk/configure/build-depends/bzip2.mk @@ -0,0 +1,15 @@ +# Copyright 2023-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_BZIP2_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_BZIP2_INCLUDED := 1 + + +DEFAULT_BZIP2FLAGS := +EXTRA_BZIP2FLAGS := +BZIP2FLAGS := $(DEFAULT_BZIP2FLAGS) $(EXTRA_BZIP2FLAGS) +BZIP2 := bzip2 + + +endif # include guard diff --git a/share/mk/configure/build-depends/cc.mk b/share/mk/configure/build-depends/cc.mk new file mode 100644 index 0000000..85470a4 --- /dev/null +++ b/share/mk/configure/build-depends/cc.mk @@ -0,0 +1,63 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CC_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_CC_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk +include $(MAKEFILEDIR)/configure/build-depends/grep.mk +include $(MAKEFILEDIR)/configure/build-depends/sed.mk + + +CC := gcc + + +CC_VENDOR := \ + $(shell \ + $(CC) -v 2>&1 \ + | $(SED) -n '1p;$$p' \ + | $(SED) '/gcc version/s/.*/gcc/' \ + | $(SED) '/clang version/s/.*/clang/' \ + | $(SED) '/Apple LLVM version/s/.*/clang/' \ + | $(GREP) -e '^gcc$$' -e '^clang$$' \ + || $(ECHO) unknown; \ + ) + + +COMMON_CFLAGS := \ + -O3 \ + -flto \ + -Wall \ + -Wextra \ + -Werror \ + -Wstrict-prototypes \ + -Wdeclaration-after-statement \ + -Wno-error=unused-parameter \ + -Wno-error=sign-compare \ + -Wno-error=format \ + -Wno-error=uninitialized + + +GCC_CFLAGS := -fanalyzer + + +CLANG_CFLAGS := \ + -Weverything \ + -Wno-unsafe-buffer-usage + + +DEFAULT_CFLAGS := $(COMMON_CFLAGS) + +ifeq ($(CC_VENDOR),gcc) +DEFAULT_CFLAGS += $(GCC_CFLAGS) +else ifeq ($(CC_VENDOR),clang) +DEFAULT_CFLAGS += $(CLANG_CFLAGS) +endif + +EXTRA_CFLAGS := +CFLAGS := $(DEFAULT_CFLAGS) $(EXTRA_CFLAGS) + + +endif # include guard diff --git a/share/mk/configure/build-depends/checkpatch.mk b/share/mk/configure/build-depends/checkpatch.mk new file mode 100644 index 0000000..0b29d9f --- /dev/null +++ b/share/mk/configure/build-depends/checkpatch.mk @@ -0,0 +1,19 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CHECKPATCH_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_CHECKPATCH_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/src.mk + + +CHECKPATCH_CONF := $(SYSCONFDIR)/checkpatch/checkpatch.conf +DEFAULT_CHECKPATCHFLAGS := +EXTRA_CHECKPATCHFLAGS := +CHECKPATCHFLAGS := $(DEFAULT_CHECKPATCHFLAGS) $(EXTRA_CHECKPATCHFLAGS) +CHECKPATCH := checkpatch + + +endif # include guard diff --git a/share/mk/configure/build-depends/clang-tidy.mk b/share/mk/configure/build-depends/clang-tidy.mk new file mode 100644 index 0000000..2d818f9 --- /dev/null +++ b/share/mk/configure/build-depends/clang-tidy.mk @@ -0,0 +1,22 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_TIDY_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_TIDY_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/src.mk + + +CLANG_TIDY_CONF := $(SYSCONFDIR)/clang-tidy/config.yaml +DEFAULT_CLANG_TIDYFLAGS := \ + --config-file=$(CLANG_TIDY_CONF) \ + --quiet \ + --use-color +EXTRA_CLANG_TIDYFLAGS := +CLANG_TIDYFLAGS := $(DEFAULT_CLANG_TIDYFLAGS) $(EXTRA_CLANG_TIDYFLAGS) +CLANG_TIDY := clang-tidy + + +endif # include guard diff --git a/share/mk/configure/build-depends/clang.mk b/share/mk/configure/build-depends/clang.mk new file mode 100644 index 0000000..b44ccb5 --- /dev/null +++ b/share/mk/configure/build-depends/clang.mk @@ -0,0 +1,19 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_CLANG_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/build-depends/cc.mk + + +DEFAULT_CLANGFLAGS := \ + $(COMMON_CFLAGS) \ + $(CLANG_CFLAGS) +EXTRA_CLANGFLAGS := +CLANGFLAGS := $(DEFAULT_CLANGFLAGS) $(EXTRA_CLANGFLAGS) + + +endif # include guard diff --git a/share/mk/configure/build-depends/coreutils.mk b/share/mk/configure/build-depends/coreutils.mk new file mode 100644 index 0000000..2fe97fe --- /dev/null +++ b/share/mk/configure/build-depends/coreutils.mk @@ -0,0 +1,32 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_COREUTILS_INCLUDED := 1 + + +CAT := cat +CP := cp +ECHO := echo +EXPR := expr +HEAD := head +INSTALL := install +LN := ln +MKDIR := mkdir +REALPATH := realpath +RM := rm +SORT := sort +STAT := stat +TAC := tac +TAIL := tail +TEST := test +TOUCH := touch +TRUE := true + + +INSTALL_DATA := $(INSTALL) -m 644 +INSTALL_DIR := $(INSTALL) -m 755 -d + + +endif # include guard diff --git a/share/mk/configure/build-depends/cpp.mk b/share/mk/configure/build-depends/cpp.mk new file mode 100644 index 0000000..b720898 --- /dev/null +++ b/share/mk/configure/build-depends/cpp.mk @@ -0,0 +1,20 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPP_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPP_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/build-depends/cc.mk +include $(MAKEFILEDIR)/configure/build-depends/pkgconf.mk +include $(MAKEFILEDIR)/configure/verbose.mk + + +DEFAULT_CPPFLAGS := $(shell $(PKGCONF_CMD) --cflags $(PKGCONF_LIBS) $(HIDE_ERR)) +EXTRA_CPPFLAGS := +CPPFLAGS := $(DEFAULT_CPPFLAGS) $(EXTRA_CPPFLAGS) +CPP := $(CC) $(CFLAGS) -E + + +endif # include guard diff --git a/share/mk/configure/build-depends/cppcheck.mk b/share/mk/configure/build-depends/cppcheck.mk new file mode 100644 index 0000000..93a9b75 --- /dev/null +++ b/share/mk/configure/build-depends/cppcheck.mk @@ -0,0 +1,24 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPCHECK_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPCHECK_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/src.mk + + +CPPCHECK_SUPPRESS := $(SYSCONFDIR)/cppcheck/cppcheck.suppress +DEFAULT_CPPCHECKFLAGS := \ + --enable=all \ + --error-exitcode=2 \ + --inconclusive \ + --quiet \ + --suppressions-list=$(CPPCHECK_SUPPRESS) +EXTRA_CPPCHECKFLAGS := +CPPCHECKFLAGS := $(DEFAULT_CPPCHECKFLAGS) $(EXTRA_CPPCHECKFLAGS) +CPPCHECK := cppcheck + + +endif # include guard diff --git a/share/mk/configure/build-depends/cpplint.mk b/share/mk/configure/build-depends/cpplint.mk new file mode 100644 index 0000000..586d646 --- /dev/null +++ b/share/mk/configure/build-depends/cpplint.mk @@ -0,0 +1,19 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPLINT_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_CPPLINT_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/src.mk + + +CPPLINT_CONF := $(SYSCONFDIR)/cpplint/cpplint.cfg +DEFAULT_CPPLINTFLAGS := +EXTRA_CPPLINTFLAGS := +CPPLINTFLAGS := $(DEFAULT_CPPLINTFLAGS) $(EXTRA_CPPLINTFLAGS) +CPPLINT := cpplint + + +endif # include guard diff --git a/share/mk/configure/build-depends/diffoscope.mk b/share/mk/configure/build-depends/diffoscope.mk new file mode 100644 index 0000000..a9e48b3 --- /dev/null +++ b/share/mk/configure/build-depends/diffoscope.mk @@ -0,0 +1,12 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_DIFFOSCOPE_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_DIFFOSCOPE_INCLUDED := 1 + + +DIFFOSCOPE := diffoscope + + +endif # include guard diff --git a/share/mk/configure/build-depends/findutils.mk b/share/mk/configure/build-depends/findutils.mk new file mode 100644 index 0000000..536f921 --- /dev/null +++ b/share/mk/configure/build-depends/findutils.mk @@ -0,0 +1,13 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_FINDUTILS_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_FINDUTILS_INCLUDED := 1 + + +FIND := find +XARGS := xargs + + +endif # include guard diff --git a/share/mk/configure/build-depends/git.mk b/share/mk/configure/build-depends/git.mk new file mode 100644 index 0000000..a861bed --- /dev/null +++ b/share/mk/configure/build-depends/git.mk @@ -0,0 +1,12 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GIT_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_GIT_INCLUDED := 1 + + +GIT := git + + +endif # include guard diff --git a/share/mk/configure/build-depends/grep.mk b/share/mk/configure/build-depends/grep.mk new file mode 100644 index 0000000..7d89691 --- /dev/null +++ b/share/mk/configure/build-depends/grep.mk @@ -0,0 +1,12 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GREP_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_GREP_INCLUDED := 1 + + +GREP := grep + + +endif # include guard diff --git a/share/mk/configure/build-depends/groff-base.mk b/share/mk/configure/build-depends/groff-base.mk new file mode 100644 index 0000000..ab1f98d --- /dev/null +++ b/share/mk/configure/build-depends/groff-base.mk @@ -0,0 +1,72 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_BASE_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk +include $(MAKEFILEDIR)/configure/build-depends/grep.mk +include $(MAKEFILEDIR)/configure/build-depends/libc-bin.mk +include $(MAKEFILEDIR)/configure/build-depends/man.mk + + +DEFAULT_PRECONVFLAGS := +EXTRA_PRECONVFLAGS := +PRECONVFLAGS := $(DEFAULT_PRECONVFLAGS) $(EXTRA_PRECONVFLAGS) +PRECONV := preconv + + +DEFAULT_PICFLAGS := +EXTRA_PICFLAGS := +PICFLAGS := $(DEFAULT_PICFLAGS) $(EXTRA_PICFLAGS) +PIC := pic + + +TBL := tbl + + +DEFAULT_EQNFLAGS := +EXTRA_EQNFLAGS := +EQNFLAGS := $(DEFAULT_EQNFLAGS) $(EXTRA_EQNFLAGS) +EQN := eqn + + +DEFAULT_TROFFFLAGS := -wbreak +EXTRA_TROFFFLAGS := +TROFFFLAGS := $(DEFAULT_TROFFFLAGS) $(EXTRA_TROFFFLAGS) +TROFF := troff + + +TROFF_CHECKSTYLE_LVL := 3 +NROFF_LINE_LENGTH := $(shell $(EXPR) $(MANWIDTH) - 2) +NROFF_OUT_DEVICE := \ + $(shell $(LOCALE) charmap \ + | $(GREP) -i 'utf-*8' >/dev/null \ + && $(ECHO) utf8 \ + || $(ECHO) ascii \ + ) + +DEFAULT_NROFFFLAGS := \ + -T$(NROFF_OUT_DEVICE) \ + -rLL=$(NROFF_LINE_LENGTH)n \ + -rCHECKSTYLE=$(TROFF_CHECKSTYLE_LVL) \ + -ww +EXTRA_NROFFFLAGS := +NROFFFLAGS := $(DEFAULT_NROFFFLAGS) $(EXTRA_NROFFFLAGS) + + +DEFAULT_GROTTYFLAGS := -c +EXTRA_GROTTYFLAGS := +GROTTYFLAGS := $(DEFAULT_GROTTYFLAGS) $(EXTRA_GROTTYFLAGS) +GROTTY := grotty + + +DEFAULT_GROPSFLAGS := +EXTRA_GROPSFLAGS := +GROPSFLAGS := $(DEFAULT_GROPSFLAGS) $(EXTRA_GROPSFLAGS) +GROPS := grops + + +endif # include guard diff --git a/share/mk/configure/build-depends/groff.mk b/share/mk/configure/build-depends/groff.mk new file mode 100644 index 0000000..ea0c7a3 --- /dev/null +++ b/share/mk/configure/build-depends/groff.mk @@ -0,0 +1,21 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_GROFF_INCLUDED := 1 + + +DEFAULT_GROPDFFLAGS := +EXTRA_GROPDFFLAGS := +GROPDFFLAGS := $(DEFAULT_GROPDFFLAGS) $(EXTRA_GROPDFFLAGS) +GROPDF := gropdf + + +DEFAULT_POST_GROHTMLFLAGS := +EXTRA_POST_GROHTMLFLAGS := +POST_GROHTMLFLAGS := $(DEFAULT_POST_GROHTMLFLAGS) $(EXTRA_POST_GROHTMLFLAGS) +POST_GROHTML := post-grohtml + + +endif # include guard diff --git a/share/mk/configure/build-depends/gzip.mk b/share/mk/configure/build-depends/gzip.mk new file mode 100644 index 0000000..6633654 --- /dev/null +++ b/share/mk/configure/build-depends/gzip.mk @@ -0,0 +1,15 @@ +# Copyright 2023-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_GZIP_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_GZIP_INCLUDED := 1 + + +DEFAULT_GZIPFLAGS := -n +EXTRA_GZIPFLAGS := +GZIPFLAGS := $(DEFAULT_GZIPFLAGS) $(EXTRA_GZIPFLAGS) +GZIP := gzip + + +endif # include guard diff --git a/share/mk/configure/build-depends/iwyu.mk b/share/mk/configure/build-depends/iwyu.mk new file mode 100644 index 0000000..bd5cf7f --- /dev/null +++ b/share/mk/configure/build-depends/iwyu.mk @@ -0,0 +1,17 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_IWYU_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_IWYU_INCLUDED := 1 + + +DEFAULT_IWYUFLAGS := \ + -Xiwyu --no_fwd_decls \ + -Xiwyu --error +EXTRA_IWYUFLAGS := +IWYUFLAGS := $(DEFAULT_IWYUFLAGS) $(EXTRA_IWYUFLAGS) +IWYU := iwyu + + +endif # include guard diff --git a/share/mk/configure/build-depends/ld.mk b/share/mk/configure/build-depends/ld.mk new file mode 100644 index 0000000..a78a189 --- /dev/null +++ b/share/mk/configure/build-depends/ld.mk @@ -0,0 +1,50 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_LD_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_LD_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/build-depends/cc.mk +include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk +include $(MAKEFILEDIR)/configure/build-depends/pkgconf.mk +include $(MAKEFILEDIR)/configure/verbose.mk + + +LD := $(CC) $(CFLAGS) + + +LD_HAS_FUSE_LINKER_PLUGIN := \ + $(shell \ + $(ECHO) 'int main(void) {}' \ + | $(LD) -fuse-linker-plugin -x c -o /dev/null /dev/stdin $(HIDE_ERR) \ + && $(ECHO) yes \ + || $(ECHO) no; \ + ) + + +DEFAULT_LDFLAGS := \ + -Wl,--as-needed \ + -Wl,--no-allow-shlib-undefined \ + -Wl,--no-copy-dt-needed-entries \ + -Wl,--no-undefined \ + $(shell $(PKGCONF_CMD) --libs-only-L $(PKGCONF_LIBS) $(HIDE_ERR)) \ + $(shell $(PKGCONF_CMD) --libs-only-other $(PKGCONF_LIBS) $(HIDE_ERR)) + +ifeq ($(LD_HAS_FUSE_LINKER_PLUGIN),yes) +DEFAULT_LDFLAGS += -fuse-linker-plugin +endif + +EXTRA_LDFLAGS := +LDFLAGS := $(DEFAULT_LDFLAGS) $(EXTRA_LDFLAGS) + + +DEFAULT_LDLIBS := \ + -lc \ + $(shell $(PKGCONF_CMD) --libs-only-l $(PKGCONF_LIBS) $(HIDE_ERR)) +EXTRA_LDLIBS := +LDLIBS := $(DEFAULT_LDLIBS) $(EXTRA_LDLIBS) + + +endif # include guard diff --git a/share/mk/configure/build-depends/libc-bin.mk b/share/mk/configure/build-depends/libc-bin.mk new file mode 100644 index 0000000..281502b --- /dev/null +++ b/share/mk/configure/build-depends/libc-bin.mk @@ -0,0 +1,12 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_LIBC_BIN_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_LIBC_BIN_INCLUDED := 1 + + +LOCALE := locale + + +endif # include guard diff --git a/share/mk/configure/build-depends/lzip.mk b/share/mk/configure/build-depends/lzip.mk new file mode 100644 index 0000000..e18868f --- /dev/null +++ b/share/mk/configure/build-depends/lzip.mk @@ -0,0 +1,15 @@ +# Copyright 2023-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_LZIP_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_LZIP_INCLUDED := 1 + + +DEFAULT_LZIPFLAGS := +EXTRA_LZIPFLAGS := +LZIPFLAGS := $(DEFAULT_LZIPFLAGS) $(EXTRA_LZIPFLAGS) +LZIP := lzip + + +endif # include guard diff --git a/share/mk/configure/build-depends/man.mk b/share/mk/configure/build-depends/man.mk new file mode 100644 index 0000000..5248d42 --- /dev/null +++ b/share/mk/configure/build-depends/man.mk @@ -0,0 +1,12 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_MAN_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_MAN_INCLUDED := 1 + + +MANWIDTH ?= 80 + + +endif # include guard diff --git a/share/mk/configure/build-depends/mandoc.mk b/share/mk/configure/build-depends/mandoc.mk new file mode 100644 index 0000000..87eccd6 --- /dev/null +++ b/share/mk/configure/build-depends/mandoc.mk @@ -0,0 +1,15 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_MANDOC_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_MANDOC_INCLUDED := 1 + + +DEFAULT_MANDOCFLAGS := -Tlint +EXTRA_MANDOCFLAGS := +MANDOCFLAGS := $(DEFAULT_MANDOCFLAGS) $(EXTRA_MANDOCFLAGS) +MANDOC := mandoc + + +endif # include guard diff --git a/share/mk/configure/build-depends/moreutils.mk b/share/mk/configure/build-depends/moreutils.mk new file mode 100644 index 0000000..69b60fa --- /dev/null +++ b/share/mk/configure/build-depends/moreutils.mk @@ -0,0 +1,12 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_MOREUTILS_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_MOREUTILS_INCLUDED := 1 + + +SPONGE := sponge + + +endif # include guard diff --git a/share/mk/configure/build-depends/pkgconf.mk b/share/mk/configure/build-depends/pkgconf.mk new file mode 100644 index 0000000..b7b5c3f --- /dev/null +++ b/share/mk/configure/build-depends/pkgconf.mk @@ -0,0 +1,27 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_PKGCONF_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_PKGCONF_INCLUDED := 1 + + +include $(MAKEFILEDIR)/src.mk +include $(MAKEFILEDIR)/configure/version.mk + + +# Compat +PKG_CONFIG := pkgconf + + +DEFAULT_PKGCONFFLAGS := +EXTRA_PKGCONFFLAGS := +PKGCONFFLAGS := $(DEFAULT_PKGCONFFLAGS) $(EXTRA_PKGCONFFLAGS) +PKGCONF := $(PKG_CONFIG) +PKGCONF_CMD := $(PKGCONF) $(PKGCONFFLAGS) + + +PKGCONF_LIBS := libbsd-overlay + + +endif # include guard diff --git a/share/mk/configure/build-depends/sed.mk b/share/mk/configure/build-depends/sed.mk new file mode 100644 index 0000000..3d1fcd8 --- /dev/null +++ b/share/mk/configure/build-depends/sed.mk @@ -0,0 +1,12 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_SED_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_SED_INCLUDED := 1 + + +SED := sed + + +endif # include guard diff --git a/share/mk/configure/build-depends/tar.mk b/share/mk/configure/build-depends/tar.mk new file mode 100644 index 0000000..3ea5537 --- /dev/null +++ b/share/mk/configure/build-depends/tar.mk @@ -0,0 +1,22 @@ +# Copyright 2021-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_TAR_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_TAR_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/version.mk + + +DEFAULT_TARFLAGS := \ + --sort=name \ + --owner=root:0 \ + --group=root:0 \ + --mtime='$(DISTDATE)' +EXTRA_TARFLAGS := +TARFLAGS := $(DEFAULT_TARFLAGS) $(EXTRA_TARFLAGS) +TAR := tar + + +endif # include guard diff --git a/share/mk/configure/build-depends/xz-utils.mk b/share/mk/configure/build-depends/xz-utils.mk new file mode 100644 index 0000000..d00a3b7 --- /dev/null +++ b/share/mk/configure/build-depends/xz-utils.mk @@ -0,0 +1,15 @@ +# Copyright 2023-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_BUILD_DEPENDS_XZ_UTILS_INCLUDED +MAKEFILE_CONFIGURE_BUILD_DEPENDS_XZ_UTILS_INCLUDED := 1 + + +DEFAULT_XZFLAGS := +EXTRA_XZFLAGS := +XZFLAGS := $(DEFAULT_XZFLAGS) $(EXTRA_XZFLAGS) +XZ := xz + + +endif # include guard diff --git a/share/mk/configure/directory_variables.mk b/share/mk/configure/directory_variables.mk new file mode 100644 index 0000000..e4ee616 --- /dev/null +++ b/share/mk/configure/directory_variables.mk @@ -0,0 +1,29 @@ +# Copyright 2021-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_DIRECTORY_VARIABLES_INCLUDED +MAKEFILE_CONFIGURE_DIRECTORY_VARIABLES_INCLUDED := 1 + + +include $(MAKEFILEDIR)/src.mk + + +builddir := .tmp + + +DESTDIR := +prefix := /usr/local +datarootdir := $(prefix)/share +docdir := $(datarootdir)/doc +htmldir := $(docdir)/html/man +mandir := $(datarootdir)/man + + +$(foreach s, $(MANSECTIONS), \ + $(eval man$(s)dir := $(mandir)/man$(s))) +$(foreach s, $(MANSECTIONS), \ + $(eval man$(s)ext := .$(s))) + + +endif # include guard diff --git a/share/mk/configure/link_pages.mk b/share/mk/configure/link_pages.mk new file mode 100644 index 0000000..52136ef --- /dev/null +++ b/share/mk/configure/link_pages.mk @@ -0,0 +1,18 @@ +# Copyright 2023-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_LINK_PAGES_INCLUDED +MAKEFILE_CONFIGURE_LINK_PAGES_INCLUDED := 1 + + +LINK_PAGES := .so +ifeq ($(LINK_PAGES),.so) +else ifeq ($(LINK_PAGES),symlink) +else +$(warning "LINK_PAGES": "$(LINK_PAGES)") +$(error Valid values for "LINK_PAGES": [".so", "symlink"]) +endif + + +endif # include guard diff --git a/share/mk/configure/src.mk b/share/mk/configure/src.mk new file mode 100644 index 0000000..2a24f4e --- /dev/null +++ b/share/mk/configure/src.mk @@ -0,0 +1,16 @@ +# Copyright 2021-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_SRC_INCLUDED +MAKEFILE_CONFIGURE_SRC_INCLUDED := 1 + + +SYSCONFDIR := $(srcdir)/etc +MANDIR := $(srcdir) + + +MANSECTIONS := $(patsubst $(MANDIR)/man%/, %, $(wildcard $(MANDIR)/man*/)) + + +endif # include guard diff --git a/share/mk/configure/verbose.mk b/share/mk/configure/verbose.mk new file mode 100644 index 0000000..d6372db --- /dev/null +++ b/share/mk/configure/verbose.mk @@ -0,0 +1,12 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_VERBOSE_INCLUDED +MAKEFILE_CONFIGURE_VERBOSE_INCLUDED := 1 + + +HIDE_ERR := 2>/dev/null + + +endif # include guard diff --git a/share/mk/configure/version.mk b/share/mk/configure/version.mk new file mode 100644 index 0000000..cc89bae --- /dev/null +++ b/share/mk/configure/version.mk @@ -0,0 +1,43 @@ +# Copyright 2022-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_VERSION_INCLUDED +MAKEFILE_CONFIGURE_VERSION_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk +include $(MAKEFILEDIR)/configure/build-depends/findutils.mk +include $(MAKEFILEDIR)/configure/build-depends/git.mk +include $(MAKEFILEDIR)/configure/build-depends/grep.mk +include $(MAKEFILEDIR)/configure/verbose.mk + + +DISTNAME := man-pages-6.7 +DISTVERSION := 6.7 + + +DISTFILESCMD := \ + $(FIND) $(srcdir) -not -type d \ + | $(GREP) -v '^$(srcdir)/.git$$' \ + | $(GREP) -v '^$(srcdir)/.git/' \ + | $(GREP) -v '^$(srcdir)/.tmp/' \ + | $(GREP) -v '^$(srcdir)/.checkpatch-camelcase.' \ + | $(SORT) + +DISTDATECMD := \ + $(ECHO) '$(DISTVERSION)' \ + | if $(GREP) -- '-dirty$$' >/dev/null; then \ + $(DISTFILESCMD) \ + | $(XARGS) $(STAT) -c %y \ + | $(SORT) -n \ + | $(TAIL) -n1; \ + else \ + $(GIT) log -1 --format='%cD'; \ + fi; + + +DISTDATE := Tue, 19 Mar 2024 19:07:13 +0100 + + +endif # include guard diff --git a/share/mk/configure/xfail.mk b/share/mk/configure/xfail.mk new file mode 100644 index 0000000..44e4ede --- /dev/null +++ b/share/mk/configure/xfail.mk @@ -0,0 +1,18 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_XFAIL_INCLUDED +MAKEFILE_CONFIGURE_XFAIL_INCLUDED := 1 + + +SKIP_XFAIL := yes +ifeq ($(SKIP_XFAIL),yes) +else ifeq ($(SKIP_XFAIL),no) +else +$(warning "SKIP_XFAIL": "$(SKIP_XFAIL)") +$(error Valid values for "SKIP_XFAIL": ["yes", "no"]) +endif + + +endif # include guard diff --git a/share/mk/configure/z.mk b/share/mk/configure/z.mk new file mode 100644 index 0000000..2eec437 --- /dev/null +++ b/share/mk/configure/z.mk @@ -0,0 +1,21 @@ +# Copyright 2023-2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_CONFIGURE_Z_INCLUDED +MAKEFILE_CONFIGURE_Z_INCLUDED := 1 + + +Z := +ifeq ($(Z),) +else ifeq ($(Z),.bz2) +else ifeq ($(Z),.gz) +else ifeq ($(Z),.lz) +else ifeq ($(Z),.xz) +else +$(warning "Z": "$(Z)") +$(error Valid values for "Z": ["", ".bz2", ".gz", ".lz", ".xz"]) +endif + + +endif # include guard -- cgit v1.2.3