[dpdk-dev] mk: Fix examples install path

Message ID 1450789995-23700-1-git-send-email-christian.ehrhardt@canonical.com (mailing list archive)
State Rejected, archived
Headers

Commit Message

Christian Ehrhardt Dec. 22, 2015, 1:13 p.m. UTC
  Depending on non-doc targets being built before and the setting of DESTDIR
the examples dir could in some cases not end up in the right target.
Reason is just a typo variable reference in the copy target.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
---

[diffstat]
 rte.sdkinstall.mk |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

[diff]
  

Comments

Thomas Monjalon Dec. 23, 2015, 9:37 p.m. UTC | #1
Hi,

2015-12-22 14:13, Christian Ehrhardt:
> Depending on non-doc targets being built before and the setting of DESTDIR
> the examples dir could in some cases not end up in the right target.
> Reason is just a typo variable reference in the copy target.
[...]
> -	$(Q)cp -a $(RTE_SDK)/examples $(DESTDIR)$(datadir)
> +	$(Q)cp -a $(RTE_SDK)/examples $(DESTDIR)$(docdir)

No, it was not a typo.
Do you really think the examples code should be in the doc dir
(i.e. /usr/share/doc/dpdk) instead of datadir (i.e. /usr/share/dpdk)?
  
Christian Ehrhardt Jan. 8, 2016, 11:02 a.m. UTC | #2
Hi Thomas,
sorry being away so long due to the Christmas break.

May bad assumption of being a typo was based on a coincidence combining

a) former packaging in ubuntu had it in fact under /usr/share/doc/dpdk (I
agree that just /usr/share/dpdk would be better)
b) if you just and only ran a build and install-doc (no other install
targets); the install failes just by missing the datadir

That lead me to the wrong assumption it might be in  /usr/share/doc/dpdk
intentionally.

But you are right, lets fix b) instead which is just a mkdir -p in the
makefile.
Alternative patch will follow.



Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd

On Wed, Dec 23, 2015 at 10:37 PM, Thomas Monjalon <thomas.monjalon@6wind.com
> wrote:

> Hi,
>
> 2015-12-22 14:13, Christian Ehrhardt:
> > Depending on non-doc targets being built before and the setting of
> DESTDIR
> > the examples dir could in some cases not end up in the right target.
> > Reason is just a typo variable reference in the copy target.
> [...]
> > -     $(Q)cp -a $(RTE_SDK)/examples $(DESTDIR)$(datadir)
> > +     $(Q)cp -a $(RTE_SDK)/examples $(DESTDIR)$(docdir)
>
> No, it was not a typo.
> Do you really think the examples code should be in the doc dir
> (i.e. /usr/share/doc/dpdk) instead of datadir (i.e. /usr/share/dpdk)?
>
  

Patch

diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index c159bf7..0db15c6 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -157,4 +157,4 @@  ifneq ($(wildcard $O/doc/*/*/*pdf),)
 	$(Q)$(call rte_mkdir,     $(DESTDIR)$(docdir)/guides)
 	$(Q)cp -a $O/doc/*/*/*pdf $(DESTDIR)$(docdir)/guides
 endif
-	$(Q)cp -a $(RTE_SDK)/examples $(DESTDIR)$(datadir)
+	$(Q)cp -a $(RTE_SDK)/examples $(DESTDIR)$(docdir)