Mail Archives: cygwin-developers/1999/12/08/19:38:22
Corinna Vinschen <corinna AT vinschen DOT de> writes:
> Hi!
>
> I got some problems with this snapshot, all regarding mkvers.sh,
> especially the call to windres:
Ah, sorry. I thought I'd sent this patch in already. Please try this
out.
Fix a few small glitches with winver.rc/mkvers.sh change.
Tue Dec 7 18:05:45 1999 Mumit Khan <khan AT xraylith DOT wisc DOT edu>
* Makefile.in: Don't redirect output for multi-target rules.
* mkvers.sh: Redirect explicitly to version.c; Fix windres
include option, and quote strings to avoid shell interpretation.
Index: Makefile.in
===================================================================
RCS file: /homes/khan/src/CVSROOT/cygwin-dev/winsup/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 Makefile.in
--- Makefile.in 1999/12/07 21:08:02 1.1.1.1
+++ Makefile.in 1999/12/07 23:48:50
@@ -371,7 +371,7 @@ $(LIBGMON_A): $(GMON_OFILES) $(GMON_STAR
winver.o version.cc: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
@echo "Making version.cc";rm -f $@;\
- $(SHELL) ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) > $@
+ $(SHELL) ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES)
clean:
-rm -f *.o *.dll *.a *.exp junk *.base version.cc regexp/*.o
Index: mkvers.sh
===================================================================
RCS file: /homes/khan/src/CVSROOT/cygwin-dev/winsup/mkvers.sh,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 mkvers.sh
--- mkvers.sh 1999/12/07 21:08:02 1.1.1.1
+++ mkvers.sh 1999/12/08 00:05:03
@@ -50,10 +50,14 @@ builddate="${6-$5}-$m-$3 $4"
set -$- ''
+# clean out the output files to avoid interaction with noclobber.
+rm -f version.c
+rm -f /tmp/mkvers.$$
+
#
# Output the initial part of version.cc
#
-cat <<EOF
+cat <<EOF >> version.c
#include <winsup.h>
#define strval(x) #x
@@ -107,10 +111,10 @@ echo ' build date'; echo $build_date; [
[ -n "$snapshot" ] && echo "$snapshot"
) | while read var; do
read val
-cat <<EOF
+cat <<EOF
"%%% Cygwin $var: $val\n"
EOF
-done | tee /tmp/mkvers.$$
+done | tee /tmp/mkvers.$$ >> version.c
trap "rm -f /tmp/mkvers.$$" 0 1 2 15
@@ -118,7 +122,7 @@ trap "rm -f /tmp/mkvers.$$" 0 1 2 15
# Finally, output the shared ID and set up the cygwin_version structure
# for use by Cygwin itself.
#
-cat <<EOF
+cat <<EOF >> version.c
#ifdef DEBUGGING
"%%% Cygwin shared id: " CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "-$builddate\n"
#else
@@ -152,5 +156,6 @@ cygwin_ver="$cygverhigh.$cygverlow.$mino
if [ -n "$cvs_tag" ]; then
cygwin_ver="$cygwin_ver ($cvs_tag)"
fi
+
+$windres --include-dir $dir/include --define BUILD_DATE="\"$builddate\"" --define VERSION="\"$cygwin_ver\"" $rcfile winver.o || { rm -f version.c; exit 1; }
-$windres --include-dir $dir/include -DBUILD_DATE="$builddate" -DVERSION="$cygwin_ver" $rcfile winver.o || { rm -f version.cc; exit 1; }
Regards,
Mumit
- Raw text -