Hi Yousong, I think I found where the problem is with environment variables for Makefile. If add MYVAR=something in MAKE_FLAGS this is passed as argument to "make", but it isn't set as an environment variable. So when make invokes another Makefile in a sub directory (like "libipvs") the variable isn't passed along, hence the issue with ipvsadm. In our case the only thing that works is to set the parameter with -D in CFLAGS
Best regards, Mauro On Wed, March 2, 2016 10:16, Mauro Mozzarelli wrote: > > On Wed, March 2, 2016 09:27, Yousong Zhou wrote: >> On 2 March 2016 at 17:15, Mauro Mozzarelli <[email protected]> wrote: >>> Hi, >>> >>> I need to pass environment variables to a Makefile (ipvsadm-1.26). I tried >>> using >>> MAKE_ARGS >>> as documented on the OpenWrt wiki but it is ignored. >>> >> >> MAKE_VARS can be used. See include/package-defaults.mk for details. > > That does not work either. I if I set for example HAVE_NL_3=1 it just gets > ignored > by an ifeq directive inside the Makefile (not the main Makefile, the one in > libipvs). > For this to work I need make to set HAVE_NL_3 as environment variable or to > run > > make HAVE_NL_3=1 > > So fare the only solution has been to define the variable in the #define > directive which > is in the code. > > >> >> p.s. you may also want to update that wiki page :) > > Gladly. How do I get access to update? > >> >> yousong >> >>> Please could anyone let me know how to? >>> >>> Mauro >>> _______________________________________________ >>> openwrt-devel mailing list >>> [email protected] >>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >> > > _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
