aboutsummaryrefslogtreecommitdiffstats
path: root/share/mk/configure
AgeCommit message (Collapse)AuthorFilesLines
2025-11-06share/mk/: $SHELLCHECKFLAGS: Disable SC2028Alejandro Colomar1-1/+3
It's known that echo(1) doesn't expand anything. No need to warn. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-21share/mk/: $AWK: Add dependencyAlejandro Colomar1-0/+14
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-21share/mk/: $PCRE2GREP: Add dependencyAlejandro Colomar1-0/+14
This will be used for adding diagnostics about semantic newlines. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-20share/mk/: $CLANG_CFLAGS: Add -Wno-unknown-attributesAlejandro Colomar1-0/+1
Clang doesn't know [[gnu::nonnull]]. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-09-20share/mk/, etc/clang-tidy: Silence diagnostics about unnamed parametersAlejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-17*: grfixAlejandro Colomar67-67/+67
Scripted change: $ grep -rl 'The authors of the Linux man-pages' \ | xargs sed -i '/Copyright, The authors of the Linux man-pages project/s/The/the/'; Reported-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-10*, AUTHORS: Consistently refer to authorsAlejandro Colomar67-67/+67
- Rename the file CREDITS => AUTHORS - Say 'authors' in the copyright notice. Scripted change: $ grep -rn 'The contributors to the Linux man-pages' -l \ | xargs sed -i '/Copyright, The contributors to the Linux man-pages project/s/contributors to/authors of/' Suggested-by: Dave Martin <Dave.Martin@arm.com> Acked-by: "G. Branden Robinson" <branden@debian.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-05-06*, CREDITS: Unify copyright noticesAlejandro Colomar67-67/+67
Link: <https://lore.kernel.org/linux-man/jpin2dbnp5vpitnh7l4qmvkamzq3h3xljzsznrudgioox3nn72@57uybxbe3h4p/T/#u> Link: <https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects> Cc: "G. Branden Robinson" <branden@debian.org> Cc: Carlos O'Donell <carlos@redhat.com> Cc: Eugene Syromyatnikov <evgsyr@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-02-27share/mk/: Don't pass an escaped # to grep(1)Alejandro Colomar1-1/+1
We need to escape the # for old versions of make(1). However, new versions of grep(1) diagnose if it receives an escaped #. To keep both make(1) and grep(1) happy in both their old and new versions, we need to take advantage of # not being a comment in bash(1) when not preceeded by a space, and also of \# being translated into # by bash(1). alx@debian:~$ echo ''\# # alx@debian:~$ echo ''# # Fixes: 76f12e3fd3ea (2025-02-10; "share/mk/: Escape '#' in regexes") Reported-by: Sergei Trofimovich <slyich@gmail.com> Cc: Florian Weimer <fw@deneb.enyo.de> Cc: Boris Pigin <boris.pigin@gmail.com> Suggested-by: Jakub Wilk <jwilk@jwilk.net> References: <20250227162800.36exbwmqky6d7z4t@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-02-24share/mk/: diffoscope(1) is in the diffoscope-minimal packageAlejandro Colomar1-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-02-16share/mk/: Use ifndef and := instead of ?=Alejandro Colomar64-209/+499
The semantics of '?=' are similar to those of '=', but we need simple assignment as if ':=', so we can't use '?='. In the future, we'll be able to use '?:='. For now, let's use ifndef. Fixes: 0d69e51cd4b8 (2025-02-10; "share/mk/: Use ?= assignments for user-facing variables") Link: <https://lore.kernel.org/linux-man/378a2eba-c973-4de9-a362-6e25123bf75b@systematicsw.ab.ca/T/#m3be93ab6b875569178981b034b4a874632db2fa9> Reported-by: Brian Inglis <brian.inglis@systematicsw.ab.ca> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-02-10share/mk/: Use ?= assignments for user-facing variablesAlejandro Colomar64-146/+146
This allows users specifying them as environment variables. Cc: Sam James <sam@gentoo.org> Cc: Paul Smith <psmith@gnu.org> Cc: Guenther Noack <gnoack@google.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-02-10share/mk/: Escape '#' in regexesAlejandro Colomar1-1/+1
GNU make(1) 4.2 seems to be interpreting those characters as the start of a comment, so we need to escape them. That seems to calm those old versions of make(1), and doesn't affect negatively the newer ones, and doesn't affect negatively grep(1) either. Fixes: 35a780a99bd8 (2024-07-20; "share/mk/: CPPFLAGS: Only define _FORTIFY_SOURCE if it's not already defined") Fixes: 2130162900ab (2024-11-03; "share/mk/, etc/shellcheck/: lint-sh: Add target to lint shell scripts") Reported-by: Boris Pigin <boris.pigin@gmail.com> Cc: Sam James <sam@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-01-05share/mk/: $CLANG_CFLAGS: Add -Wno-language-extension-tokenAlejandro Colomar1-0/+1
We use typeof(), which triggers that. It's now standard, so this is a false positive, IMO. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-03share/mk/: [un]install-bin: Add target to [un]install shell scriptsAlejandro Colomar2-0/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-11-03share/mk/, etc/shellcheck/: lint-sh: Add target to lint shell scriptsAlejandro Colomar2-0/+21
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-27share/mk/: $CLANG_CFLAGS: -Wno-used-but-marked-unusedAlejandro Colomar1-1/+2
This diagnostic is triggered by valid calls to printf(3). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-08-27share/mk/: $CLANG_CFLAGS: -Wno-unreachable-codeAlejandro Colomar1-0/+1
The example program in ctime(3) triggers that diagnostic due to a compile-time check of the signedness of time_t. The code is legitimate. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-20share/mk/: CPPFLAGS: Only define _FORTIFY_SOURCE if it's not already definedAlejandro Colomar1-3/+18
Some distros patch GCC to have that definition built in. Redefining it ourselves would result in a redefinition, and consequently a diagnostic. Reported-by: Sam James <sam@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org> Cherry-picked-from: liba2i.git 31bfd8f14a11 (2024-07-17, "share/mk/: CPPFLAGS: Only define _FORTIFY_SOURCE if it's not already defined") Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-20share/mk/, share/tests/: Refactor *FLAGS and LDLIBS variablesAlejandro Colomar30-64/+64
Standard behavior is that setting these variables should append, not overwrite. Add variables to allow overwriting, with a trailing '_'. While at it, put CPPFLAGS after CFLAGS consistently (previously, there was a mix). Link: <https://lists.gnu.org/archive/html/help-make/2024-07/msg00001.html> Reported-by: Sam James <sam@gentoo.org> Reported-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Suggested-by: Sébastien Hinderer <Sebastien.Hinderer@inria.fr> Suggested-by: Paul Smith <psmith@gnu.org> Signed-off-by: Alejandro Colomar <alx@kernel.org> Cherry-picked-from: liba2i.git 5613b2846104 (2024-07-16, "share/mk/, share/tests/: Refactor *FLAGS and LDLIBS variables") Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-20share/mk/: CPPFLAGS: -D_FORTIFY_SOURCE=2Alejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org> Cherry-picked-from: liba2i.git 828dd1d21b30 (2024-07-15, "share/mk/: CPPFLAGS: -D_FORTIFY_SOURCE=2") Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-07-20share/mk/: CosmeticAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-15share/mk/: $CUT: Add dependency on cut(1)Alejandro Colomar1-0/+12
We'll need it for checking the .so link pages. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-06-11share/mk/: TROFFFLAGS: -rU0: Disable generation of OSC 8 URI hyperlinksAlejandro Colomar1-1/+2
This is the default in groff-1.23.0. However, some distros turn it on, which silenced some warnings. Link: <https://lore.kernel.org/linux-man/y35l3wyxcjk5tsq4hd5mtqvpor577fmysaufv3gntu5uwsyzrf@wiqk4rbxkm4w/T/#m569eab0d60420fdeac9e48bf237712f18ea91c4e> Suggested-by: "G. Branden Robinson" <branden@debian.org> Cc: Joe Damato <jdamato@fastly.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-05-05share/mk/: $LD: Fix definition to include $CPPFLAGSAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org> Cherry-picked-from: liba2i.git ecc5ea650c45 ("share/mk/: $LD: Fix definition to include $CPPFLAGS") Link: <https://git.kernel.org/pub/scm/libs/liba2i/liba2i.git/> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-05-02share/mk/: $CPPCHECKFLAGS: Add --check-level=exhaustiveAlejandro Colomar1-0/+1
This avoids warnings of the form: ...: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-05-02man/, share/mk/: Move man*/ to man/Alejandro Colomar1-1/+1
This is a scripted change: $ mkdir man/; $ mv man* man/; $ ln -st . man/man*; $ find share/mk/ -type f \ | xargs grep -l '^MANDIR *:=' \ | xargs sed -i '/^MANDIR *:=/s,$,/man,'; $ find share/mk/dist/ -type f \ | xargs grep -l man \ | xargs sed -i 's,man%,man/%,g'; Link: <https://lore.kernel.org/linux-man/YxcV4h+Xn7cd6+q2@pevik/T/> Cc: Petr Vorel <pvorel@suse.cz> Cc: Jakub Wilk <jwilk@jwilk.net> Cc: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-04-19share/mk/: build-fonts-tinos: Build TinosR from TinosR.afmAlejandro Colomar1-0/+19
And use a consistent name for it: TinosR, not TINOR. This removes the last remaining huge generated file we had in the repository. Link: <https://technicallywewrite.com/2023/09/16/addfonts> Link: <https://www.schaffter.ca/mom/momdoc/appendices.html#fonts> Cc: Jan Eden <tech@eden.one> Cc: "G. Branden Robinson" <branden@debian.org> Cc: Deri James <deri@chuzzlewit.myzen.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-04-19share/mk/: build-fonts-tinos: Build TinosR.afm from Tinos-Regular.ttfAlejandro Colomar2-0/+27
This will allow generating the font description file from it, which will be done in the next commit. Link: <https://technicallywewrite.com/2023/09/16/addfonts> Link: <https://www.schaffter.ca/mom/momdoc/appendices.html#fonts> Cc: Jan Eden <tech@eden.one> Cc: "G. Branden Robinson" <branden@debian.org> Cc: Deri James <deri@chuzzlewit.myzen.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-04-09share/mk/: Remove support for installing compressed pagesAlejandro Colomar1-21/+0
I don't like compressed pages: they make it more difficult/slow to grep them. This was added to make it easier for users to install compressed pages even when installing from source, but probably nobody cares at all these days about a few KiB per page; drive space got cheap. Also, some of the algorithms were added just for benchmarking (for demonstrating that they were bad in this case), and not for real use. This reduces a use of compression tools, which seem to be dangerous these days. Link: <https://tukaani.org/xz-backdoor/> Link: <https://cmpct.info/~sam/blog/posts/automatic-manpage-compression/> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-04-08share/mk/: $TROFFFLAGS: Use a larger font sizeAlejandro Colomar1-1/+3
Link: <https://journals.uc.edu/index.php/vl/article/view/5765> Reported-by: Paul Eggert <eggert@cs.ucla.edu> Suggested-by: "G. Branden Robinson" <branden@debian.org> Cc: "Thomas E. Dickey" dickey@his.com Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-26share/mk/: Generate the fonts during the buildAlejandro Colomar2-0/+27
Suggested-by: "G. Branden Robinson" <branden@debian.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-26share/mk/: $CFLAGS: -Wno-reserved-identifier, -Wno-unused-macrosAlejandro Colomar1-0/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-26share/mk/: Sync with liba2i's build systemAlejandro Colomar2-7/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-24share/mk/: [un]install-pdf: Add target to install the PDF bookAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-24share/mk/: $EXTRAVERSION: Add variable to append to the versionAlejandro Colomar1-1/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-24share/mk/: Derive $DISTNAME from $DISTVERSIONAlejandro Colomar1-2/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-24share/mk/: Reorganize build systemAlejandro Colomar10-20/+29
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-23share/mk/: $MANPAGEDATECMD: Use a variable for setting the date of manual pagesAlejandro Colomar1-0/+3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-23share/mk/: Fix includesAlejandro Colomar3-6/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-20share/mk/: Reorganize dependenciesAlejandro Colomar56-177/+441
Use one directory per each (Debian) package, and one file per command. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-19share/mk/: We don't use man2html(1) any moreAlejandro Colomar1-15/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-19share/mk/: $htmlext: Remove unused variableAlejandro Colomar1-3/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-18share/mk/: Consistency fixes in copyright linesAlejandro Colomar30-30/+30
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-18share/mk/: Update licenseAlejandro Colomar5-20/+10
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-18share/mk/: Use grohtml(1) instead of man2html(1)Alejandro Colomar1-0/+6
man2html(1) crashes on tzfile(5), and the upstream project is defunct. Link: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067022> Cc: Paul Eggert <eggert@cs.ucla.edu> Cc: "G. Branden Robinson" <branden@debian.org> Cc: Robert Luberda <robert@debian.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-14scripts/LinuxManBook/build.sh, share/mk/: Use command variablesAlejandro Colomar2-0/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-12share/mk/configure/build-depends/cc.mk: Use -Wno-unsafe-buffer-usage with ↵Alejandro Colomar1-1/+3
clang(1) That warning has false positives, such as in unix(7). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-10share/mk/: dist: Don't package .git/Alejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-26share/mk/: $SKIP_XFAIL: Add variable to allow skipping expected failuresAlejandro Colomar1-0/+18
Default to 'yes'. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-26share/mk/configure/version.mk: $DISTDATECMD: Use committer date, not author dateAlejandro Colomar1-1/+1
Comitter date is always increasing, while author date may jump backwards, which is problematic with make(1). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-25share/mk/: $DISTDATE: If the repository is "dirty", use the newest timestampAlejandro Colomar2-1/+26
Otherwise, the files within the 'dist' tarball will have a timestamp older than their last actual modification, which is problematic with 'distcheck'. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-25share/mk/configure/version.mk: $DISTNAME: Pass --dirty to git-describe(1)Alejandro Colomar1-1/+1
This makes sure we don't accidentally produce release tarballs from a dirty repository. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-25share/mk/configure/version.mk: $DISTNAME: Don't hide git(1) errorsAlejandro Colomar1-1/+1
We don't call git(1) inside tarballs anymore to get the $DISTNAME, so we can safely assume that git(1) should never fail, and if it fails, we better get an error message. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-25share/mk/: distcheck: Support an absolute path in $builddirAlejandro Colomar1-14/+15
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-25share/mk/: distcheck: Use temporary dirs within $builddirAlejandro Colomar1-1/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-17share/mk/: $(info ...): Make output more consistentAlejandro Colomar1-1/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-17share/mk/: distcheck: Add targetAlejandro Colomar2-0/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-17share/mk/: Reorganize build systemAlejandro Colomar1-0/+1
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-17share/mk/: Move configuration variables to share/mk/configure/Alejandro Colomar15-18/+139
Some variables are only part of the implementation of our build system, and users should not modify them; others are designed to be set by users when they invoke make(1). Define the latter in share/mk/configure/, so that they are more visible. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-17share/mk/: Reorganize build dependenciesAlejandro Colomar30-0/+620
Signed-off-by: Alejandro Colomar <alx@kernel.org>