[MacPorts] #62292: makefile-1.0: can't use makefile.has_destdir no with makefile.override PREFIX
MacPorts
noreply at macports.org
Sun Feb 14 11:00:17 UTC 2021
#62292: makefile-1.0: can't use makefile.has_destdir no with makefile.override
PREFIX
------------------------+----------------------
Reporter: ryandesign | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.99
Keywords: | Port: makefile
------------------------+----------------------
I'm working on fixing and modernizing the anacron portfile including
adopting the makefile 1.0 portgroup. For this port I need to use:
{{{
makefile.has_destdir no
makefile.override-append PREFIX
}}}
It doesn't work:
{{{
DEBUG: Executing org.macports.destroot (anacron)
DEBUG: Environment:
CC='/usr/bin/clang'
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build
/_Users_rschmidt_macports_macports-ports-svn-trunk-
new_sysutils_anacron/anacron/work/.CC_PRINT_OPTIONS'
CFLAGS='-Os -Werror=implicit-function-declaration -DHAVE_STDLIB_H -arch
x86_64 -arch i386 -arch x86_64 -arch i386'
CPATH='/opt/local/include'
CPPFLAGS='-I/opt/local/include'
CXX='/usr/bin/clang++'
CXXFLAGS='-Os -arch x86_64 -arch i386 -arch x86_64 -arch i386
-stdlib=libc++'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
F90FLAGS='-Os'
FCFLAGS='-Os'
FFLAGS='-Os'
INSTALL='/usr/bin/install -c'
LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64
-arch i386 -arch x86_64 -arch i386'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.13'
OBJC='/usr/bin/clang'
OBJCFLAGS='-Os -Werror=implicit-function-declaration -arch x86_64 -arch
i386 -arch x86_64 -arch i386'
OBJCXX='/usr/bin/clang++'
OBJCXXFLAGS='-Os -arch x86_64 -arch i386 -arch x86_64 -arch i386 -arch
x86_64 -arch i386 -stdlib=libc++'
PREFIX='$(DESTDIR)/opt/local'
Executing: cd "/opt/local/var/macports/build
/_Users_rschmidt_macports_macports-ports-svn-trunk-
new_sysutils_anacron/anacron/work/anacron-2.3" && /usr/bin/make -w install
PREFIX=$(DESTDIR)/opt/local CC="/usr/bin/clang" CXX="/usr/bin/clang++"
OBJC="/usr/bin/clang" OBJCXX="/usr/bin/clang++" INSTALL="/usr/bin/install
-c" DESTDIR=/opt/local/var/macports/build
/_Users_rschmidt_macports_macports-ports-svn-trunk-
new_sysutils_anacron/anacron/work/destroot
DEBUG: system: cd "/opt/local/var/macports/build
/_Users_rschmidt_macports_macports-ports-svn-trunk-
new_sysutils_anacron/anacron/work/anacron-2.3" && /usr/bin/make -w install
PREFIX=$(DESTDIR)/opt/local CC="/usr/bin/clang" CXX="/usr/bin/clang++"
OBJC="/usr/bin/clang" OBJCXX="/usr/bin/clang++" INSTALL="/usr/bin/install
-c" DESTDIR=/opt/local/var/macports/build
/_Users_rschmidt_macports_macports-ports-svn-trunk-
new_sysutils_anacron/anacron/work/destroot
sh: DESTDIR: command not found
make: Entering directory `/opt/local/var/macports/build
/_Users_rschmidt_macports_macports-ports-svn-trunk-
new_sysutils_anacron/anacron/work/anacron-2.3'
/usr/bin/install -c -d -m 0755 /opt/local/sbin
/opt/local/var/spool/anacron \
/opt/local/share/man/man5 /opt/local/share/man/man8
install: chmod 755 /opt/local/sbin: Operation not permitted
install: mkdir /opt/local/var/spool/anacron: Operation not permitted
make: *** [installdirs] Error 71
}}}
Note specifically:
{{{
PREFIX='$(DESTDIR)/opt/local'
}}}
and:
{{{
sh: DESTDIR: command not found
}}}
`$(DESTDIR)` is shell syntax for "run the program `DESTDIR`" and of course
there is no such program.
Setting `PREFIX` this way may work when it is just an environment
variable, but not when used as a command line override, unless further
escaping is applied.
--
Ticket URL: <https://trac.macports.org/ticket/62292>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list