On Sun, 16 Aug 2009, Phil Krylov wrote:
> On Sat, Aug 15, 2009 at 8:02 PM, Viktor Szakáts<[email protected]> wrote:
> >> Just to report that using the prefix in the subj the libs are put in
> >> /opt/harbour/lib/harbour.
>
> I think it's perfect.
>
> >> I think that set correctly HB_INSTALL_PREFIX should be an user's
> >> responsibility and a safe
> >> default could be $HOME/harbour-ver.
> >> Here the main goal seem to respect HB_INSTALL_PREFIX and protect
> >> casual user from running "make install"
> >> without knowing well what's he doing.
> >
> > I couldn't agree more. The safest place to install files
> > is the source tree itself. This is is how it's done already
> > on non-*nix OSes and such installed Harbour is perfectly usable.
> >
> > If this is acceptable for Linux users, it's very easy to
> > make this change.
>
> The traditional default prefix for Linux for install from source is
> /usr/local. Please don't.
but it screws a great number of other *nixes. on free|openbsd, it's
the default prefix for things installed by the package manager
(ports/pkg), it rarely exists on commercial unixes, and if it does,
semi-official packages for that platform tend to install packages
there (nevertheless, that can be said of most other customary
locations, as well :/). there's no one true way here, sticking with
/usr/local is just as good as any (and i'd say it's the least
surprise).
from a compatibility/customary/possibly packaging pov, it would be
nice if DESTDIR was recognised (which is essentially the same as
HB_INSTALL_PREFIX, far as i can tell, and is widely used by autoconf'd
stuff). it could be as simple as (completely untested):
Index: config/global.cf
===================================================================
--- config/global.cf (revision 12131)
+++ config/global.cf (working copy)
@@ -248,8 +248,14 @@
ifneq ($(HB_USER_AFLAGS),)
$(info ! HB_USER_AFLAGS: $(HB_USER_AFLAGS))
endif
- ifneq ($(HB_INSTALL_PREFIX),)
- $(info ! HB_INSTALL_PREFIX: $(HB_INSTALL_PREFIX))
+ ifneq ($(DESTDIR),)
+ $(info ! DESTDIR: $(DESTDIR))
+ $(info ! HB_INSTALL_PREFIX set to $(DESTDIR))
+ HB_INSTALL_PREFIX := $(DESTDIR)
+ else
+ ifneq ($(HB_INSTALL_PREFIX),)
+ $(info ! HB_INSTALL_PREFIX: $(HB_INSTALL_PREFIX))
+ endif
endif
ifneq ($(HB_BIN_INSTALL),)
$(info ! HB_BIN_INSTALL: $(HB_BIN_INSTALL))
i think that if especially after this change one manages to
inadvertently overwrite her system (assuming no bugs in the install
stuff ;), it's safe to say she didn't have a clue as to what she was
doing in the first place, against what there's no protection.
--
[-]
mkdir /nonexistent
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour