How to reproduce: revision: base r354233 https://svn.freebsd.org/base/releng/12.1 make buildworld make MAKEOBJDIRPREFIX=/home/rj/RELENG_12_1.obj DESTDIR=/home/rj/RELENG_12_1.tmpl distrib-dirs distribution ... cd /usr/src/etc/sendmail; make distribution install -N /usr/src/etc -o root -g wheel -m 644 /usr/src/etc/sendmail/freebsd.mc freebsd.cf /home/rj/RELENG_12_1.tmpl/etc/mail install: freebsd.cf: No such file or directory *** Error code 71 Stop. make[3]: stopped in /usr/src/etc/sendmail *** Error code 1 Stop. make[2]: stopped in /usr/src/etc *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src root@ns2:/usr/src # ll /usr/src/etc/sendmail/ total 18 -rw-r--r-- 1 root wheel 2783 Nov 4 01:06 Makefile -rw-r--r-- 1 root wheel 256 Nov 4 01:06 Makefile.depend -rw-r--r-- 1 root wheel 4535 Nov 4 01:06 freebsd.mc -rw-r--r-- 1 root wheel 896 Nov 4 01:06 freebsd.submit.mc -rw-r--r-- 1 root wheel 2259 Nov 4 01:06 freefall.mc
This problem exists even for this command (with MAKEOBJDIRPREFIX=/usr/obj): ``` make MAKEOBJDIRPREFIX=/usr/obj DESTDIR=/home/rj/RELENG_12_1.tmpl distrib-dirs distribution ``` However for this command (with unspecified MAKEOBJDIRPREFIX variable) it works fine as expected: ``` make DESTDIR=/home/rj/RELENG_12_1.tmpl distrib-dirs distribution ```
(In reply to oklaspec from comment #1) Quoting the build man page: MAKEOBJDIRPREFIX Defines the prefix for directory names in the tree of built objects. Defaults to /usr/obj if not defined. This variable should only be set in the environment or /etc/src-env.conf and not via /etc/make.conf or /etc/src.conf or the command line. Note that last: not to be set in the command line (after "make"). So: make MAKEOBJDIRPREFIX=/usr/obj DESTDIR=/home/rj/RELENG_12_1.tmpl distrib-dirs distribution is inappropriate. Possibly presuming a specific shell type: env MAKEOBJDIRPREFIX=/usr/obj make DESTDIR=/home/rj/RELENG_12_1.tmpl distrib-dirs distribution would be appropriate (set in the environment) . You may wat to try that.
Thanks, I have sh script so `export` works fine for me. I did not tried using `env` but it must works too.