summaryrefslogtreecommitdiffstats
path: root/man/meson.build (follow)
Commit message (Collapse)AuthorAgeFilesLines
* man/example: also build example code with C90Yu Watanabe2024-04-031-0/+2
| | | | | | Unfortunately, sd-bus-vtable.h, sd-journal.h, and sd-id128.h have variadic macro and inline initialization of sub-object, these are not supported in C90. So, we need to silence some errors.
* man/examples: set _GNU_SOURCE in source, rather than by compile optionYu Watanabe2024-04-031-4/+4
| | | | Addresses https://github.com/systemd/systemd/pull/32057#issuecomment-2034408569.
* man/meson: add simple build test for example codeYu Watanabe2024-04-031-0/+84
|
* meson/man: allow man pages to use multiple conditionsZbigniew Jędrzejewski-Szmek2024-03-061-1/+9
| | | | | | This way the man pages are installed only when the corresponding binary is installed. The conditions in man pages and man/rules/meson.build are adjusted to match the conditions for units in units/meson.build.
* meson: fix installation of html doc aliasesFranck Bui2024-01-301-2/+2
| | | | | Apparently since 9289e093ae6fd5484f9119e1ee07d1dffe37cd10, "ln_s" takes *absolute* paths only.
* man: support multiple versions of the documentation on the websiteAbderrahim Kitouni2023-10-091-6/+3
| | | | | | | | | | | This changes the doc-sync meson target from a simple rsync command to a script that: * puts the documentation in a subdirectory according to the version * injects a bit of javascript to add a drop-down to switch between versions * updates an index.json file with the newly uploaded version * keeps the latest/ directory up to date with the latest version * supports a --no-latest switch to be used when uploading older versions
* man: add checks for missing version informationAbderrahim Kitouni2023-10-011-0/+5
| | | | | | | | | | | This adds a new script tools/check-version-history.py and a corresponding test when building in developer mode. It checks manpages (except dbus documentation which is handled by update-dbus-docs) for missing version history information. It also adds ignore lists based on version 183 (the version that our version annotations go back to). These can be augmented if we want to ignore other elements if it doesn't make sense for them to have version annotations.
* meson: Convert more options to meson featuresJan Janssen2023-08-231-3/+3
| | | | | The semantics for libidn2 and pwquality have changed slightly: We will pick a preferred one if both are enabled instead of making it an error.
* meson: use install_emptydir() and drop meson-make-symlink.shYu Watanabe2023-08-081-6/+2
| | | | | | The script is mostly equivalent to 'mkdir -p' and 'ln -sfr'. Let's replace it with install_emptydir() builtin function and inline meson call.
* man: generate link mode list dynamicallyZbigniew Jędrzejewski-Szmek2023-05-301-6/+10
| | | | | | | | The entries are sorted by speed. Some fields are left empty when there is no clear value to use. The table is much longer now, but I think it's better to document the allowed values, even if some are not terribly useful. Fixes #26256.
* meson: rename "dist-check" suite to "dist"Zbigniew Jędrzejewski-Szmek2023-05-181-1/+1
| | | | *Now* one of those tests is the longest, let's make them a bit shorter.
* meson: rename conflicting target namesYu Watanabe2023-03-031-2/+2
| | | | | | | | | | | | | | | The update-man-rules and update-dbus-docs targets are both declared in the main meson.build and man/meson.build, so we cannot build the target with 'meson compile' command: ==== $ meson compile update-man-rules INFO: autodetecting backend as ninja ERROR: Can't invoke target `update-man-rules`: ambiguous name.Add target type and/or path: - ./man/update-man-rules:custom - ./update-man-rules:run ==== Let's rename the targets declared in man/meson.build.
* meson: Use meson test suite featureJan Janssen2022-05-041-0/+1
| | | | | | This makes it easier to only test a subset of tests without having to specify them all on the command line: meson test -C build --suite headers
* meson: also allow setting GIT_VERSION via templatesZbigniew Jędrzejewski-Szmek2022-04-051-1/+1
| | | | | | | | | GIT_VERSION is not available as a config.h variable, because it's rendered into version.h during builds. Let's rework jinja2 rendering to also parse version.h. No functional change, the new variable is so far unused. I guess this will make partial rebuilds a bit slower, but it's useful to be able to use the full version string.
* meson: replace sh+find with an internal glob in the python helperZbigniew Jędrzejewski-Szmek2022-03-231-4/+3
| | | | | | | | As suggested in https://github.com/systemd/systemd/pull/22810#discussion_r831708052 This makes the whole thing simpler. A glob is passed to helper which then resolves it on its own. This way it's trivial to call the helper with a different set of files for testing.
* meson: Add missing test dependenciesDaan De Meyer2022-01-211-1/+2
| | | | | | Currently, running "meson build" followed by "meson test -C build" will result in many failed tests due to missing dependencies. This commit adds the missing dependencies to make sure no tests fail.
* meson: Add check argument to remaining run_command() callsJan Janssen2022-01-111-1/+1
|
* build: preserve correct mode when generating files via jinja2Christian Brauner2021-11-081-2/+1
| | | | | | | | | When using "capture : true" in custom_target()s the mode of the source file is not preserved when the generated file is not installed and so needs to be tweaked manually. Switch from output capture to creating the target file and copy the permissions from the input file. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
* meson: fix creation of man pages indicesZbigniew Jędrzejewski-Szmek2021-09-211-0/+1
| | | | Fixes #20795. Bug introduced in f12c5d36a9a162f833987b03fbf0b65248581cbb.
* meson: use alias_target for doc update commandsZbigniew Jędrzejewski-Szmek2021-07-271-37/+61
| | | | | | | | | | | This undoes part of 4c890ad3cc7b3445683d7b52bc00e4a58bef5e94: the implementations of update-dbus-docs and update-man-rules are moved back to man/meson.build, and alias_target() is used to keep the visible target names unchanged. The rules for man pages are reworked so that it's possible to invoke the targets even if xstlproc is not available. After all, xsltproc is only needed for the final formatted output, and not other processing.
* meson: use a/b instead of join_paths(a,b)Zbigniew Jędrzejewski-Szmek2021-07-271-6/+6
| | | | It is nicer and shorter.
* man: prevent race condition when generating systemd.directives.xmlasavah2021-05-201-0/+1
|
* meson: use jinja2 also for custom-entities.entZbigniew Jędrzejewski-Szmek2021-05-191-7/+7
| | | | | | | | | | | | | | | | | | | | This doesn't matter too much, but makes things a bit more consistent. A minor advantage is that the file is not a configuration file for meson anymore, so: a) It is not built unless pulled in by another target. Since we don't usually build man pages by default, this saves a tiny amount of work. b) When the .in file is updated, meson does not reconfigure everything, but just rebuilds the dependent targets. Now that the conversion is finished, time for benchmarking: a full build with default settings (and -Dstandalonebinaries=true), yields before this pull request: 1687 targets, 148.13s user 35.17s system 317% cpu 57.697 total with the full pull request: 1714 targets, 143.07s user 27.87s system 314% cpu 54.369 total The difference doesn't seem significant. Partial rebuilds might be faster as mentioned before.
* meson: use custom configuration_data() object for man/man and man/html helpersZbigniew Jędrzejewski-Szmek2021-05-191-2/+5
| | | | | | | | | | I want to stop using 'substs'. But in this case, configure_file() is nicer than custom_target(), because it causes meson to immediately generate the helpers after configuration, so it's possible to do 'meson build && build/man/man ...', without building anything first. We only substitute one variable here, so let's use a custom configuration_data() object.
* meson: call find_program() once and reuse the variable everywhereZbigniew Jędrzejewski-Szmek2021-05-141-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meson 0.58 has gotten quite bad with emitting a message every time a quoted command is used: Program /home/zbyszek/src/systemd-work/tools/meson-make-symlink.sh found: YES (/home/zbyszek/src/systemd-work/tools/meson-make-symlink.sh) Program sh found: YES (/usr/bin/sh) Program sh found: YES (/usr/bin/sh) Program sh found: YES (/usr/bin/sh) Program sh found: YES (/usr/bin/sh) Program sh found: YES (/usr/bin/sh) Program sh found: YES (/usr/bin/sh) Program xsltproc found: YES (/usr/bin/xsltproc) Configuring custom-entities.ent using configuration Message: Skipping bootctl.1 because ENABLE_EFI is false Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Message: Skipping journal-remote.conf.5 because HAVE_MICROHTTPD is false Message: Skipping journal-upload.conf.5 because HAVE_MICROHTTPD is false Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Message: Skipping loader.conf.5 because ENABLE_EFI is false Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) ... Let's suffer one message only for each command. Hopefully we can silence even this when https://github.com/mesonbuild/meson/issues/8642 is resolved.
* meson: do not fail if rsync is not installed with meson 0.57.2Zbigniew Jędrzejewski-Szmek2021-04-121-11/+14
| | | | | | | https://github.com/mesonbuild/meson/issues/8641 Our CI started to fail. Even if the change is reverted in meson, we need a quick workaround here.
* meson: rename target to update-man-rulesZbigniew Jędrzejewski-Szmek2021-01-271-11/+0
| | | | Same justification as for update-dbus-docs.
* meson: rename target to update-dbus-docsZbigniew Jędrzejewski-Szmek2021-01-271-19/+0
| | | | | | | | | Very old versions of meson did not include the subdirectory name in the target name, so we started adding various "top-level" custom targets in subdirectories. This was nice because the main meson.build file wasn't as cluttered. But then meson started including the subdir name in the target name. So let's move the definition to the root so we can have all targets named uniformly.
* meson: Fix update-man-rules when the build dir is not a subdir of the ↵Daan De Meyer2021-01-241-10/+8
| | | | | | | | | | | | | project dir Until now, update-man-rules assumed that the build directory was a subdirectory of the project directory. When using mkosi, this is not the case. We use find instead of git ls-files because git ls-files does not seem to support outputting absolute paths. Also, this makes update-man-rules a bit more user-friendly as new manpages don't have to be added to the git staging area before they are processed by update-man-rules.py.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* meson: convert developer_mode boolean to an enumZbigniew Jędrzejewski-Szmek2020-10-221-1/+1
| | | | | I initially changed this to add a third state. But even with two values having an explicit name instead of just 0/1 is mode descriptive.
* test: verify that dbus docs are freshZbigniew Jędrzejewski-Szmek2020-08-271-2/+8
| | | | | | | | | This makes use of the developer mode switch: the test is only done if the user opted-in into developer mode. Before the man/update-dbus-docs was using the argument form where we don't need to run find_command(), but that doesn't work with test(),, so find_command() is used and we get one more line in the config log.
* tools: move directive index template to separate fileZbigniew Jędrzejewski-Szmek2020-05-071-2/+2
| | | | | | | In the beginning, it was rather short, and reasonable to include inline. Now it is long and unwieldy, let's split it out. While at it, let's reindent and wrap using our current standards.
* meson: rename make-man-rules.py to update-man-rules.pyZbigniew Jędrzejewski-Szmek2020-05-071-1/+1
| | | | | | | The name of the helper didn't match the name of the meson target, which was always confusing me. With this change, we consistenly use "update" to re-generate things which we otherwise keep in vc, and "make" for things which are generated during each build.
* meson: add man/update-dbus-docs targetZbigniew Jędrzejewski-Szmek2020-05-051-1/+19
|
* meson: remove strange dep that causes meson to enter infinite loopZbigniew Jędrzejewski-Szmek2019-11-061-1/+0
| | | | | | | | | | | | | The value is obviously bogus, but didn't seem to cause problems so far. With meson-0.52.0, it causes a hang. The number of aliases is always rather small (usually just one or two, possibly up to a dozen in a few cases), so even if this causes some looping, it is strange that it has such a huge impact. But let's just remove it. Fixes #13742. Tested with meson-0.52.0-1.module_f31+6771+f5d842eb.noarch, meson-0.51.1-1.fc29.noarch.
* meson: add build/man/man and build/man/html to build and display pagesZbigniew Jędrzejewski-Szmek2019-05-091-0/+12
| | | | | | | | | | | Man page generation is generally very slow. I prefer to use -Dman=false when developing systemd, and only build specific pages when introducing changes. Those two little helper tools make it easy: $ build/man/man systemd.link $ build/man/html systemd.link will show systemd.link.8 and systemd.link.html from the build directory build/.
* meson: scope more git invocations with current_source_dir()Davide Cavalca2019-03-121-1/+1
|
* meson: remove workaround for old meson bug with command quotingZbigniew Jędrzejewski-Szmek2019-02-281-4/+1
| | | | | Those bugs were fixed a long time ago. Let's take advantage of this and use the usual $() syntax.
* meson: update bug referenceZbigniew Jędrzejewski-Szmek2018-10-111-1/+2
| | | | | | https://github.com/mesonbuild/meson/issues/1644 was resolved in 0.42: https://github.com/mesonbuild/meson/pull/2191/commits/be4428005dff8b17af5696c8f05567de9af1a8c5, but still no-go.
* meson: drop parens when appending to listZbigniew Jędrzejewski-Szmek2018-07-311-10/+10
| | | | | | Meson does not care either way, so let's use the simpler syntax. And files() already gives a list, so nesting this in a list wouldn't be necessary even if meson did not flatten everything.
* meson: allow systemd.directives and .index to be built if -Dman=falseZbigniew Jędrzejewski-Szmek2018-07-161-2/+2
| | | | See 559d215b6733bb46533a52080522a7feca183aa8 for justification.
* Drop my copyright headersZbigniew Jędrzejewski-Szmek2018-06-141-2/+0
| | | | | | | perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* meson: restore building of man pages on demand even if -Dman=falseZbigniew Jędrzejewski-Szmek2017-11-241-1/+1
| | | | | | | I want to configure -Dman=false for speed, but be able to build a specific man page sometimes to check my edits. Commit 5b316b9ea6c broke this by mistake. Let's adjust the condition to better match the logic of disabling tests only if xsltproc is really not found.
* Add license headers and SPDX identifiers to meson.build filesZbigniew Jędrzejewski-Szmek2017-11-191-0/+17
| | | | | | | So far I avoided adding license headers to meson files, but they are pretty big and important and should carry license headers like everything else. I added my own copyright, even though other people modified those files too. But this is mostly symbolic, so I hope that's OK.
* meson: do not include man/meson.build if xsltproc not foundYu Watanabe2017-10-311-3/+3
| | | | Fixes #7232.
* build-sys: use #if Y instead of #ifdef Y everywhereZbigniew Jędrzejewski-Szmek2017-10-041-1/+1
| | | | | | | | | | | | | | | The advantage is that is the name is mispellt, cpp will warn us. $ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/" $ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;' $ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g' $ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g' + manual changes to meson.build squash! build-sys: use #if Y instead of #ifdef Y everywhere v2: - fix incorrect setting of HAVE_LIBIDN2
* build-sys: bump xslt maxdepth limit (#6863)Zbigniew Jędrzejewski-Szmek2017-09-191-0/+1
| | | | With libxslt-1.30, builds were failing on some recursion depth limit with systemd.index.xml. Bumping the limit fixes the issue.