[PATCH 6/6] UBUNTU: (buildenv) Add a distclean target to remove temporary files
Tim Gardner
tim.gardner at canonical.com
Wed Sep 16 18:00:15 UTC 2009
Andy Whitcroft wrote:
> From: Stefan Bader <stefan.bader at canonical.com>
>
> Ignore: yes
>
> Calling distclean will remove the temporary files generated by clean. This
> should make it simpler to see what other files might need handling or to
> really start from a clean environment.
>
> Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
> Signed-off-by: Andy Whitcroft <apw at canonical.com>
> ---
> debian.master/rules | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/debian.master/rules b/debian.master/rules
> index f835179..b1792ea 100755
> --- a/debian.master/rules
> +++ b/debian.master/rules
> @@ -56,6 +56,12 @@ clean: debian/control
> # Install the copyright information.
> cp $(DEBIAN)/copyright debian/copyright
>
> +distclean: clean
> + rm -rf debian.master/control debian.master/control.stub \
> + debian.master/d-i/kernel-versions debian/changelog \
> + debian/control debian/control.stub debian/copyright \
> + debian/debian.env
> +
> # Builds the image, arch headers and debug packages
> include $(DEBIAN)/rules.d/2-binary-arch.mk
>
Uh, I guess this is ok. However, I tend to use a git-clean script to
make sure I've a clean workspace, especially when making a transition
between branches (which I do frequently):
#!/bin/bash
git checkout -f
git clean -f -d
git ls-files --others --directory | xargs rm -rf
rm -rf .git/rebase*
--
Tim Gardner tim.gardner at canonical.com
More information about the kernel-team
mailing list