mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
Mark phony targets as phony.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Closes #10506
This commit is contained in:
parent
2b5f3045ae
commit
94a2dca6a0
21
Makefile.am
21
Makefile.am
@ -55,7 +55,7 @@ EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash.descrip
|
|||||||
|
|
||||||
GITREV = include/zfs_gitrev.h
|
GITREV = include/zfs_gitrev.h
|
||||||
|
|
||||||
.PHONY: gitrev
|
PHONY = gitrev
|
||||||
gitrev:
|
gitrev:
|
||||||
ZFS_GITREV=$$(cd $(top_srcdir) && \
|
ZFS_GITREV=$$(cd $(top_srcdir) && \
|
||||||
git describe --always --long --dirty 2>/dev/null); \
|
git describe --always --long --dirty 2>/dev/null); \
|
||||||
@ -113,15 +113,19 @@ install-data-hook:
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
PHONY += codecheck
|
||||||
codecheck: cstyle shellcheck flake8 mancheck testscheck vcscheck
|
codecheck: cstyle shellcheck flake8 mancheck testscheck vcscheck
|
||||||
|
|
||||||
|
PHONY += checkstyle
|
||||||
checkstyle: codecheck commitcheck
|
checkstyle: codecheck commitcheck
|
||||||
|
|
||||||
|
PHONY += commitcheck
|
||||||
commitcheck:
|
commitcheck:
|
||||||
@if git rev-parse --git-dir > /dev/null 2>&1; then \
|
@if git rev-parse --git-dir > /dev/null 2>&1; then \
|
||||||
${top_srcdir}/scripts/commitcheck.sh; \
|
${top_srcdir}/scripts/commitcheck.sh; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PHONY += cstyle
|
||||||
cstyle:
|
cstyle:
|
||||||
@find ${top_srcdir} -name build -prune -o -type f -name '*.[hc]' \
|
@find ${top_srcdir} -name build -prune -o -type f -name '*.[hc]' \
|
||||||
! -name 'zfs_config.*' ! -name '*.mod.c' \
|
! -name 'zfs_config.*' ! -name '*.mod.c' \
|
||||||
@ -130,6 +134,7 @@ cstyle:
|
|||||||
|
|
||||||
filter_executable = -exec test -x '{}' \; -print
|
filter_executable = -exec test -x '{}' \; -print
|
||||||
|
|
||||||
|
PHONY += shellcheck
|
||||||
shellcheck:
|
shellcheck:
|
||||||
@if type shellcheck > /dev/null 2>&1; then \
|
@if type shellcheck > /dev/null 2>&1; then \
|
||||||
shellcheck --exclude=SC1090 --exclude=SC1117 --format=gcc \
|
shellcheck --exclude=SC1090 --exclude=SC1117 --format=gcc \
|
||||||
@ -141,6 +146,7 @@ shellcheck:
|
|||||||
echo "skipping shellcheck because shellcheck is not installed"; \
|
echo "skipping shellcheck because shellcheck is not installed"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PHONY += mancheck
|
||||||
mancheck:
|
mancheck:
|
||||||
@if type mandoc > /dev/null 2>&1; then \
|
@if type mandoc > /dev/null 2>&1; then \
|
||||||
find ${top_srcdir}/man/man8 -type f -name 'zfs.8' \
|
find ${top_srcdir}/man/man8 -type f -name 'zfs.8' \
|
||||||
@ -157,6 +163,7 @@ else
|
|||||||
stat_fmt = -f '%Sp %N'
|
stat_fmt = -f '%Sp %N'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
PHONY += testscheck
|
||||||
testscheck:
|
testscheck:
|
||||||
@find ${top_srcdir}/tests/zfs-tests -type f \
|
@find ${top_srcdir}/tests/zfs-tests -type f \
|
||||||
\( -name '*.ksh' -not ${filter_executable} \) -o \
|
\( -name '*.ksh' -not ${filter_executable} \) -o \
|
||||||
@ -166,14 +173,17 @@ testscheck:
|
|||||||
xargs -r stat ${stat_fmt} | \
|
xargs -r stat ${stat_fmt} | \
|
||||||
awk '{c++; print} END {if(c>0) exit 1}'
|
awk '{c++; print} END {if(c>0) exit 1}'
|
||||||
|
|
||||||
|
PHONY += vcscheck
|
||||||
vcscheck:
|
vcscheck:
|
||||||
@if git rev-parse --git-dir > /dev/null 2>&1; then \
|
@if git rev-parse --git-dir > /dev/null 2>&1; then \
|
||||||
git ls-files . --exclude-standard --others | \
|
git ls-files . --exclude-standard --others | \
|
||||||
awk '{c++; print} END {if(c>0) exit 1}' ; \
|
awk '{c++; print} END {if(c>0) exit 1}' ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PHONY += lint
|
||||||
lint: cppcheck paxcheck
|
lint: cppcheck paxcheck
|
||||||
|
|
||||||
|
PHONY += cppcheck
|
||||||
cppcheck:
|
cppcheck:
|
||||||
@if type cppcheck > /dev/null 2>&1; then \
|
@if type cppcheck > /dev/null 2>&1; then \
|
||||||
cppcheck --quiet --force --error-exitcode=2 --inline-suppr \
|
cppcheck --quiet --force --error-exitcode=2 --inline-suppr \
|
||||||
@ -184,6 +194,7 @@ cppcheck:
|
|||||||
echo "skipping cppcheck because cppcheck is not installed"; \
|
echo "skipping cppcheck because cppcheck is not installed"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PHONY += paxcheck
|
||||||
paxcheck:
|
paxcheck:
|
||||||
@if type scanelf > /dev/null 2>&1; then \
|
@if type scanelf > /dev/null 2>&1; then \
|
||||||
${top_srcdir}/scripts/paxcheck.sh ${top_builddir}; \
|
${top_srcdir}/scripts/paxcheck.sh ${top_builddir}; \
|
||||||
@ -191,6 +202,7 @@ paxcheck:
|
|||||||
echo "skipping paxcheck because scanelf is not installed"; \
|
echo "skipping paxcheck because scanelf is not installed"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PHONY += flake8
|
||||||
flake8:
|
flake8:
|
||||||
@if type flake8 > /dev/null 2>&1; then \
|
@if type flake8 > /dev/null 2>&1; then \
|
||||||
flake8 ${top_srcdir}; \
|
flake8 ${top_srcdir}; \
|
||||||
@ -198,23 +210,30 @@ flake8:
|
|||||||
echo "skipping flake8 because flake8 is not installed"; \
|
echo "skipping flake8 because flake8 is not installed"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PHONY += ctags
|
||||||
ctags:
|
ctags:
|
||||||
$(RM) tags
|
$(RM) tags
|
||||||
find $(top_srcdir) -name '.?*' -prune \
|
find $(top_srcdir) -name '.?*' -prune \
|
||||||
-o -type f -name '*.[hcS]' -print | xargs ctags -a
|
-o -type f -name '*.[hcS]' -print | xargs ctags -a
|
||||||
|
|
||||||
|
PHONY += etags
|
||||||
etags:
|
etags:
|
||||||
$(RM) TAGS
|
$(RM) TAGS
|
||||||
find $(top_srcdir) -name '.?*' -prune \
|
find $(top_srcdir) -name '.?*' -prune \
|
||||||
-o -type f -name '*.[hcS]' -print | xargs etags -a
|
-o -type f -name '*.[hcS]' -print | xargs etags -a
|
||||||
|
|
||||||
|
PHONY += cscopelist
|
||||||
cscopelist:
|
cscopelist:
|
||||||
find $(top_srcdir) -name '.?*' -prune \
|
find $(top_srcdir) -name '.?*' -prune \
|
||||||
-o -type f -name '*.[hc]' -print >cscope.files
|
-o -type f -name '*.[hc]' -print >cscope.files
|
||||||
|
|
||||||
|
PHONY += tags
|
||||||
tags: ctags etags
|
tags: ctags etags
|
||||||
|
|
||||||
|
PHONY += pkg pkg-dkms pkg-kmod pkg-utils
|
||||||
pkg: @DEFAULT_PACKAGE@
|
pkg: @DEFAULT_PACKAGE@
|
||||||
pkg-dkms: @DEFAULT_PACKAGE@-dkms
|
pkg-dkms: @DEFAULT_PACKAGE@-dkms
|
||||||
pkg-kmod: @DEFAULT_PACKAGE@-kmod
|
pkg-kmod: @DEFAULT_PACKAGE@-kmod
|
||||||
pkg-utils: @DEFAULT_PACKAGE@-utils
|
pkg-utils: @DEFAULT_PACKAGE@-utils
|
||||||
|
|
||||||
|
.PHONY: $(PHONY)
|
||||||
|
Loading…
Reference in New Issue
Block a user