GNU make reading the wrong makefile
I am creating a port that needs GNU make to compile. In my port's Makefile I have set:
However, when GNU make is executed, it appears to be reading Makefile and not GNUmakefile. From gmake(8)'s man page:
Setting default options according to architecture
My intention was for the port's default options to depending on the build architecture (the ARCH variable). Is this considered bad practice? portlint(1) complains that I am setting default options after including bsd.port.pre.mk. However, my makefile generates "malformed conditional" errors if I attempt to test ARCH before including the file.
Option dependent changes to files
I have a couple of files that need changes depending on the configuration options chosen. These are simple changes and I intend to achieve them by using ${REINPLACE_CMD} rather than trying to conditionally apply patches. I am currently running the replace in the post-configure target. I originally tried checking the chosen options in this target too, but received ".if" related errors. Moving them into the body of the makefile after including bsd.port.pre.mk appears to work. Where is the correct place to check for chosen options? I am already using the port infrastructure's capability to set RUN_DEPENDS based on chosen options without my having to script anything.
Archives within archives -- portlint warning about tar(1)
The distribution file for the port is a zip archive containing further zip archives and a tarball. At present, I am dealing with the further archives and tarball in the post-extract target. One of the commands calls tar(1). I could not find an alternative for the command in bsd.commands.mk, but portlint warns about it. Is there a better alternative?
I am creating a port that needs GNU make to compile. In my port's Makefile I have set:
Code:
USES= zip dos2unix gmake
When I execute GNU make manually, it uses GNUmakefile as I would expect. How can I make this happen in my port? I looked through the porter's handbook and dug through the files in /usr/ports/Mk but couldn't work out what I need to tweak.If no -f option is present, make will look for the makefiles GNUmakefile, makefile, and Makefile, in that order.
Setting default options according to architecture
My intention was for the port's default options to depending on the build architecture (the ARCH variable). Is this considered bad practice? portlint(1) complains that I am setting default options after including bsd.port.pre.mk. However, my makefile generates "malformed conditional" errors if I attempt to test ARCH before including the file.
Option dependent changes to files
I have a couple of files that need changes depending on the configuration options chosen. These are simple changes and I intend to achieve them by using ${REINPLACE_CMD} rather than trying to conditionally apply patches. I am currently running the replace in the post-configure target. I originally tried checking the chosen options in this target too, but received ".if" related errors. Moving them into the body of the makefile after including bsd.port.pre.mk appears to work. Where is the correct place to check for chosen options? I am already using the port infrastructure's capability to set RUN_DEPENDS based on chosen options without my having to script anything.
Archives within archives -- portlint warning about tar(1)
The distribution file for the port is a zip archive containing further zip archives and a tarball. At present, I am dealing with the further archives and tarball in the post-extract target. One of the commands calls tar(1). I could not find an alternative for the command in bsd.commands.mk, but portlint warns about it. Is there a better alternative?