How To, Example Makefile Updated
By David E. WheelerI deployed a new version of Manager last week, and it included a major
update to the How To. A lot of the changes are narrative: I tried to keep
things shorter and more to-the-point. But from a technical point of view,
perhaps the most important improvements are in the Makefile example. Thanks
to ongoing work by Cédric Villemain, it now tries harder to stay out of your
way, while integrating better with PostgreSQL’s own make targets.
The main changes:
- The setting of
$EXTENSIONand$EXTVERSIONis now done by reading theMETA.JSONfile. - Thanks to the
?=operator,$PG_CONFIGcan now be passed as a param as well as an environment variable. That is, you can doPG_CONFIG=/my/pg_config makeormake PG_CONFIG=/my/pg_config. - New targets are defined only after PGXS is loaded, so that targets can be overridden if necessary.
- A new
disttarget creates a PGXN-ready zip file, assuming that your code is maintained in Git.
Have a look at the resulting diff for semver to get an idea how you might
want to update your own Makefiles.