Skip to content

Commit

Permalink
build: rename print-version target to installcheck (#6620)
Browse files Browse the repository at this point in the history
To make it consistent with the standard GNU make targets.

From the manual of GNU Make (version 4.4.1-2):

> 'installcheck'
>      Perform installation tests (if any).  The user must build and
>      install the program before running the tests.  You should not
>      assume that '$(bindir)' is in the search path.

Commands used to search and replace:

    $ git grep -Ilz print-version |
      xargs -0 -I '{}' sh -c "printf '%s\n' \"\$(sed \
        's/print-version/installcheck/g' '{}')\" >'{}'"
    $ git grep -Ilz 'print version' .github/workflows |
      xargs -0 -I '{}' sh -c "printf '%s\n' \"\$(sed \
        's/print version/make installcheck/g' '{}')\" >'{}'"

Added on commit c9531d9 ("build: add print-version target and use in
CI", 2024-02-22) / #6230.
  • Loading branch information
kmk3 authored Jan 18, 2025
1 parent cedf5e9 commit 1a576d1
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ jobs:
run: make
- name: make install
run: sudo make install
- name: print version
run: make print-version
- name: make installcheck
run: make installcheck
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ jobs:
run: make
- name: make install
run: sudo make install
- name: print version
run: make print-version
- name: make installcheck
run: make installcheck
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ jobs:
run: make -j "$(nproc)"
- name: make install
run: sudo make install
- name: print version
run: make print-version
- name: make installcheck
run: make installcheck
- run: make lab-setup
- run: make test-seccomp-extra
- run: make test-firecfg
Expand Down Expand Up @@ -130,8 +130,8 @@ jobs:
run: make -j "$(nproc)"
- name: make install
run: sudo make install
- name: print version
run: make print-version
- name: make installcheck
run: make installcheck
- run: make lab-setup
- run: make test-private-etc
- run: make test-fs
Expand Down Expand Up @@ -170,8 +170,8 @@ jobs:
run: make -j "$(nproc)"
- name: make install
run: sudo make install
- name: print version
run: make print-version
- name: make installcheck
run: make installcheck
- run: make lab-setup
- run: make test-environment
- run: make test-profiles
Expand Down Expand Up @@ -213,8 +213,8 @@ jobs:
run: make -j "$(nproc)"
- name: make install
run: sudo make install
- name: print version
run: make print-version
- name: make installcheck
run: make installcheck
- run: make lab-setup
- run: make test-utils

Expand Down Expand Up @@ -260,8 +260,8 @@ jobs:
run: make -j "$(nproc)"
- name: make install
run: sudo make install
- name: print version
run: make print-version
- name: make installcheck
run: make installcheck
- run: make lab-setup
- run: make test-fnetfilter
- run: make test-sysutils
Expand Down
14 changes: 7 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ build_ubuntu_package:
- make dist
- ./mkdeb.sh --enable-fatal-warnings
- dpkg -i ./*.deb
- make print-version
- make installcheck

build_debian_package:
image: debian:buster
Expand All @@ -43,7 +43,7 @@ build_debian_package:
- make dist
- ./mkdeb.sh --enable-fatal-warnings
- dpkg -i ./*.deb
- make print-version
- make installcheck

build_no_apparmor:
image: ubuntu:latest
Expand All @@ -63,8 +63,8 @@ build_no_apparmor:
./mkdeb.sh --enable-fatal-warnings
--disable-apparmor
- dpkg -i ./*.deb
- make print-version
- make print-version | grep -F 'AppArmor support is disabled'
- make installcheck
- make installcheck | grep -F 'AppArmor support is disabled'

build_redhat_package:
image: almalinux:latest
Expand All @@ -77,7 +77,7 @@ build_redhat_package:
- make dist
- ./platform/rpm/mkrpm.sh --enable-fatal-warnings
- rpm -i ./*.rpm
- make print-version
- make installcheck

build_fedora_package:
image: fedora:latest
Expand All @@ -90,7 +90,7 @@ build_fedora_package:
- make dist
- ./platform/rpm/mkrpm.sh --enable-fatal-warnings
- rpm -i ./*.rpm
- make print-version
- make installcheck

# FIXME: Cannot build src/libtrace with musl (see #6610).
#build_src_package:
Expand All @@ -108,7 +108,7 @@ build_fedora_package:
# || (cat config.log; exit 1)
# - make
# - make install-strip
# - make print-version
# - make installcheck

debian_ci:
image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ codespell:
print-env:
./ci/printenv.sh

.PHONY: print-version
print-version: config.mk
.PHONY: installcheck
installcheck: config.mk
command -V $(TARNAME) && $(TARNAME) --version

#
Expand Down
2 changes: 1 addition & 1 deletion gcov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ make -j "$(nproc)" &&
sudo make install

rm -fr gcov-dir gcov-file
make print-version
make installcheck
gcov_generate

make test-firecfg | grep TESTING
Expand Down

0 comments on commit 1a576d1

Please sign in to comment.