[dpdk-dev] Add error message when trying to use make option T= during build/clean

Message ID 1443542682-7088-1-git-send-email-francesco.montorsi@gmail.com (mailing list archive)
State Rejected, archived
Headers

Commit Message

Francesco Montorsi Sept. 29, 2015, 4:04 p.m. UTC
  From: Francesco Montorsi <fmontorsi@empirix.com>

---
 mk/rte.sdkbuild.mk | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Olivier Matz Oct. 13, 2015, 1:22 p.m. UTC | #1
Hi Francesco,

On 09/29/2015 06:04 PM, Francesco Montorsi wrote:
> From: Francesco Montorsi <fmontorsi@empirix.com>
> 
> ---
>  mk/rte.sdkbuild.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
> index 38ec7bd..013aa89 100644
> --- a/mk/rte.sdkbuild.mk
> +++ b/mk/rte.sdkbuild.mk
> @@ -29,6 +29,12 @@
>  #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>  #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>  
> +ifdef T
> +  ifeq ("$(origin T)", "command line")
> +    $(error "Cannot use T= with a build/clean target")
> +  endif
> +endif
> +
>  # If DESTDIR variable is given, install binary dpdk

I tested this patch but it breaks the "make install" command:

  $ make install T=x86_64-native-linuxapp-gcc
  make[5]: Nothing to be done for 'depdirs'.
  Configuration done
  rte.sdkbuild.mk:34: *** "Cannot use T= with a build/clean target".

As the T= argument is given as a command line variable, it is
propagated to the "$(MAKE) all" in rte.sdkinstall.mk.
So I think it's better to keep the current code as is, except if
you have a better idea.

Regards,
Olivier
  
Francesco Montorsi Oct. 14, 2015, 8:02 a.m. UTC | #2
Hi Olivier,
thanks for reviewing the patch. However for me it is logical that T= option
is used for "config" target and then for building/cleaning only O= is used.
However it is not logical for me that install target requires T= option
instead of O= option... or perhaps I'm missing something?

Thanks,
Francesco



2015-10-13 15:22 GMT+02:00 Olivier MATZ <olivier.matz@6wind.com>:

> Hi Francesco,
>
> On 09/29/2015 06:04 PM, Francesco Montorsi wrote:
> > From: Francesco Montorsi <fmontorsi@empirix.com>
> >
> > ---
> >  mk/rte.sdkbuild.mk | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
> > index 38ec7bd..013aa89 100644
> > --- a/mk/rte.sdkbuild.mk
> > +++ b/mk/rte.sdkbuild.mk
> > @@ -29,6 +29,12 @@
> >  #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
> >  #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> >
> > +ifdef T
> > +  ifeq ("$(origin T)", "command line")
> > +    $(error "Cannot use T= with a build/clean target")
> > +  endif
> > +endif
> > +
> >  # If DESTDIR variable is given, install binary dpdk
>
> I tested this patch but it breaks the "make install" command:
>
>   $ make install T=x86_64-native-linuxapp-gcc
>   make[5]: Nothing to be done for 'depdirs'.
>   Configuration done
>   rte.sdkbuild.mk:34: *** "Cannot use T= with a build/clean target".
>
> As the T= argument is given as a command line variable, it is
> propagated to the "$(MAKE) all" in rte.sdkinstall.mk.
> So I think it's better to keep the current code as is, except if
> you have a better idea.
>
> Regards,
> Olivier
>
  
Olivier Matz Oct. 21, 2015, 7:27 p.m. UTC | #3
Hi Francesco,

On 10/14/2015 10:02 AM, Francesco wrote:
> Hi Olivier,
> thanks for reviewing the patch. However for me it is logical that T=
> option is used for "config" target and then for building/cleaning only
> O= is used. However it is not logical for me that install target
> requires T= option instead of O= option... or perhaps I'm missing something?

Actually, the current behavior of install target is to build one or
several targets from templates given in the T=. To be clear, this line:

  make install T=*-native-linuxapp-gcc

is equivalent to:

  make config T=i686-native-linuxapp-gcc O=i686-native-linuxapp-gcc
  make O=i686-native-linuxapp-gcc
  make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc
  make O=x86_64-native-linuxapp-gcc
  make config T=x86_x32-native-linuxapp-gcc O=x86_x32-native-linuxapp-gcc
  make O=x86_x32-native-linuxapp-gcc

The target name "install" is probably not well chosen, and that's
probably why you are confused.

Mario is currently reworking the Makefiles to support the installation
of DPDK into a hierachical file system:

http://dpdk.org/ml/archives/dev/2015-October/024686.html
http://dpdk.org/ml/archives/dev/2015-October/025432.html

Regards,
Olivier
  

Patch

diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
index 38ec7bd..013aa89 100644
--- a/mk/rte.sdkbuild.mk
+++ b/mk/rte.sdkbuild.mk
@@ -29,6 +29,12 @@ 
 #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+ifdef T
+  ifeq ("$(origin T)", "command line")
+    $(error "Cannot use T= with a build/clean target")
+  endif
+endif
+
 # If DESTDIR variable is given, install binary dpdk
 
 #