maintainer-feedback requested: [Bug 244695] devel/apr1: post-patch breaks tomcat-native build with gmake

bugzilla-noreply at bugzilla-noreply at
Mon Mar 9 13:29:21 UTC 2020

Bugzilla Automation <bugzilla at> has asked freebsd-apache mailing
list <apache at> for maintainer-feedback:
Bug 244695: devel/apr1: post-patch breaks tomcat-native build with gmake

--- Description ---
Tomcat committer here, just discovered this while working on upstream patches
for tomcat-native on FreeBSD.

This happens when building from tomcat-native.git as well as source tarball
1.2.23. This does not happen with www/tomcat-native (explanation follows).

After performing ./buildconf and ./configure, gmake says:
> osipovmi at deblndw011x:~/var/Projekte/tomcat-native/native (master %=)
> $ LC_ALL=C gmake
> gmake: *** No rule to make target '.MAKE', needed by 'all-recursive'.  Stop.

But there is no such target in tcnative.
> osipovmi at deblndw011x:~/var/Projekte/tomcat-native/native (master %=)
> $ grep -r \\.MAKE .
> ./build/ depend-recursive: .MAKE
> ./build/ distclean-recursive extraclean-recursive:

./build/ is copied during ./configure from
> cp /usr/local/share/apr/build-1/

which is
> osipovmi at deblndw011x:~/var/Projekte/tomcat-native/native (master %=)
> $ grep -r \\.MAKE /usr/local/share/apr/build-1/
> all-recursive depend-recursive: .MAKE
> clean-recursive distclean-recursive extraclean-recursive: .MAKE

I have then compiled apr-1.7.x straight from the Subversion repo from ASF and
> osipovmi at deblndw011x:/tmp/apr-1.7.x
> $ grep -r \\.MAKE build-1/

So this exists in the port only. It turns out that the port Makefile does this
> root at deblndw011x:/usr/ports/devel/apr1
> # svn diff
> Index: Makefile
> ===================================================================
> --- Makefile	  (revision 528101)
> +++ Makefile	  (working copy)
> @@ -128,8 +128,6 @@
>  post-patch:
>		  ${APR_WRKDIR}/configure
> -	  @${REINPLACE_CMD} -e '/recursive:/s/$$/ .MAKE/' \
> -		  ${APR_WRKDIR}/build/

coming from
> root at deblndw011x:/usr/ports/devel/apr1
> # svn log -c322367  Makefile
> ------------------------------------------------------------------------
> r322367 | ohauer | 2013-07-06 10:43:48 +0200 (Sat, 06 Jul 2013) | 16 lines
* Mark recursive targets with .MAKE to fix parallel builds with bmake.

Whether this is still required today and why BSD make ignores .MAKE, I don't
know. gmake chokes on it with tomcat-native.

The reason why www/tomcat-native never failed is that removes
gmake recipes and makes it bmake compliant. If you force gmake, it will
instantly fail.
If this post-patch is still required, it shall be removed with pre-install, but
no later than in STAGEDIR. This will make this Makefile work with bmake AND

More information about the freebsd-apache mailing list