Skip to contentSkip to conversation

samples/kdbus: drop wrong include

PATCH In review David Herrmann 2 participants 5 messages Mar 16, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 samples/kdbus: drop wrong include

There is no reason to use ./include/uapi/ directly from samples. If your system headers are not up-to-date, you _need_ to run "make headers-install" (which will install them to ./usr/ in your kernel tree) before building the examples. Otherwise, you will get warnings and build failures.

Once ./usr/ is updated with the correct headers, it contains everything we need, so drop -Iinclude/uapi from the kdbus-workers CFLAGS.

---
 samples/kdbus/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
samples/kdbus/Makefile +1 -3
index eee9b9a..e714602 100644
@@ -5,7 +5,5 @@ hostprogs-y += kdbus-workers
 
 always := $(hostprogs-y)
 
-HOSTCFLAGS_kdbus-workers.o +=		\
-	-I$(objtree)/usr/include/	\
-	-I$(objtree)/include/uapi/
+HOSTCFLAGS_kdbus-workers.o += -I$(objtree)/usr/include
 HOSTLOADLIBES_kdbus-workers := -lrt
Signature · 1 line
2.3.2
#1 lore raw

PATCH 2/4 Documentation/kdbus: fix out-of-tree builds

Don't use $(obj) to access source files, but use $(srctree)/$(src)/ instead. This fixes build issues if you use O= with a directory other than the source directory.

---
 Documentation/kdbus/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/kdbus/Makefile +1 -1
index f6d4912..d8e6bf3 100644
@@ -15,7 +15,7 @@ XMLFILES := $(addprefix $(obj)/,$(DOCS))
 MANFILES := $(patsubst %.xml, %.7, $(XMLFILES))
 HTMLFILES := $(patsubst %.xml, %.html, $(XMLFILES))
 
-XMLTO_ARGS := -m $(obj)/stylesheet.xsl
+XMLTO_ARGS := -m $(srctree)/$(src)/stylesheet.xsl
 
 %.7: %.xml
 	xmlto man $(XMLTO_ARGS) -o $(obj) $<
Signature · 1 line
2.3.2
#2 lore raw

PATCH 3/4 Documentation/kdbus: support quiet builds

In reply to David Herrmann

Add support for quiet builds, just like Documentation/DocBook/Makefile supports.

---
 Documentation/kdbus/Makefile | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
Documentation/kdbus/Makefile +13 -3
index d8e6bf3..af87641 100644
@@ -15,13 +15,23 @@ XMLFILES := $(addprefix $(obj)/,$(DOCS))
 MANFILES := $(patsubst %.xml, %.7, $(XMLFILES))
 HTMLFILES := $(patsubst %.xml, %.html, $(XMLFILES))
 
-XMLTO_ARGS := -m $(srctree)/$(src)/stylesheet.xsl
+XMLTO_ARGS := -m $(srctree)/$(src)/stylesheet.xsl --skip-validation
 
+quiet_cmd_db2man = MAN     $@
+      cmd_db2man = xmlto man $(XMLTO_ARGS) -o $(obj) $<
 %.7: %.xml
-	xmlto man $(XMLTO_ARGS) -o $(obj) $<
+	@(which xmlto > /dev/null 2>&1) || \
+	 (echo "*** You need to install xmlto ***"; \
+	  exit 1)
+	$(call cmd,db2man)
 
+quiet_cmd_db2html = HTML    $@
+      cmd_db2html = xmlto html-nochunks $(XMLTO_ARGS) -o $(obj) $<
 %.html: %.xml
-	xmlto html-nochunks $(XMLTO_ARGS) -o $(obj) $<
+	@(which xmlto > /dev/null 2>&1) || \
+	 (echo "*** You need to install xmlto ***"; \
+	  exit 1)
+	$(call cmd,db2html)
 
 mandocs: $(MANFILES)
 
Signature · 1 line
2.3.2
#3 lore raw

PATCH 4/4 selftests/kdbus: fix gitignore

In reply to David Herrmann

Drop unused elements from .gitignore (which are leftovers when documentation was placed in the same directory).
Add "kdbus-test" to .gitignore, which is the test binary of all kdbus selftests.

---
 tools/testing/selftests/kdbus/.gitignore | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
tools/testing/selftests/kdbus/.gitignore +1 -3
index 7b421f7..d3ef42f 100644
@@ -1,3 +1 @@
-*.7
-manpage.*
-*.proc
+kdbus-test
Signature · 1 line
2.3.2
#4 lore raw
In reply to David Herrmann
Quoted 10 lines · David Herrmann

There is no reason to use ./include/uapi/ directly from samples. If your system headers are not up-to-date, you _need_ to run "make headers-install" (which will install them to ./usr/ in your kernel tree) before building the examples. Otherwise, you will get warnings and build failures.

Once ./usr/ is updated with the correct headers, it contains everything we need, so drop -Iinclude/uapi from the kdbus-workers CFLAGS.

All 4 patches now applied, thanks.

greg k-h