open-cas-linux/tools/helpers.mk
Robert Baldyga 880cfadde9 Makefile: improve uninstall error handling
Introduce helper functions to handle uninstall errors gracefully.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-03-19 15:37:55 +01:00

16 lines
338 B
Makefile

#
# Copyright(c) 2021 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
define remove-file
@if [ -f ${1} ] || [ -L ${1} ]; then rm -rf ${1}; \
else echo "WARNING: Cannot find file ${1}"; fi
endef
define remove-directory
@if [ -d ${1} ]; then rm -rf ${1}; \
else echo "WARNING: Cannot find directory ${1}"; fi
endef