Subject: dependency on postgresql server
To: None <email@example.com>
From: Brook Milligan <firstname.lastname@example.org>
Date: 08/03/2006 08:49:40
I am making a package that depends on the postgresql server (not
client). I would like to use the pgsql.buildlink3.mk mechanism to
determine which specific version of the postgresql server to depend
on. Unfortunately, after all the version-selection logic, that file
just includes the appropriate postgresql-client buildlink3.mk file.
Thus, it is difficult to use this approach to select the appropriate
I can see several approaches to solving this problem.
1. Divide the pgsql.buildlink3.mk file into three files.
- pgsql.buildlink3.mk -- include only the version-selection logic.
- pgsql-client.buildlink3.mk -- includes the above file and then
includes the appropratie version-specific client buildlink3.mk
- pgsql-server.buildlink3.mk -- similar to above, but includes the
appropriate server-specific buildlink3.mk file.
All existing references to pgsql.buildlink3.mk would be changed to
pgsql-client.buildlink3.mk, and server-specific buildlink3.mk files
would need creating.
2. Introduce some make variable that would select which type of
dependency is desired and place the final inclusion in the existing
pgsql.buildlink3.mk file inside an appropriate conditional.
It strikes me that the first option is preferable, as it more directly
documents the type (i.e., client vs. server) of pgsql dependency.
Perhaps there are other options I haven't thought of.
Any thoughts on the merits of these ideas?