Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> If I had to build stuff in the pg source tree I'd just clone a
> contrib directory and change the makefile [1]. What am I supposed to
> do if I'd like to create a contrib elsewhere (eg.
> ~/Documents/nfs/projects/ts_extensions)?
Use PGXS:
http://www.postgresql.org/docs/8.4/static/xfunc-c.html#XFUNC-C-PGXS
If the docs aren't enough for you, all of the contrib modules can be
built via pgxs, using "make PGXS=1". So their makefiles are useful
examples.
regards, tom lane