[PATCH] Define phony make targets as such.
Ruslan Ermilov
ru at nginx.com
Sat Feb 20 09:46:17 UTC 2021
http://hg.nginx.org/nginx/rev/549b13cd793b
On Fri, Feb 05, 2021 at 12:48:50AM +0100, Thibault Nélis wrote:
> Hello,
>
> I just spent more time than I care to admit troubleshooting a make
> issue after naively using `./configure --builddir=build` (make target
> inadvertently matches this directory name).
>
> Not sure if taking a dep on POSIX sed in the build system is kosher or
> not, but if it is I figure this patch could save the next one some time
> ;).
>
> Quickly tested on top of default tip as of this writing
> (7765:519b55453c45).
>
> Best regards,
>
> --- a/auto/init
> +++ b/auto/init
> @@ -44,6 +44,8 @@ fi
>
> cat << END > Makefile
>
> +.PHONY: default clean
> +
> default: build
>
> clean:
> --- a/auto/install
> +++ b/auto/install
> @@ -196,6 +196,8 @@ done
>
> # create Makefile
>
> +sed -i "/^\.PHONY/s/$/ build install modules upgrade/" Makefile
> +
> cat << END >> Makefile
>
> build:
--
Ruslan Ermilov
Assume stupidity not malice
More information about the nginx-devel
mailing list