Commit 58ef9625 authored by Jari Aalto's avatar Jari Aalto

debian/debian-save-restore.mk: rm, not needed

Signed-off-by: 's avatarJari Aalto <jari.aalto@cante.net>
parent 63e32176
# debian-autotools.mk -- Common settings for Autotoolsx
#
# Copyright
#
# Copyright (C) 2008-2010 Jari Aalto <jari.aalto@cante.net>
#
# License
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Description
#
# This is GNU makefile part, that defines common variables,
# targets and macros to be used from debian/rules.
#
# Usage
#
# FILE_LIST_PRESERVE = <file list of upstream files>
#
# override_dh_auto_configure:
# $(file-state-save)
# <configure call>
#
# binary-arch:
# $(file-state-restore)
# ...
# Use "~" as copy-of-file marker so that dh_clean will remove those automatically
define file-state-save
# save files
for f in $(FILE_LIST_PRESERVE); \
do \
if [ -f "$$f" ] && [ ! "$$f~" ]; then \
cp -v "$$f" "$$f~"; \
fi; \
done
endef
define file-state-restore
# restore files
for f in $(FILE_LIST_PRESERVE); \
do \
if [ -f "$$f~" ]; then \
mv -v "$$f~" "$$f"; \
fi; \
done
endef
# End of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment