[1/3] Update create-version.sh to use common/version.h
Commit Message
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
Tom> How about just copying create-version.sh to sim/common and having it use
Tom> the old #include "version.h"? Then the two scripts can evolve in their
Tom> own ways as needed, without worrying.
Like this.
Tom
Comments
On 2019-01-25 23:04, Tom Tromey wrote:
>>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
>
> Tom> How about just copying create-version.sh to sim/common and having
> it use
> Tom> the old #include "version.h"? Then the two scripts can evolve in
> their
> Tom> own ways as needed, without worrying.
>
> Like this.
This is fine with me, but the diff below is weird. It modifies
sim/common/create-version.sh, which doesn't exist in master currently.
And if I apply it with "git am -3", then gdb/common/create-version.sh
gets modified...
Simon
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
Simon> This is fine with me, but the diff below is weird. It modifies
Simon> sim/common/create-version.sh, which doesn't exist in master currently.
Simon> And if I apply it with "git am -3", then gdb/common/create-version.sh
Simon> gets modified...
I forgot that I had to "git diff HEAD" instead of just "git diff".
I usually wish the index didn't exist.
Anyway, it's just a copy of the gdb one, then with that patch.
I'll re-send it before I check it in.
Tom
@@ -1,3 +1,8 @@
+2019-01-25 Tom Tromey <tom@tromey.com>
+
+ * Make-common.in (version.c): Use sim's create-version.sh.
+ * create-version.sh: New file.
+
2019-01-16 Pavel I. Kryukov <kryukov@frtk.ru>
* sim-arange.c (DEFINE_INLINE_P, DEFINE_NON_INLINE_P): Remove.
@@ -289,8 +289,8 @@ stamp-tvals: gentmap
$(SHELL) $(srcroot)/move-if-change tmp-tmap.c targ-map.c
touch stamp-tvals
-version.c: Makefile $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcroot)/gdb/common/create-version.sh
- $(SHELL) $(srcroot)/gdb/common/create-version.sh $(srcroot)/gdb \
+version.c: Makefile $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcroot)/sim/common/create-version.sh
+ $(SHELL) $(srcroot)/sim/common/create-version.sh $(srcroot)/gdb \
$(host_alias) $(target_alias) version.c
#
@@ -30,7 +30,7 @@ output="$4"
rm -f version.c-tmp $output version.tmp
date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' $srcdir/../bfd/version.h`
sed -e "s/DATE/$date/" < $srcdir/version.in > version.tmp
-echo '#include "common/version.h"' >> version.c-tmp
+echo '#include "version.h"' >> version.c-tmp
echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
echo 'const char host_name[] = "'"$host_alias"'";' >> version.c-tmp
echo 'const char target_name[] = "'"$target_alias"'";' >> version.c-tmp
@@ -1,3 +1,7 @@
+2019-01-25 Tom Tromey <tom@tromey.com>
+
+ * Makefile.in (version.c): Use sim's create-version.sh.
+
2018-05-09 Sebastian Rasmussen <sebras@gmail.com>
* e500_registers.h: Comment typo fix.
@@ -548,8 +548,8 @@ $(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
$(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
$(RANLIB) $(TARGETLIB)
-version.c: Makefile $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcroot)/gdb/common/create-version.sh
- $(SHELL) $(srcroot)/gdb/common/create-version.sh $(srcroot)/gdb \
+version.c: Makefile $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcroot)/sim/common/create-version.sh
+ $(SHELL) $(srcroot)/sim/common/create-version.sh $(srcroot)/gdb \
$(host_alias) $(target_alias) version.c
version.o: version.c $(version_h)