public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* winsup/mkvers.sh
@ 2000-01-13 10:04 Alexey Voinov
  2000-01-13 12:27 ` winsup/mkvers.sh Chris Faylor
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Voinov @ 2000-01-13 10:04 UTC (permalink / raw)
  To: cygwin

Hello,

  There's possibly error in winsup/cygwin/mkvers.sh
  in the last line:
$windres --include-dir $dir/../w32api/include --include-dir $dir/include --define CYGWIN_BUILD_DATE="$1" --define CYGWIN_BUILD_TIME="$2" --define CYGWIN_VERSION='"'"$cygwin_ver"'"' $rcfile winver.o
                       ^^^^
$dir can be =="" then include path will be /../w32api/include instead
of ../w32api/include

It can be replaced with ${dir:+$dir/}, then there will be no problems.
Here's little patch ( patch -p 0 ):
--- mkvers.sh.old       Thu Jan 13 19:43:22 2000
+++ mkvers.sh   Thu Jan 13 19:45:22 2000
@@ -162,4 +162,4 @@
 fi

 set -$- $builddate
-$windres --include-dir $dir/../w32api/include --include-dir $dir/include --define CYGWIN_BUILD_DATE="$1" --define CYGWIN_BUILD_TIME="$2" --define CYGWIN_VERSION='"'"$cygwin_ver"'"' $rcfile winver.o
+$windres --include-dir ${dir:+$dir/}../w32api/include --include-dir ${dir:+$dir/}include --define CYGWIN_BUILD_DATE="$1" --define CYGWIN_BUILD_TIME="$2" --define CYGWIN_VERSION='"'"$cygwin_ver"'"' $rcfile winver.o

Best regards,
Alexey Voinov
voins@caravan.ru



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: winsup/mkvers.sh
  2000-01-13 10:04 winsup/mkvers.sh Alexey Voinov
@ 2000-01-13 12:27 ` Chris Faylor
  2000-01-14  8:06   ` Re[2]: winsup/mkvers.sh Alexey Voinov
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Faylor @ 2000-01-13 12:27 UTC (permalink / raw)
  To: Alexey Voinov; +Cc: cygwin

On Thu, Jan 13, 2000 at 08:51:27PM +0300, Alexey Voinov wrote:
>Hello,
>
>  There's possibly error in winsup/cygwin/mkvers.sh
>  in the last line:
>$windres --include-dir $dir/../w32api/include --include-dir $dir/include --define CYGWIN_BUILD_DATE="$1" --define CYGWIN_BUILD_TIME="$2" --define CYGWIN_VERSION='"'"$cygwin_ver"'"' $rcfile winver.o
>                       ^^^^
>$dir can be =="" then include path will be /../w32api/include instead
>of ../w32api/include
>
>It can be replaced with ${dir:+$dir/}, then there will be no problems.
>Here's little patch ( patch -p 0 ):
>--- mkvers.sh.old       Thu Jan 13 19:43:22 2000
>+++ mkvers.sh   Thu Jan 13 19:45:22 2000
>@@ -162,4 +162,4 @@
> fi
>
> set -$- $builddate
>-$windres --include-dir $dir/../w32api/include --include-dir $dir/include --define CYGWIN_BUILD_DATE="$1" --define CYGWIN_BUILD_TIME="$2" --define CYGWIN_VERSION='"'"$cygwin_ver"'"' $rcfile winver.o
>+$windres --include-dir ${dir:+$dir/}../w32api/include --include-dir ${dir:+$dir/}include --define CYGWIN_BUILD_DATE="$1" --define CYGWIN_BUILD_TIME="$2" --define CYGWIN_VERSION='"'"$cygwin_ver"'"' $rcfile winver.o

It sounds like you're fixing the symptom rather than the problem.

In what situations is $dir empty?  It is never supposed to be empty.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re[2]: winsup/mkvers.sh
  2000-01-13 12:27 ` winsup/mkvers.sh Chris Faylor
@ 2000-01-14  8:06   ` Alexey Voinov
  2000-01-14 16:10     ` winsup/mkvers.sh Chris Faylor
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Voinov @ 2000-01-14  8:06 UTC (permalink / raw)
  To: Chris Faylor; +Cc: cygwin

Hello,

> It sounds like you're fixing the symptom rather than the problem.
>
> In what situations is $dir empty?  It is never supposed to be empty.

I Found it first in 20000105 snapshot. But error is still there (20000108).
Look at Makefile.in and mkvers.sh:
Makefile.in:
: winver_stamp: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
:               @echo "Making version.o and winver.o";\
:               $(SHELL) ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES); \
mkvers.sh:
: incfile="$1"                ( $incfile=="include/cygwin/version.h" )
: dir=`dirname $incfile`      ( $dir=="include/cygwin" )
: dir=`echo $dir | sed -e 's%/include/cygwin.*$%%' -e 's%include/cygwin.*$%%'`
                              ( $dir=="" )
: $windres --include-dir $dir/../w32api/include ....
                         ^^^^^^^^^^^^^^^^^^^^^^
                         =="/../w32api/include

So no paths will be added to standard include path.
At work I have very old snapshot which have old winapi headers ( and
doesn't have winver.h.
Look at winver.rc:
: #include <winver.h>

At home I have 20000105 installed so error doesn't appear.

That's all




Best regards,
Alexey Voinov
voins@caravan.ru



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: winsup/mkvers.sh
  2000-01-14  8:06   ` Re[2]: winsup/mkvers.sh Alexey Voinov
@ 2000-01-14 16:10     ` Chris Faylor
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Faylor @ 2000-01-14 16:10 UTC (permalink / raw)
  To: Alexey Voinov; +Cc: cygwin

On Fri, Jan 14, 2000 at 06:48:08PM +0300, Alexey Voinov wrote:
>Hello,
>
>> It sounds like you're fixing the symptom rather than the problem.
>>
>> In what situations is $dir empty?  It is never supposed to be empty.
>
>I Found it first in 20000105 snapshot. But error is still there (20000108).
>Look at Makefile.in and mkvers.sh:
>Makefile.in:
>: winver_stamp: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
>:               @echo "Making version.o and winver.o";\
>:               $(SHELL) ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES); \
>mkvers.sh:
>: incfile="$1"                ( $incfile=="include/cygwin/version.h" )
>: dir=`dirname $incfile`      ( $dir=="include/cygwin" )
>: dir=`echo $dir | sed -e 's%/include/cygwin.*$%%' -e 's%include/cygwin.*$%%'`
>                              ( $dir=="" )
>: $windres --include-dir $dir/../w32api/include ....
>                         ^^^^^^^^^^^^^^^^^^^^^^
>                         =="/../w32api/include
>
>So no paths will be added to standard include path.
>At work I have very old snapshot which have old winapi headers ( and
>doesn't have winver.h.
>Look at winver.rc:
>: #include <winver.h>
>
>At home I have 20000105 installed so error doesn't appear.

Ok.  As I said, this patch was fixing the symptom.  dir is not supposed
to be empty.  Hopefully, this will be fixed in the next snapshot.  It
only required a one character fix.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-01-14 16:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-13 10:04 winsup/mkvers.sh Alexey Voinov
2000-01-13 12:27 ` winsup/mkvers.sh Chris Faylor
2000-01-14  8:06   ` Re[2]: winsup/mkvers.sh Alexey Voinov
2000-01-14 16:10     ` winsup/mkvers.sh Chris Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).