All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] libtracefs: clean also docs by default
@ 2022-01-24 10:52 Krzysztof Kozlowski
  2022-01-24 10:52 ` [PATCH 2/2] libtracefs: fix utest linking path Krzysztof Kozlowski
  2022-02-04  2:41 ` [PATCH 1/2] libtracefs: clean also docs by default Steven Rostedt
  0 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-24 10:52 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Krzysztof Kozlowski

Logical is that `make clean` cleans everything done from build, not only
parts.  Leaving the documentation unclean requires additional step
when building for example Debian packages:

    $ dpkg-buildpackage -us -uc
    ...
    dpkg-source: info: local changes detected, the modified files are:

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 544684c1c37c..4650d15d64e9 100644
--- a/Makefile
+++ b/Makefile
@@ -375,6 +375,7 @@ samples: libtracefs.a force
 	$(Q)$(call descend,$(src)/samples,all)
 
 clean:
+	$(Q)$(call descend_clean,Documentation)
 	$(Q)$(call descend_clean,utest)
 	$(Q)$(call descend_clean,src)
 	$(Q)$(call descend_clean,samples)
-- 
2.32.0


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

* [PATCH 2/2] libtracefs: fix utest linking path
  2022-01-24 10:52 [PATCH 1/2] libtracefs: clean also docs by default Krzysztof Kozlowski
@ 2022-01-24 10:52 ` Krzysztof Kozlowski
  2022-02-04  2:44   ` Steven Rostedt
  2022-02-04  2:41 ` [PATCH 1/2] libtracefs: clean also docs by default Steven Rostedt
  1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-24 10:52 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Krzysztof Kozlowski

Build libraries are now in lib/.  This fixes test error:

    /usr/bin/ld: cannot find ..libtracefs/lib/tracefs/libtracefs.a: No such file or directory

Fixes: fe21539dc846 ("libtracefs: Build in the same directories as the source")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 utest/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utest/Makefile b/utest/Makefile
index d168b01a328c..74bf7e60b91d 100644
--- a/utest/Makefile
+++ b/utest/Makefile
@@ -12,7 +12,7 @@ OBJS += tracefs-utest.o
 
 LIBS += -lcunit				\
 	-ldl				\
-	$(obj)/lib/tracefs/libtracefs.a
+	$(obj)/lib/libtracefs.a
 
 OBJS := $(OBJS:%.o=$(bdir)/%.o)
 DEPS := $(OBJS:$(bdir)/%.o=$(bdir)/.%.d)
-- 
2.32.0


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

* Re: [PATCH 1/2] libtracefs: clean also docs by default
  2022-01-24 10:52 [PATCH 1/2] libtracefs: clean also docs by default Krzysztof Kozlowski
  2022-01-24 10:52 ` [PATCH 2/2] libtracefs: fix utest linking path Krzysztof Kozlowski
@ 2022-02-04  2:41 ` Steven Rostedt
  2022-02-04  8:59   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 6+ messages in thread
From: Steven Rostedt @ 2022-02-04  2:41 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: linux-trace-devel

On Mon, 24 Jan 2022 11:52:51 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> wrote:

> Logical is that `make clean` cleans everything done from build, not only
> parts.  Leaving the documentation unclean requires additional step
> when building for example Debian packages:
> 
>     $ dpkg-buildpackage -us -uc
>     ...
>     dpkg-source: info: local changes detected, the modified files are:

The reason we did this is because docs are not made by default.

(Yes you can say the same about utest, src and samples but those are all
code).

I've always kept the doc build (and cleanup) separate from the normal build.

Is it normal to remove the docs in other projects?

-- Steve



> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index 544684c1c37c..4650d15d64e9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -375,6 +375,7 @@ samples: libtracefs.a force
>  	$(Q)$(call descend,$(src)/samples,all)
>  
>  clean:
> +	$(Q)$(call descend_clean,Documentation)
>  	$(Q)$(call descend_clean,utest)
>  	$(Q)$(call descend_clean,src)
>  	$(Q)$(call descend_clean,samples)


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

* Re: [PATCH 2/2] libtracefs: fix utest linking path
  2022-01-24 10:52 ` [PATCH 2/2] libtracefs: fix utest linking path Krzysztof Kozlowski
@ 2022-02-04  2:44   ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2022-02-04  2:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: linux-trace-devel

On Mon, 24 Jan 2022 11:52:52 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> wrote:


Hi Krzysztof,

When submitting a patch, can you have the first word start with a capital
letter:

   "[PATCH 2/2] libtracefs: Fix utest linking path"


> Build libraries are now in lib/.  This fixes test error:
> 
>     /usr/bin/ld: cannot find ..libtracefs/lib/tracefs/libtracefs.a: No such file or directory
> 
> Fixes: fe21539dc846 ("libtracefs: Build in the same directories as the source")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>  utest/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utest/Makefile b/utest/Makefile
> index d168b01a328c..74bf7e60b91d 100644
> --- a/utest/Makefile
> +++ b/utest/Makefile
> @@ -12,7 +12,7 @@ OBJS += tracefs-utest.o
>  
>  LIBS += -lcunit				\
>  	-ldl				\
> -	$(obj)/lib/tracefs/libtracefs.a
> +	$(obj)/lib/libtracefs.a

I was thinking how this failed for me. But I now see that my make clean
never removed the old directory and library.

Thanks for this! I'll apply it.

-- Steve


>  
>  OBJS := $(OBJS:%.o=$(bdir)/%.o)
>  DEPS := $(OBJS:$(bdir)/%.o=$(bdir)/.%.d)


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

* Re: [PATCH 1/2] libtracefs: clean also docs by default
  2022-02-04  2:41 ` [PATCH 1/2] libtracefs: clean also docs by default Steven Rostedt
@ 2022-02-04  8:59   ` Krzysztof Kozlowski
  2022-02-04 13:21     ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-04  8:59 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-trace-devel

On 04/02/2022 03:41, Steven Rostedt wrote:
> On Mon, 24 Jan 2022 11:52:51 +0100
> Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> wrote:
> 
>> Logical is that `make clean` cleans everything done from build, not only
>> parts.  Leaving the documentation unclean requires additional step
>> when building for example Debian packages:
>>
>>     $ dpkg-buildpackage -us -uc
>>     ...
>>     dpkg-source: info: local changes detected, the modified files are:
> 
> The reason we did this is because docs are not made by default.
> 
> (Yes you can say the same about utest, src and samples but those are all
> code).
> 
> I've always kept the doc build (and cleanup) separate from the normal build.
> 
> Is it normal to remove the docs in other projects?

I don't know actually, but I find natural that clean removes all
objects, even ones not created by "make all".

I see your point, so I do not insist on this solution. I can fix the
incomplete cleaning on Debian package side.

Best regards,
Krzysztof

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

* Re: [PATCH 1/2] libtracefs: clean also docs by default
  2022-02-04  8:59   ` Krzysztof Kozlowski
@ 2022-02-04 13:21     ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2022-02-04 13:21 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: linux-trace-devel

On Fri, 4 Feb 2022 09:59:06 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> wrote:


> I don't know actually, but I find natural that clean removes all
> objects, even ones not created by "make all".

The main reason I like to keep documentation clean and code clean
separate, is because when I develop between different branches,
checking out an older one then a newer one, the make dependencies can
get screwed up. A make clean usually solves the issue when that
happens. But I don't want to rebuild the documentation every time I do
a make clean.

> 
> I see your point, so I do not insist on this solution. I can fix the
> incomplete cleaning on Debian package side.
> 

Great. I'll take the second patch and drop this one then.

Thanks for your contributions!

-- Steve

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

end of thread, other threads:[~2022-02-04 13:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 10:52 [PATCH 1/2] libtracefs: clean also docs by default Krzysztof Kozlowski
2022-01-24 10:52 ` [PATCH 2/2] libtracefs: fix utest linking path Krzysztof Kozlowski
2022-02-04  2:44   ` Steven Rostedt
2022-02-04  2:41 ` [PATCH 1/2] libtracefs: clean also docs by default Steven Rostedt
2022-02-04  8:59   ` Krzysztof Kozlowski
2022-02-04 13:21     ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.