This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: the w32api path change
- To: Robert Collins <robert dot collins at itdomain dot com dot au>
- Subject: Re: the w32api path change
- From: Earnie Boyd <earnie_boyd at yahoo dot com>
- Date: Thu, 13 Sep 2001 08:13:37 -0400
- CC: cygwin-developers at cygwin dot com
- References: <EA18B9FA0FE4194AA2B4CDB91F73C0EF08F16E@itdomain002.itdomain.net.au>
- Reply-To: CD List <Cygwin-Developers at Cygwin dot Com>
Robert Collins wrote:
>
> Earnie.. It really does break stuff, even for local installs,
>
> ie a prefix of /usr installs insto /usr/usr
>
> Is there any reason the change can't be simply backed out, and when a
> better alternative to achieve your goal arises put that into place?
>
I've committed the attached patch that should help. This isn't perfect
yet and will change in the future but it should help both this case as
well as the cross-compile case. The case that doesn't work as expected
is the `make install prefix=/non/configured/prefix' in which case you
get /non/configured/prefix/usr/include/w32api and
/non/configure/prefix/usr/lib/w32api.
Comments/complaints/flames welcome.
Earnie.
Index: lib/Makefile.in
===================================================================
RCS file: /cvs/src/src/winsup/w32api/lib/Makefile.in,v
retrieving revision 1.13
diff -u -3 -r1.13 Makefile.in
--- Makefile.in 2001/09/12 14:48:07 1.13
+++ Makefile.in 2001/09/13 11:51:19
@@ -19,6 +19,7 @@
build_alias = @build_alias@
target_alias = @target_alias@
prefix = @prefix@
+config_prefix = @prefix@
includedir:=@includedir@
program_transform_name = @program_transform_name@
@@ -37,8 +38,18 @@
datadir = @datadir@
infodir = @infodir@
ifneq (,$(findstring cygwin,$(target_alias)))
+ifeq ($(build_alias),$(host_alias))
+ifeq ($(prefix),$(config_prefix))
+inst_includedir:=$(includedir)
+inst_libdir:=$(libdir)
+else
inst_includedir:=$(tooldir)/usr/include/w32api
inst_libdir:=$(tooldir)/usr/lib/w32api
+endif
+else
+inst_includedir:=$(includedir)
+inst_libdir:=$(libdir)
+endif
else
inst_includedir:=$(includedir)
inst_libdir:=$(libdir)