diff mbox

[v5,04/19] add distclean target and gitignore more

Message ID 1402495294-30737-5-git-send-email-drjones@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Jones June 11, 2014, 2:01 p.m. UTC
also add a check for config.mak in Makefile

Signed-off-by: Andrew Jones <drjones@redhat.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
---
 .gitignore | 5 +++++
 Makefile   | 9 ++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

Comments

Paolo Bonzini June 12, 2014, 10:36 a.m. UTC | #1
Il 11/06/2014 16:01, Andrew Jones ha scritto:
>  patches
>  .stgit-*
>  cscope.*
> +*.swp
> +/config.mak
> +/*-run
> +/test.log
> +/msr.out

I'd place swp, cscope, stgit and patches file in a global gitignore file 
("git config --global core.excludesfile /path/to/file") rather than 
polluting each repository.  But since you're adding to something that 
already exist (and since I also use vi :)), I'll apply this patch and 
content myself with sharing the git trick I have just learnt.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoffer Dall June 14, 2014, 1:17 p.m. UTC | #2
On Thu, Jun 12, 2014 at 12:36:00PM +0200, Paolo Bonzini wrote:
> Il 11/06/2014 16:01, Andrew Jones ha scritto:
> > patches
> > .stgit-*
> > cscope.*
> >+*.swp
> >+/config.mak
> >+/*-run
> >+/test.log
> >+/msr.out
> 
> I'd place swp, cscope, stgit and patches file in a global gitignore
> file ("git config --global core.excludesfile /path/to/file") rather
> than polluting each repository.  But since you're adding to
> something that already exist (and since I also use vi :)), I'll
> apply this patch and content myself with sharing the git trick I
> have just learnt.
> 

You can also add

set directory=~/.vim/swap

to your ~/.vimrc and not have to worry about this in any of your
directories ;)

-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/.gitignore b/.gitignore
index d6663ec10caf1..775d0dfd8263e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,8 @@ 
 patches
 .stgit-*
 cscope.*
+*.swp
+/config.mak
+/*-run
+/test.log
+/msr.out
diff --git a/Makefile b/Makefile
index 566d2bee771e1..7eeece84300df 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,13 @@ 
 
+ifeq ($(wildcard config.mak),)
+$(error run ./configure first. See ./configure -h)
+endif
+
 include config.mak
 
 DESTDIR := $(PREFIX)/share/qemu/tests
 
-.PHONY: arch_clean clean
+.PHONY: arch_clean clean distclean
 
 #make sure env CFLAGS variable is not used
 CFLAGS =
@@ -53,3 +57,6 @@  install:
 
 clean: arch_clean
 	$(RM) lib/.*.d $(libcflat) $(cflatobjs)
+
+distclean: clean
+	$(RM) config.mak $(TEST_DIR)-run test.log msr.out