Yasuhiro KIMURA
2018-Nov-16 16:57 UTC
Getting value of MAKEOBJDIRPREFIX with 'make -V MAKEOBJDIRPREFIX'
Hello, I'm writing shell script to build and install base system from source and -V option of make(1) is used in it to get value of MAKEOBJDIRPREFIX. By default it works fine with all of head, releng/11.2, releng/12.0, stable/11 and stable/12. yasu at eastasia[2389]% svn info /usr0/freebsd/base/head Path: /usr0/freebsd/base/head Working Copy Root Path: /usr0/freebsd/base/head URL: https://svn.freebsd.org/base/head Relative URL: ^/head Repository Root: https://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 340474 Node Kind: directory Schedule: normal Last Changed Author: karels Last Changed Rev: 340474 Last Changed Date: 2018-11-16 12:42:29 +0900 (Fri, 16 Nov 2018) yasu at eastasia[2390]% make -V MAKEOBJDIRPREFIX -C /usr0/freebsd/base/head /usr/obj yasu at eastasia[2391]% svn info /usr0/freebsd/base/releng/11.2 Path: /usr0/freebsd/base/releng/11.2 Working Copy Root Path: /usr0/freebsd/base/releng/11.2 URL: https://svn.freebsd.org/base/releng/11.2 Relative URL: ^/releng/11.2 Repository Root: https://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 338990 Node Kind: directory Schedule: normal Last Changed Author: gordon Last Changed Rev: 338981 Last Changed Date: 2018-09-28 03:36:30 +0900 (Fri, 28 Sep 2018) yasu at eastasia[2392]% make -V MAKEOBJDIRPREFIX -C /usr0/freebsd/base/releng/11.2 /usr/obj yasu at eastasia[2393]% svn info /usr0/freebsd/base/releng/12.0 Path: /usr0/freebsd/base/releng/12.0 Working Copy Root Path: /usr0/freebsd/base/releng/12.0 URL: https://svn.freebsd.org/base/releng/12.0 Relative URL: ^/releng/12.0 Repository Root: https://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 340471 Node Kind: directory Schedule: normal Last Changed Author: gjb Last Changed Rev: 340470 Last Changed Date: 2018-11-16 09:00:59 +0900 (Fri, 16 Nov 2018) yasu at eastasia[2394]% make -C /usr0/freebsd/base/releng/12.0 -V MAKEOBJDIRPREFIX /usr/obj yasu at eastasia[2395]% svn info /usr0/freebsd/base/stable/11 Path: /usr0/freebsd/base/stable/11 Working Copy Root Path: /usr0/freebsd/base/stable/11 URL: https://svn.freebsd.org/base/stable/11 Relative URL: ^/stable/11 Repository Root: https://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 340473 Node Kind: directory Schedule: normal Last Changed Author: ygy Last Changed Rev: 340449 Last Changed Date: 2018-11-15 17:43:17 +0900 (Thu, 15 Nov 2018) yasu at eastasia[2396]% make -V MAKEOBJDIRPREFIX -C /usr0/freebsd/base/stable/11 /usr/obj yasu at eastasia[2397]% svn info /usr0/freebsd/base/stable/12 Path: /usr0/freebsd/base/stable/12 Working Copy Root Path: /usr0/freebsd/base/stable/12 URL: https://svn.freebsd.org/base/stable/12 Relative URL: ^/stable/12 Repository Root: https://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 340474 Node Kind: directory Schedule: normal Last Changed Author: gjb Last Changed Rev: 340471 Last Changed Date: 2018-11-16 09:03:31 +0900 (Fri, 16 Nov 2018) yasu at eastasia[2398]% make -V MAKEOBJDIRPREFIX -C /usr0/freebsd/base/stable/12 /usr/obj But if I customize value of MAKEOBJDIRPREFIX then it still works with releng/11.2 and stable/11 but doesn't with head, releng/12.0 and stable/12. yasu at eastasia[2399]% env MAKEOBJDIRPREFIX=/usr0/freebsd/base/ogj make -V MAKEOBJDIRPREFIX -C /usr0/freebsd/base/head yasu at eastasia[2400]% env MAKEOBJDIRPREFIX=/usr0/freebsd/base/ogj make -V MAKEOBJDIRPREFIX -C /usr0/freebsd/base/releng/11.2 /usr0/freebsd/base/ogj yasu at eastasia[2401]% env MAKEOBJDIRPREFIX=/usr0/freebsd/base/ogj make -V MAKEOBJDIRPREFIX -C /usr0/freebsd/base/releng/12.0 yasu at eastasia[2402]% env MAKEOBJDIRPREFIX=/usr0/freebsd/base/ogj make -V MAKEOBJDIRPREFIX -C /usr0/freebsd/base/stable/11 /usr0/freebsd/base/ogj yasu at eastasia[2403]% env MAKEOBJDIRPREFIX=/usr0/freebsd/base/ogj make -V MAKEOBJDIRPREFIX -C /usr0/freebsd/base/stable/12 yasu at eastasia[2404]% I used env(1) to customize but I got same results when I use src-env.conf. Then is this just bug? Or are there any reason that behavior is changed from 11.x to 12.x and later? Best Regards. --- Yasuhiro KIMURA
Yasuhiro KIMURA
2018-Nov-17 00:18 UTC
Getting value of MAKEOBJDIRPREFIX with 'make -V MAKEOBJDIRPREFIX'
From: Yasuhiro KIMURA <yasu at utahime.org> Subject: Getting value of MAKEOBJDIRPREFIX with 'make -V MAKEOBJDIRPREFIX' Date: Sat, 17 Nov 2018 01:57:58 +0900 (JST)> Then is this just bug? Or are there any reason that behavior is > changed from 11.x to 12.x and later?To find when behavior changed I bisected head from r302408 (revision that stable/11 is cleated) to r340439 and got following result. Order Revision Does 'make -V MAKEOBJDIRPREFIX` work? ---------------------------------------------------------------------- 1 302408 Yes 2 340439 No 3 323176 Yes 4 332305 No 5 327441 No 6 325415 No 7 324362 Yes 8 324940 Yes 9 325181 Yes 10 325295 No 11 325248 Yes 12 325271 Yes 13 325285 Yes 14 325290 No 15 325288 No 16 325287 Yes That is, behavior changed at r325288. And commit message says as following. ---------------------------------------------------------------------- Add option UNIFIED_OBJDIR, on by default, which moves the default build OBJDIR. This changes the build OBJDIR from the older style of /usr/obj/<srcdir> for native builds, and /usr/obj/<target>.<target_arch>/<srcdir> for cross builds to a new simpler format of /usr/obj/<srcdir>/<target>.<target_arch>. This new format is used regardless of cross or native build. It allows easier management of multiple source tree object directories. The UNIFIED_OBJDIR option will be removed and its feature made permanent for the 12.0 release. ---------------------------------------------------------------------- As far as I read this, behavior change of 'make -V MAKEOBJDIRPREFIX` doesn't seem intentional. So I'll submit bug report. --- Yasuhiro KIMURA