Ports Makefile rules install vs do-install
- Reply: Gleb Popov : "Re: Ports Makefile rules install vs do-install"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 28 May 2021 07:22:54 UTC
Hi, This is only my second port, the first has never been released. So please be indulgent. I'm porting rudder agent (https://www.rudder.io) to FreeBSD. My Makefile is very simple : > PORTNAME=Â Â Â Â Â Â rudder-agent > DISTVERSION=Â Â Â 6.2.7 > CATEGORIES=Â Â Â Â Â Â sysutils > MASTER_SITES=Â Â Â https://github.com/WHATEVER > > MAINTAINER=Â Â Â Â Â Â xavier@amdh.fr > COMMENT=Â Â Â Â Â Â Agent for Rudder > > LICENSE=Â Â Â Â Â Â GPLv2+ > SHORT_NAME=Â Â Â Â Â Â rudder > NO_BUILD=Â Â Â yes > NO_ARCH=Â Â Â yes > > USE_GITHUB=Â Â Â yes > GH_ACCOUNT= > GH_PROJECT= > > BUILD_DEPENDS+=shellcheck:devel/hs-ShellCheck > > post-patch: > Â Â Â @${REINPLACE_CMD} \ > Â Â Â Â Â Â -e s=/'bin/bash'=/'bin/sh'= \ > Â Â Â Â Â Â -e s='\^\#\!'='^#\\!'= \ > Â Â Â Â Â Â ${WRKSRC}/qa-test > > post-extract: > Â Â Â cd ${WRKSRC}/man && make all > > do-install: > Â Â Â ${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d > Â Â Â ${MKDIR} ${STAGEDIR}${PREFIX}/${SHORT_NAME}/share/commands > Â Â Â ${MKDIR} ${STAGEDIR}${PREFIX}/${SHORT_NAME}/share/lib > Â Â Â ${INSTALL_SCRIPT} ${WRKSRC}/bin/${SHORT_NAME} > ${STAGEDIR}${PREFIX}/bin > Â Â Â ${INSTALL_SCRIPT} ${WRKSRC}/share/commands/* > ${STAGEDIR}${PREFIX}/${SHORT_NAME}/share/commands > Â Â Â ${INSTALL_SCRIPT} > ${WRKSRC}/etc/bash_completion.d/${SHORT_NAME}.sh > ${STAGEDIR}${PREFIX}/etc/bash_completion.d/ > .for ii in package_upgrade.py timestamp > Â Â Â ${INSTALL_SCRIPT} ${WRKSRC}/share/lib/${ii} > ${STAGEDIR}${PREFIX}/${SHORT_NAME}/share/lib > .endfor > .for f in api_call.sh cfengine_parsing.sh common.sh report.sh reports.awk > Â Â Â ${INSTALL_DATA} ${WRKSRC}/share/lib/${f} > ${STAGEDIR}${PREFIX}/${SHORT_NAME}/share/lib > .endfor > Â Â Â ${INSTALL_MAN} ${WRKSRC}/man/${SHORT_NAME}.8 > ${STAGEDIR}${PREFIX}/share/man/man8/ > > do-test: # runs the qa testsuite > Â Â Â @cd ${INSTALL_WRKSRC} && ${WRKSRC}/qa-test The problem is : * target "do-install" is not invoked if I call make install. * calling manually "make do-install" stages the port correctly. * if I rename this target to "install", it complains about "work/rudder-agent-6.2.7/Makefile" missing, despite the flag NO_BUILD= yes * the pkg-plist is conform * however, the target "do-test" is correctly called by "make test" I've carefully read the Porter's Handbook, and can't see where my mistake is. I'm not a Makefile guru. Thanks for help, Regards, Xavier -- Xavier HUMBERT - Unix/Win/MacOSX Sysadmin/Network Senior Engineer https://www.amdh.fr