Subject: Re: Updating databases/libpqxx
To: None <pkgsrc-users@netbsd.org>
From: Roland Illig <rillig@NetBSD.org>
List: pkgsrc-users
Date: 05/25/2007 14:56:29
Jan Danielsson wrote:
> This raises another question, perhaps a little offtopic for this
> list, that I have been wondering about. I have written a small tool for
> writing postgresql queries (operative word: "small"). I have a makefile,
> which is built using the assumption that wxwidgets and libpqxx is
> already available on the system.
>
> What's the easiest way for me to construct a portable, and familiar,
> build system which is portable to any Unix:ish system which can build my
> application as long as wxWidgets and libpqxx are available? I did try to
> look into autoconf a while back, but it was way to time consuming to
> learn at that point. I guess I could give it a new try -- but before I
> do, is there a better/simpler option?
>
> I would like to write something which is pkgsrc friendly (as in "no
> patching required").
For pkgsrc, the easiest way is to just list the dependencies in a README
file. That's it. Because of the buildlink framework, everything will
then work. For other systems, you may need more work. :)
Concerning the Makefiles, I suggest you depend on GNU Make or BSD Make,
since they both have the += and ?= operators, which I consider very
useful (for CPPFLAGS, you should never use the plain = operator). Yes,
it means that users will first have to build GNU Make on some systems,
but portability can even mean: It makes proper use of programs that are
themselves portable. :)
Roland