* [PATCH i2c-tools] tools/Module.mk: Add missing dependencies
@ 2017-12-12 20:33 Jean Delvare
2017-12-13 10:36 ` Angelo Compagnucci
0 siblings, 1 reply; 6+ messages in thread
From: Jean Delvare @ 2017-12-12 20:33 UTC (permalink / raw)
To: Linux I2C
Better build the library before building the tools which link against
it, otherwise parallel builds could run into a race and break.
---
lib/Module.mk | 7 +++++++
tools/Module.mk | 10 +++++-----
2 files changed, 12 insertions(+), 5 deletions(-)
--- a/lib/Module.mk
+++ b/lib/Module.mk
@@ -35,6 +35,13 @@ LIB_TARGETS += $(LIB_STLIBNAME)
LIB_OBJECTS += smbus.ao
endif
+# Library file to link against (static or dynamic)
+ifeq ($(USE_STATIC_LIB),1)
+LIB_DEPS := $(LIB_DIR)/$(LIB_STLIBNAME)
+else
+LIB_DEPS := $(LIB_DIR)/$(LIB_SHBASENAME)
+endif
+
#
# Libraries
#
--- a/tools/Module.mk
+++ b/tools/Module.mk
@@ -24,19 +24,19 @@ TOOLS_TARGETS := i2cdetect i2cdump i2cse
# Programs
#
-$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o
+$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o $(LIB_DEPS)
$(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
-$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
+$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
$(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
-$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
+$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
$(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
-$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
+$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
$(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
-$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
+$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
$(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
#
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i2c-tools] tools/Module.mk: Add missing dependencies
2017-12-12 20:33 [PATCH i2c-tools] tools/Module.mk: Add missing dependencies Jean Delvare
@ 2017-12-13 10:36 ` Angelo Compagnucci
2017-12-14 7:53 ` Jean Delvare
0 siblings, 1 reply; 6+ messages in thread
From: Angelo Compagnucci @ 2017-12-13 10:36 UTC (permalink / raw)
To: Jean Delvare; +Cc: Linux I2C
On Tue, Dec 12, 2017 at 9:33 PM, Jean Delvare <jdelvare@suse.de> wrote:
> Better build the library before building the tools which link against
> it, otherwise parallel builds could run into a race and break.
Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Acked-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> ---
> lib/Module.mk | 7 +++++++
> tools/Module.mk | 10 +++++-----
> 2 files changed, 12 insertions(+), 5 deletions(-)
>
> --- a/lib/Module.mk
> +++ b/lib/Module.mk
> @@ -35,6 +35,13 @@ LIB_TARGETS += $(LIB_STLIBNAME)
> LIB_OBJECTS += smbus.ao
> endif
>
> +# Library file to link against (static or dynamic)
> +ifeq ($(USE_STATIC_LIB),1)
> +LIB_DEPS := $(LIB_DIR)/$(LIB_STLIBNAME)
> +else
> +LIB_DEPS := $(LIB_DIR)/$(LIB_SHBASENAME)
> +endif
> +
> #
> # Libraries
> #
> --- a/tools/Module.mk
> +++ b/tools/Module.mk
> @@ -24,19 +24,19 @@ TOOLS_TARGETS := i2cdetect i2cdump i2cse
> # Programs
> #
>
> -$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o
> +$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o $(LIB_DEPS)
> $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
>
> -$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
> +$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
> $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
>
> -$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
> +$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
> $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
>
> -$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
> +$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
> $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
>
> -$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
> +$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
> $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
>
> #
>
>
> --
> Jean Delvare
> SUSE L3 Support
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i2c-tools] tools/Module.mk: Add missing dependencies
2017-12-13 10:36 ` Angelo Compagnucci
@ 2017-12-14 7:53 ` Jean Delvare
2017-12-14 8:12 ` Angelo Compagnucci
0 siblings, 1 reply; 6+ messages in thread
From: Jean Delvare @ 2017-12-14 7:53 UTC (permalink / raw)
To: Angelo Compagnucci; +Cc: Linux I2C
On Wed, 13 Dec 2017 11:36:31 +0100, Angelo Compagnucci wrote:
> On Tue, Dec 12, 2017 at 9:33 PM, Jean Delvare <jdelvare@suse.de> wrote:
> > Better build the library before building the tools which link against
> > it, otherwise parallel builds could run into a race and break.
>
> Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> Acked-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Thank you Angelo, your review and testing is highly appreciated :-)
Fix committed.
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i2c-tools] tools/Module.mk: Add missing dependencies
2017-12-14 7:53 ` Jean Delvare
@ 2017-12-14 8:12 ` Angelo Compagnucci
2017-12-14 8:19 ` Jean Delvare
0 siblings, 1 reply; 6+ messages in thread
From: Angelo Compagnucci @ 2017-12-14 8:12 UTC (permalink / raw)
To: Jean Delvare; +Cc: Linux I2C
On Thu, Dec 14, 2017 at 8:53 AM, Jean Delvare <jdelvare@suse.de> wrote:
> On Wed, 13 Dec 2017 11:36:31 +0100, Angelo Compagnucci wrote:
>> On Tue, Dec 12, 2017 at 9:33 PM, Jean Delvare <jdelvare@suse.de> wrote:
>> > Better build the library before building the tools which link against
>> > it, otherwise parallel builds could run into a race and break.
>>
>> Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
>> Acked-by: Angelo Compagnucci <angelo@amarulasolutions.com>
>
> Thank you Angelo, your review and testing is highly appreciated :-)
You're welcome! Could you please review this one:
https://patchwork.ozlabs.org/patch/847141/
Thanks!
>
> Fix committed.
>
> --
> Jean Delvare
> SUSE L3 Support
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i2c-tools] tools/Module.mk: Add missing dependencies
2017-12-14 8:12 ` Angelo Compagnucci
@ 2017-12-14 8:19 ` Jean Delvare
2017-12-14 8:28 ` Angelo Compagnucci
0 siblings, 1 reply; 6+ messages in thread
From: Jean Delvare @ 2017-12-14 8:19 UTC (permalink / raw)
To: Angelo Compagnucci; +Cc: Linux I2C
On Thu, 14 Dec 2017 09:12:58 +0100, Angelo Compagnucci wrote:
> On Thu, Dec 14, 2017 at 8:53 AM, Jean Delvare <jdelvare@suse.de> wrote:
> > Thank you Angelo, your review and testing is highly appreciated :-)
>
> You're welcome! Could you please review this one:
> https://patchwork.ozlabs.org/patch/847141/
Certainly. I don't think I received that one, you forgot to Cc me maybe?
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i2c-tools] tools/Module.mk: Add missing dependencies
2017-12-14 8:19 ` Jean Delvare
@ 2017-12-14 8:28 ` Angelo Compagnucci
0 siblings, 0 replies; 6+ messages in thread
From: Angelo Compagnucci @ 2017-12-14 8:28 UTC (permalink / raw)
To: Jean Delvare; +Cc: Linux I2C
On Thu, Dec 14, 2017 at 9:19 AM, Jean Delvare <jdelvare@suse.de> wrote:
> On Thu, 14 Dec 2017 09:12:58 +0100, Angelo Compagnucci wrote:
>> On Thu, Dec 14, 2017 at 8:53 AM, Jean Delvare <jdelvare@suse.de> wrote:
>> > Thank you Angelo, your review and testing is highly appreciated :-)
>>
>> You're welcome! Could you please review this one:
>> https://patchwork.ozlabs.org/patch/847141/
>
> Certainly. I don't think I received that one, you forgot to Cc me maybe?
Yes, unfortunately ...
Thanks!
>
> --
> Jean Delvare
> SUSE L3 Support
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-12-14 8:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-12 20:33 [PATCH i2c-tools] tools/Module.mk: Add missing dependencies Jean Delvare
2017-12-13 10:36 ` Angelo Compagnucci
2017-12-14 7:53 ` Jean Delvare
2017-12-14 8:12 ` Angelo Compagnucci
2017-12-14 8:19 ` Jean Delvare
2017-12-14 8:28 ` Angelo Compagnucci
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox