development setup and libdir

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To: pgsql-hackers(at)postgresql(dot)org
Subject: development setup and libdir
Date: 2010-01-30 10:57:27
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

I finally put enough code together and it has some chance it could
It's time to test it.
Now I'm going to test it quite frequently.

My code is written and compiled in my ~/.
Then it is moved through svn to a test box where it is compiled under
another version of postgres, but still it ends up "far away" from
anything pg related.

Now it would be nice to be able to test it without any modification
to the source (namely the file). But the kosher way to write
one and then be able to eventually package it into a deb or even
make it reach contrib would be to use $libdir.

I can't make install (provided it works as expected, I didn't try
yet) since I sincerely hope that my user doesn't have write right on
whatever is pointed by $libdir.

My *nix user is also postgres superuser.

One way would be to
- let postgres user (or anyone) read in the dev dir
- export USE_PGXS=1; export someunknownparam=`pwd`; make

So that the resulting module.sql will point to the dev dir.
Does that someunknownparam exist?

2nd choice would be to write a bash script that just
- make
- sed -e 's/\$libdir/'`pwd`'/g' module.sql > module.l.sql
- sed -e 's/\$libdir/'`pwd`'/g' uninstall_module.sql >
- psql < sometestcode.sql

Not that bad... but if that "someunknownparam" existed it would be
nicer and avoid hard coding the module name in 2 places (Makefile and
bash script)[1]

[1] OK I know I can parse the Makefile with sed... ;)


Ivan Sergio Borgonovo


Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-01-30 11:38:08 Re: Hot Standby: Relation-specific deferred conflict resolution
Previous Message Boszormenyi Zoltan 2010-01-30 10:09:34 Re: NaN/Inf fix for ECPG Re: out-of-scope cursor errors