public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] tools/usb: Add Makefile
@ 2010-07-13  9:50 Davidlohr Bueso
  2010-07-14 11:29 ` Michał Nazarewicz
  0 siblings, 1 reply; 3+ messages in thread
From: Davidlohr Bueso @ 2010-07-13  9:50 UTC (permalink / raw)
  To: m.nazarewicz, dbrownell; +Cc: linux-kernel

Hi,

This patch adds a Makefile for building 'testusb'.

I am wondering if it should really still use usbdevfs (deprecated), instead of usbfs?

Thanks,
Davidlohr

Signed-off-by: Davidlohr Bueso <dave@gnu.org>

---
 tools/usb/Makefile |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 tools/usb/Makefile

diff --git a/tools/usb/Makefile b/tools/usb/Makefile
new file mode 100644
index 0000000..45b5cab
--- /dev/null
+++ b/tools/usb/Makefile
@@ -0,0 +1,14 @@
+# Makefile for building 'usbtest'
+
+CC = $(CROSS_COMPILE)gcc
+PTHREAD_LIBS = -lpthread
+WARNINGS = -Wall
+WARNINGS := $(WARNINGS) -Wextra
+CFLAGS = $(WARNINGS) -g $(PTHREAD_LIBS)
+
+all:
+	$(CC) $(CFLAGS) -o testusb testusb.c
+
+clean:
+	$(RM) testusb
+
-- 
1.7.0.4



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

* Re: [PATCH RESEND] tools/usb: Add Makefile
  2010-07-13  9:50 [PATCH RESEND] tools/usb: Add Makefile Davidlohr Bueso
@ 2010-07-14 11:29 ` Michał Nazarewicz
  2010-07-26 14:14   ` Davidlohr Bueso
  0 siblings, 1 reply; 3+ messages in thread
From: Michał Nazarewicz @ 2010-07-14 11:29 UTC (permalink / raw)
  To: dbrownell, Davidlohr Bueso; +Cc: linux-kernel

You should Cc it to linux-usb@vger.kernel.org as well.

On Tue, 13 Jul 2010 11:50:42 +0200, Davidlohr Bueso <dave.bueso@gmail.com> wrote:
> Hi,
>
> This patch adds a Makefile for building 'testusb'.
>
> I am wondering if it should really still use usbdevfs (deprecated),
> instead of usbfs?

Patches welcome... ;)  Personally I dunno, I just took David's code
and changes it a bit.

> Thanks,
> Davidlohr
>
> Signed-off-by: Davidlohr Bueso <dave@gnu.org>

I'd say the above is not acceptable as a commit message.  Please
include only the text that is intended to go to the commit message
above.  All additional comments may go under the “---” marker.

> ---
>  tools/usb/Makefile |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
>  create mode 100644 tools/usb/Makefile
>
> diff --git a/tools/usb/Makefile b/tools/usb/Makefile
> new file mode 100644
> index 0000000..45b5cab
> --- /dev/null
> +++ b/tools/usb/Makefile
> @@ -0,0 +1,14 @@
> +# Makefile for building 'usbtest'
> +
> +CC = $(CROSS_COMPILE)gcc
> +PTHREAD_LIBS = -lpthread
> +WARNINGS = -Wall
> +WARNINGS := $(WARNINGS) -Wextra

Is it necessary?  Wouldn't plain

WARNINGS = -Wall -Wextra

suffice?  I am aware “=” can be overridden by command line and
“:=” cannot but I'd use single line anyway.

> +CFLAGS = $(WARNINGS) -g $(PTHREAD_LIBS)
> +
> +all:
> +	$(CC) $(CFLAGS) -o testusb testusb.c

IMO, you should also include a rule for ffs-test, ie:

+all: testusb ffs-test
+
+%: %.c
+	$(CC) $(CFLAGS) -o $@ $^

Not tested.

> +
> +clean:
> +	$(RM) testusb

Instead:

> +	$(RM) testusb ffs-test

> +

Unnecessary empty line at EOF.

Other then that, I see no reason why not to include it.

-- 
Best regards,                                        _     _
| Humble Liege of Serenely Enlightened Majesty of  o' \,=./ `o
| Computer Science,  Michał "mina86" Nazarewicz       (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--

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

* Re: [PATCH RESEND] tools/usb: Add Makefile
  2010-07-14 11:29 ` Michał Nazarewicz
@ 2010-07-26 14:14   ` Davidlohr Bueso
  0 siblings, 0 replies; 3+ messages in thread
From: Davidlohr Bueso @ 2010-07-26 14:14 UTC (permalink / raw)
  To: Michał Nazarewicz; +Cc: dbrownell, linux-kernel

On Wed, 2010-07-14 at 13:29 +0200, Michał Nazarewicz wrote:
> You should Cc it to linux-usb@vger.kernel.org as well.
> 
> On Tue, 13 Jul 2010 11:50:42 +0200, Davidlohr Bueso <dave.bueso@gmail.com> wrote:
> > Hi,
> >
> > This patch adds a Makefile for building 'testusb'.
> >
> > I am wondering if it should really still use usbdevfs (deprecated),
> > instead of usbfs?
> 
> Patches welcome... ;)  Personally I dunno, I just took David's code
> and changes it a bit.
> 
I am modifying this a bit, will send patch when ready.

> > Thanks,
> > Davidlohr
> >
> > Signed-off-by: Davidlohr Bueso <dave@gnu.org>
> 
> I'd say the above is not acceptable as a commit message.  Please
> include only the text that is intended to go to the commit message
> above.  All additional comments may go under the “---” marker.
> 
> > ---
> >  tools/usb/Makefile |   14 ++++++++++++++
> >  1 files changed, 14 insertions(+), 0 deletions(-)
> >  create mode 100644 tools/usb/Makefile
> >
> > diff --git a/tools/usb/Makefile b/tools/usb/Makefile
> > new file mode 100644
> > index 0000000..45b5cab
> > --- /dev/null
> > +++ b/tools/usb/Makefile
> > @@ -0,0 +1,14 @@
> > +# Makefile for building 'usbtest'
> > +
> > +CC = $(CROSS_COMPILE)gcc
> > +PTHREAD_LIBS = -lpthread
> > +WARNINGS = -Wall
> > +WARNINGS := $(WARNINGS) -Wextra
> 
> Is it necessary?  Wouldn't plain
> 
> WARNINGS = -Wall -Wextra
> 
> suffice?  I am aware “=” can be overridden by command line and
> “:=” cannot but I'd use single line anyway.
> 
> > +CFLAGS = $(WARNINGS) -g $(PTHREAD_LIBS)
> > +
> > +all:
> > +	$(CC) $(CFLAGS) -o testusb testusb.c
> 
> IMO, you should also include a rule for ffs-test, ie:
> 
> +all: testusb ffs-test
> +
> +%: %.c
> +	$(CC) $(CFLAGS) -o $@ $^
> 
> Not tested.
> 
> > +
> > +clean:
> > +	$(RM) testusb
> 
> Instead:
> 
> > +	$(RM) testusb ffs-test
> 
> > +
> 
> Unnecessary empty line at EOF.
> 
> Other then that, I see no reason why not to include it.
> 
Sorry for the delay, I will redo the patch with the suggestions and
resend.

Thanks,
Davidlohr


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

end of thread, other threads:[~2010-07-26 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-13  9:50 [PATCH RESEND] tools/usb: Add Makefile Davidlohr Bueso
2010-07-14 11:29 ` Michał Nazarewicz
2010-07-26 14:14   ` Davidlohr Bueso

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