changing a Makefile based on user input

Sven Esbjerg esbjerg at
Thu Aug 5 05:50:28 PDT 2004

I'm trying to port RTFM ( since we use it at

It's my first port and I'm unsure of how the following should be done.
Intalling RTFM is simple. Untar the tarball. Edit the Makefile
and run make install. 
However the Makefile needs to be changed according to the postgresql
installation - it needs a username for tampering with the database and a
password if that is required. It also needs to know where rt lives.

I would like to provide the user with defaults (pgsql user and /usr/local/rt3
as installation directory)  but I would also like the user to be able to
specify these options. 

I guess my question is: can I run some kind of script just after extracting
but before installing? 
Is it advisable to create a sed script that does the actual mangling of the
Makefile or?

Sven Esbjerg
-- - på forhånd tak.

More information about the freebsd-ports mailing list