TARGET redefinition inside makefile (command line)

Hi,

just a tiny suggestion for all arduino command line users and lovers (like me):

This redefinition of TARGET within the global makefile will automatically set target to the name of the current sketch dir, i.e. "Blink", if the makefile lies within this dir:

=== modified file 'hardware/cores/arduino/Makefile'
--- hardware/cores/arduino/Makefile     2008-08-17 14:50:09 +0000
+++ hardware/cores/arduino/Makefile     2008-08-17 14:52:52 +0000
@@ -36,7 +36,7 @@
 #
 # $Id$
 
-TARGET = foo
+TARGET = $(notdir $(CURDIR))
 INSTALL_DIR = /Applications/arduino-0011
 PORT = /dev/tty.usb*
 UPLOAD_RATE = 19200

It saves a little typing, because copying the global Makefile and modifying the TARGET manually is not more nesseccary. (So instead of a makefile copy for the current project a symlink should be enough.)

Björn

PS: I tested this on my mac with GNU Make 3.80.

Awesome. Thanks. I committed this change to the Makefile source, so it should be in the next release.