Re: make world and install-world without docs

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-06-01T00:06:46Z
Lists: pgsql-hackers
On 2021-May-31, Andrew Dunstan wrote:

> However, not all buildfarm animals are set up to build the docs, and not
> all owners necessarily want to. Moreover, we have provision for testing
> various docs formats (PDF, epub etc). So I'd like to be able to build
> and install all the world EXCEPT the docs. Rather than specify yet more
> targets in the Makefile, it seemed to me a better way would be to
> provide a SKIPDOCS option that could be set on the command line like this:
> 
>     make SKIPDOCS=1 world
>     make SKIPDOCS=1 install-world

I could use this feature.  +1

> +ifndef SKIPDOCS
>  $(call recurse,world,doc src config contrib,all)
>  world:
>  	+@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install."
> +else
> +$(call recurse,world,src config contrib,all)
> +world:
> +	+@echo "PostgreSQL and contrib successfully made. Ready to install."
> +endif

I was going to suggest that instead of repeating the $(call) line you
could do something like

$(call recurse,world,src config contrib,all)
ifndef SKIPDOCS
$(call recurse,world,doc,all)
endif

... however, this makes the echoed string be wrong, and the whole thing
looks uglier if you use a second "ifndef" to generate the string, so I
think your proposal is okay.

I do wonder if these echoed strings are really all that necessary.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W



Commits

  1. Add new make targets world-bin and install-world-bin