mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/5] Refactor .gitignore and Makefile
@ 2015-01-29  2:27 Masahiro Yamada
  2015-01-29  2:27 ` [PATCH 1/5] gitignore: simplify .gitignore file with pattern "/barebox*" Masahiro Yamada
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-01-29  2:27 UTC (permalink / raw)
  To: barebox


Please apply this series to the for-next/misc branch
to avoid conflicts.


Masahiro Yamada (5):
  gitignore: simplify .gitignore file with pattern "/barebox*"
  gitignore: move "barebox_default_env*" to subdirectory
  gitignore: sync with Linux's .gitignore
  kbuild: simplify CLEAN_FILES with pattern "barebox*"
  kbuild: drop bogus "common/barebox_default_env*" from CLEAN_FILES

 .gitignore            | 41 +++++++++++++++--------------------------
 Makefile              | 10 +++-------
 defaultenv/.gitignore |  1 +
 3 files changed, 19 insertions(+), 33 deletions(-)
 create mode 100644 defaultenv/.gitignore

-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] gitignore: simplify .gitignore file with pattern "/barebox*"
  2015-01-29  2:27 [PATCH 0/5] Refactor .gitignore and Makefile Masahiro Yamada
@ 2015-01-29  2:27 ` Masahiro Yamada
  2015-01-29  2:27 ` [PATCH 2/5] gitignore: move "barebox_default_env*" to subdirectory Masahiro Yamada
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-01-29  2:27 UTC (permalink / raw)
  To: barebox

There is no source file prefixed "barebox" at the top directory.
Generated files there can be simply ignored with "/barebox*" pattern.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 .gitignore | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0456bfd..a71d814 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,22 +31,7 @@
 #
 tags
 TAGS
-barebox
-barebox.S
-barebox.bin
-barebox.srec
-barebox.netx
-barebox.s5p
-barebox.spi
-barebox.ubl
-barebox.zynq
-barebox.uimage
-barebox.map
-barebox.kwb
-barebox.kwbuart
-barebox.efi
-barebox.canon-a1100.bin
-barebox-flash-image
+/barebox*
 System.map
 Module.symvers
 barebox_default_env*
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/5] gitignore: move "barebox_default_env*" to subdirectory
  2015-01-29  2:27 [PATCH 0/5] Refactor .gitignore and Makefile Masahiro Yamada
  2015-01-29  2:27 ` [PATCH 1/5] gitignore: simplify .gitignore file with pattern "/barebox*" Masahiro Yamada
@ 2015-01-29  2:27 ` Masahiro Yamada
  2015-01-29  2:27 ` [PATCH 3/5] gitignore: sync with Linux's .gitignore Masahiro Yamada
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-01-29  2:27 UTC (permalink / raw)
  To: barebox

"barebox_default_env*" is not "Top-level generic files" because they
are generated in the defaultenv/ directory since commit 7fa10256c3f4
(defaultenv: Allow multiple defaultenvironment overlays).

The comment block of the top-level .gitignore says as follows:

  # NOTE! Don't add files that are generated in specific
  # subdirectories here. Add them in the ".gitignore" file
  # in that subdirectory instead.

Let's follow this rule.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 .gitignore            | 1 -
 defaultenv/.gitignore | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
 create mode 100644 defaultenv/.gitignore

diff --git a/.gitignore b/.gitignore
index a71d814..4f8769a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,7 +34,6 @@ TAGS
 /barebox*
 System.map
 Module.symvers
-barebox_default_env*
 
 #
 # git files that we don't want to ignore even it they are dot-files
diff --git a/defaultenv/.gitignore b/defaultenv/.gitignore
new file mode 100644
index 0000000..40e90d7
--- /dev/null
+++ b/defaultenv/.gitignore
@@ -0,0 +1 @@
+barebox_default_env*
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/5] gitignore: sync with Linux's .gitignore
  2015-01-29  2:27 [PATCH 0/5] Refactor .gitignore and Makefile Masahiro Yamada
  2015-01-29  2:27 ` [PATCH 1/5] gitignore: simplify .gitignore file with pattern "/barebox*" Masahiro Yamada
  2015-01-29  2:27 ` [PATCH 2/5] gitignore: move "barebox_default_env*" to subdirectory Masahiro Yamada
@ 2015-01-29  2:27 ` Masahiro Yamada
  2015-01-29  2:27 ` [PATCH 4/5] kbuild: simplify CLEAN_FILES with pattern "barebox*" Masahiro Yamada
  2015-01-29  2:27 ` [PATCH 5/5] kbuild: drop bogus "common/barebox_default_env*" from CLEAN_FILES Masahiro Yamada
  4 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-01-29  2:27 UTC (permalink / raw)
  To: barebox

The top .gitignore is getting close to Linux's one.
I am inclined to sync it more.

 - Add a missing comment block
 - Add missing patterns that have no impact (*.o.*, *.so.dbg)
 - Add prefix "/" to top-level generic files
 - Arrange the order for easier diff

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 .gitignore | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4f8769a..ce2be8a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,37 +3,41 @@
 # subdirectories here. Add them in the ".gitignore" file
 # in that subdirectory instead.
 #
+# NOTE! Please use 'git ls-files -i --exclude-standard'
+# command after changing this file, to see if there are
+# any tracked files which get ignored after the change.
+#
 # Normal rules
 #
-*~
 .*
-\#*\#
 *.o
+*.o.*
 *.a
 *.s
 *.ko
 *.so
+*.so.dbg
 *.mod.c
 *.i
 *.lst
 *.symtypes
 *.elf
+*.patch
 *.mcp
-*.orig
 *.bct
 *.dcd
 *.dcd.S
 *.bbenv
 *.bbenv.*
+Module.symvers
 
 #
 # Top-level generic files
 #
-tags
-TAGS
+/tags
+/TAGS
 /barebox*
-System.map
-Module.symvers
+/System.map
 
 #
 # git files that we don't want to ignore even it they are dot-files
@@ -68,8 +72,9 @@ GRTAGS
 GSYMS
 GTAGS
 
-# patches
-*.patch
+*.orig
+*~
+\#*\#
 
 # Kconfig presets
 all.config
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/5] kbuild: simplify CLEAN_FILES with pattern "barebox*"
  2015-01-29  2:27 [PATCH 0/5] Refactor .gitignore and Makefile Masahiro Yamada
                   ` (2 preceding siblings ...)
  2015-01-29  2:27 ` [PATCH 3/5] gitignore: sync with Linux's .gitignore Masahiro Yamada
@ 2015-01-29  2:27 ` Masahiro Yamada
  2015-01-29  8:42   ` Sascha Hauer
  2015-01-29  2:27 ` [PATCH 5/5] kbuild: drop bogus "common/barebox_default_env*" from CLEAN_FILES Masahiro Yamada
  4 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2015-01-29  2:27 UTC (permalink / raw)
  To: barebox

There is no source file prefixed "barebox" at the top directory.
Generated files there can be simply cleaned up "barebox*" pattern.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 Makefile | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 90a7eee..b5c6c91 100644
--- a/Makefile
+++ b/Makefile
@@ -951,13 +951,10 @@ endif # CONFIG_MODULES
 
 # Directories & files removed with 'make clean'
 CLEAN_DIRS  += $(MODVERDIR)
-CLEAN_FILES +=	barebox System.map include/generated/barebox_default_env.h \
-                .tmp_version .tmp_barebox* barebox.bin barebox.map barebox.S \
-		.tmp_kallsyms* common/barebox_default_env* barebox.ldr \
-		scripts/bareboxenv-target barebox-flash-image \
-		barebox.srec barebox.s5p barebox.ubl barebox.zynq \
-		barebox.uimage barebox.spi barebox.kwb barebox.kwbuart \
-		barebox.efi barebox.canon-a1100.bin
+CLEAN_FILES +=	barebox* System.map include/generated/barebox_default_env.h \
+                .tmp_version .tmp_barebox* \
+		.tmp_kallsyms* common/barebox_default_env* \
+		scripts/bareboxenv-target
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config usr/include include/generated
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 5/5] kbuild: drop bogus "common/barebox_default_env*" from CLEAN_FILES
  2015-01-29  2:27 [PATCH 0/5] Refactor .gitignore and Makefile Masahiro Yamada
                   ` (3 preceding siblings ...)
  2015-01-29  2:27 ` [PATCH 4/5] kbuild: simplify CLEAN_FILES with pattern "barebox*" Masahiro Yamada
@ 2015-01-29  2:27 ` Masahiro Yamada
  4 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2015-01-29  2:27 UTC (permalink / raw)
  To: barebox

Since commit 7fa10256c3f4 (defaultenv: Allow multiple
defaultenvironment overlays), barebox_default_env* is created
in the defaultenv/ directory.  They are cleaned up when
"make clean" descends into the defaultenv/ directory.

We can simply delete "common/barebox_default_env*" from the
top Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index b5c6c91..ca546e9 100644
--- a/Makefile
+++ b/Makefile
@@ -952,8 +952,7 @@ endif # CONFIG_MODULES
 # Directories & files removed with 'make clean'
 CLEAN_DIRS  += $(MODVERDIR)
 CLEAN_FILES +=	barebox* System.map include/generated/barebox_default_env.h \
-                .tmp_version .tmp_barebox* \
-		.tmp_kallsyms* common/barebox_default_env* \
+		.tmp_version .tmp_barebox* .tmp_kallsyms* \
 		scripts/bareboxenv-target
 
 # Directories & files removed with 'make mrproper'
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/5] kbuild: simplify CLEAN_FILES with pattern "barebox*"
  2015-01-29  2:27 ` [PATCH 4/5] kbuild: simplify CLEAN_FILES with pattern "barebox*" Masahiro Yamada
@ 2015-01-29  8:42   ` Sascha Hauer
  0 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2015-01-29  8:42 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: barebox

On Thu, Jan 29, 2015 at 11:27:55AM +0900, Masahiro Yamada wrote:
> There is no source file prefixed "barebox" at the top directory.
> Generated files there can be simply cleaned up "barebox*" pattern.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Applied the rest but I'm unsure with this one. I sometimes put some
temporary files into the toplevel barebox directory and I'm probably not
the only one doing this. I usually don't want them to be deleted when
they start with "barebox" (which might not be uncommon during barebox
development).

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-29  8:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29  2:27 [PATCH 0/5] Refactor .gitignore and Makefile Masahiro Yamada
2015-01-29  2:27 ` [PATCH 1/5] gitignore: simplify .gitignore file with pattern "/barebox*" Masahiro Yamada
2015-01-29  2:27 ` [PATCH 2/5] gitignore: move "barebox_default_env*" to subdirectory Masahiro Yamada
2015-01-29  2:27 ` [PATCH 3/5] gitignore: sync with Linux's .gitignore Masahiro Yamada
2015-01-29  2:27 ` [PATCH 4/5] kbuild: simplify CLEAN_FILES with pattern "barebox*" Masahiro Yamada
2015-01-29  8:42   ` Sascha Hauer
2015-01-29  2:27 ` [PATCH 5/5] kbuild: drop bogus "common/barebox_default_env*" from CLEAN_FILES Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox