In regard to: Re: gnucash runtime configuration, Rob Browning said (at...:

>Dave Peticolas <[EMAIL PROTECTED]> writes:
>
>> Hi all, I was looking through the gnucash configure.in
>> and was noticing how we create src/scm/bootstrap.scm and
>> src/guile/gnucash.h with a separate mechanism than AC_OUTPUT.
>> 
>> I read the explanation of why up above, but I still don't
>> see why it's needed. Doing it the current way means that
>> ./config.status won't do a complete reconfiguration, which
>> is kind of annoying. Anyone know why we do things that way?
>
>The overarching reason for this is that we need to support something
>like this for people who need to build with one --prefix, but install
>with another.

As a person that does a lot of software packaging (RPM for all our Unix
platforms), it's nice to see a package that doesn't make using a temporary
install destination ( a BuildRoot, in RPM-speak) a pain.

>The idea is that we have to hard-code some stuff at configure time
>that won't be later modified by tinkering with prefix at "make
>install" time.  The current approach has the disadvantage that you
>*must* do a reconfigure if you change your mind about prefix.  Just
>using "make prefix=different-place install" isn't enough, but that's
>not something I'd necessarily expect to work anyway.  In our case in
>"make prefix=foo install", prefix=foo indicates where to put the
>files, not where they'll be running from.
>
>I'm all in favor of a cleaner approach if you have one, but this one
>seems to work.

The one that works the best (IMHO) is the one that's used by much of X11
and by automake: stick a

DESTDIR =

somewhere in the Makefile.in (this is done for you automatically by automake)
and then prefix all destination directories in the install target(s) with
$(DESTDIR), i.e.:

install : foo foo.1
        $(INSTALL_CMD) foo $(DESTDIR)$(bindir)
        $(INSTALL_DATA) foo.1 $(DESTDIR)$(man1dir)



That way, someone doing packaging can do

        ./configure --prefix=/whereever --exec-prefix=/someplaceelse
        make
        make DESTDIR=/tmp/build/foo install

and everything ends up in /tmp/build/foo for packaging.  This works really
well.

Tim
-- 
Tim Mooney                              [EMAIL PROTECTED]
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J1, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164


--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]

Reply via email to