vkdot/badwolf/build.ninja

63 lines
1.8 KiB
Text
Raw Normal View History

2025-03-02 03:05:35 -05:00
# SPDX-FileCopyrightText: 2019-2023 Badwolf Authors <https://hacktivis.me/projects/badwolf>
# SPDX-License-Identifier: BSD-3-Clause
# Written by hand, config.ninja is the generated one
rule po2mo
command = mkdir -p "$$(dirname $out)" && msgfmt -o $out $in
rule translate_manpage
command = po4a-translate --format man -M utf-8 --master badwolf.1 --po $in --localized $out
rule scour
command = mkdir -p "$$(dirname $out)" && scour --no-line-breaks --enable-id-stripping --remove-metadata $in $out
rule gen_icon
command = mkdir -p "$$(dirname $out)" && inkscape -w $width -h $height $in -o $out
rule run_tests
command = for test in $in; do ./$$test || exit 1; done
rule install
command = sh -e ./install.sh
include config.ninja
build po/manpage.pot: xgettext_man badwolf.1 | po/pot_license.ed
build icons/hicolor/scalable/apps/badwolf.svg: scour badwolf.svg
build uri_test: cc_exe uri_test.c uri.o
build fmt_test: cc_exe fmt_test.c fmt.o
build bookmarks_test: cc_exe bookmarks_test.c bookmarks.o
build test: run_tests uri_test fmt_test bookmarks_test
rule list_authors
command = git log --use-mailmap --format='format:%aN <%aE>' --date='format:%Y' | sort | uniq >$out
build AUTHORS: list_authors | .git
rule format
command = clang-format -style=file -assume-filename=.clang-format -i *.c *.h
build format: format
rule mandoc
command = $MANDOC -Tlint -Wunsupp,error,warning ./badwolf.1 && $MANDOC -Tlint -Wunsupp,error ./badwolf.*.1
build lint_mandoc: mandoc
rule shellcheck
command = $SHELLCHECK ./configure
build lint_shellcheck: shellcheck | ./configure
rule flawfinder
command = $FLAWFINDER .
build lint_flawfinder: flawfinder
rule reuse
command = $REUSE lint
build lint_reuse: reuse
rule true
command = true
build lint: true | lint_mandoc lint_shellcheck lint_flawfinder lint_reuse
build all: phony badwolf