Skip to contentSkip to conversation

version in doxygen

PATCH In review Thomas Monjalon 2 participants 7 messages Jul 19, 2013 5 messages not in the archive

lore
Share & tools
lore
#0 lore raw

cover version in doxygen

These 2 patches allow to print the DPDK version in doxygen header.

Signature · 14 lines
Thomas

---

  mk: add rule to print version number
  mk: insert version number in doxygen config

 mk/rte.sdkconfig.mk |    6 ++++++
 mk/rte.sdkdoc.mk    |    2 ++
 mk/rte.sdkroot.mk   |    4 ++--
 3 files changed, 10 insertions(+), 2 deletions(-)

-- 
1.7.10.4
#2 lore raw

PATCH 1/2 mk: add rule to print version number

In reply to a message not in the archive

The version string is extracted from rte_version.h. RTE_VER_* macros are concatenated and separators " . . r " are inserted.

---
 mk/rte.sdkconfig.mk |    6 ++++++
 mk/rte.sdkroot.mk   |    4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)
mk/rte.sdkconfig.mk +6 -0
index 2c071a2..6eb389c 100644
@@ -31,6 +31,12 @@
 # 
 #  version: DPDK.L.1.2.3-3
 
+.PHONY: showversion
+showversion:
+	@sed -rn 's,^#define RTE_VER_[A-Z_]*[[:space:]]+([0-9]+).*,\1,p' \
+		$(RTE_SRCDIR)/lib/librte_eal/common/include/rte_version.h | \
+		tr '\n' '.' | sed -r 's,\.([0-9]+)\.$$,r\1\n,'
+
 INSTALL_CONFIGS := $(filter-out %~,\
 	$(patsubst $(RTE_SRCDIR)/config/defconfig_%,%,\
 	$(wildcard $(RTE_SRCDIR)/config/defconfig_*)))
mk/rte.sdkroot.mk +2 -2
index 905b678..b5126c0 100644
@@ -87,8 +87,8 @@ export ROOTDIRS-y ROOTDIRS- ROOTDIRS-n
 .PHONY: default
 default: all
 
-.PHONY: config showconfigs
-config showconfigs:
+.PHONY: config showconfigs showversion
+config showconfigs showversion:
 	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@
 
 .PHONY: test fast_test ring_test mempool_test
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH 2/2 mk: insert version number in doxygen config

In reply to a message not in the archive

The parameter PROJECT_NUMBER is used in the HTML header via the template variable $projectnumber.

---
 mk/rte.sdkdoc.mk |    2 ++
 1 file changed, 2 insertions(+)
mk/rte.sdkdoc.mk +2 -0
index 96eec69..d0cda7a 100644
@@ -54,6 +54,8 @@ htmlapi: htmlapi-clean
 	@echo 'doxygen for API...'
 	$(Q)mkdir -p $(RTE_OUTPUT)/doc/html
 	$(Q)(cat $(RTE_SDK)/doc/doxy-api.conf         && \
+	    printf 'PROJECT_NUMBER = '                && \
+	                      $(MAKE) -rR showversion && \
 	    echo OUTPUT_DIRECTORY = $(RTE_OUTPUT)/doc && \
 	    echo HTML_OUTPUT      = html/api          && \
 	    echo GENERATE_HTML    = YES               && \
Signature · 1 line
1.7.10.4
#9 lore raw

Re: [PATCH 2/2] mk: insert version number in doxygen config

In reply to a message not in the archive

it is just look n feel, just push it.

Quoted 22 lines · Thomas Monjalon

The parameter PROJECT_NUMBER is used in the HTML header via the template variable $projectnumber.

---
  mk/rte.sdkdoc.mk |    2 ++
  1 file changed, 2 insertions(+)
mk/rte.sdkdoc.mk +2 -0
index 96eec69..d0cda7a 100644
@@ -54,6 +54,8 @@ htmlapi: htmlapi-clean
  	@echo 'doxygen for API...'
  	$(Q)mkdir -p $(RTE_OUTPUT)/doc/html
  	$(Q)(cat $(RTE_SDK)/doc/doxy-api.conf         && \
+	    printf 'PROJECT_NUMBER = '                && \
+	                      $(MAKE) -rR showversion && \
  	    echo OUTPUT_DIRECTORY = $(RTE_OUTPUT)/doc && \
  	    echo HTML_OUTPUT      = html/api          && \
  	    echo GENERATE_HTML    = YES               && \
#4 lore raw

Re: [PATCH 1/2] mk: add rule to print version number

In reply to a message not in the archive

it is just look n feel, just push it.

Quoted 42 lines · Thomas Monjalon

The version string is extracted from rte_version.h. RTE_VER_* macros are concatenated and separators " . . r " are inserted.

---
  mk/rte.sdkconfig.mk |    6 ++++++
  mk/rte.sdkroot.mk   |    4 ++--
  2 files changed, 8 insertions(+), 2 deletions(-)
mk/rte.sdkconfig.mk +6 -0
index 2c071a2..6eb389c 100644
@@ -31,6 +31,12 @@
  #
  #  version: DPDK.L.1.2.3-3
 
+.PHONY: showversion
+showversion:
+	@sed -rn 's,^#define RTE_VER_[A-Z_]*[[:space:]]+([0-9]+).*,\1,p' \
+		$(RTE_SRCDIR)/lib/librte_eal/common/include/rte_version.h | \
+		tr '\n' '.' | sed -r 's,\.([0-9]+)\.$$,r\1\n,'
+
  INSTALL_CONFIGS := $(filter-out %~,\
  	$(patsubst $(RTE_SRCDIR)/config/defconfig_%,%,\
  	$(wildcard $(RTE_SRCDIR)/config/defconfig_*)))
mk/rte.sdkroot.mk +2 -2
index 905b678..b5126c0 100644
@@ -87,8 +87,8 @@ export ROOTDIRS-y ROOTDIRS- ROOTDIRS-n
  .PHONY: default
  default: all
 
-.PHONY: config showconfigs
-config showconfigs:
+.PHONY: config showconfigs showversion
+config showconfigs showversion:
  	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@
 
  .PHONY: test fast_test ring_test mempool_test