-
Notifications
You must be signed in to change notification settings - Fork 86
/
makemake.sh
executable file
·49 lines (35 loc) · 1.13 KB
/
makemake.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
# This script is used to prepare a new release update by software maintainers
# - update version in src/reflex.h
# - rebuild reflex to verify
# - generate man page
# - update version in configure.ac
# - run autoconf and automake
fgrep -r FIXME include lib src unicode && ( echo "FIXME in code base" ; exit 1 )
if [ "$#" = 1 ]
then
echo
echo "Bumping reflex version to $1"
sed "s/REFLEX_VERSION \"[^\"]*\"/REFLEX_VERSION \"$1\"/" src/reflex.h > src/reflex.tmp && mv -f src/reflex.tmp src/reflex.h || exit 1
# this may be needed to reconfigure for glibtoolize for example
# autoreconf -fvi
./clean.sh
./build.sh || exit 1
./man.sh $1
./clean.sh
sed "s/^\(AC_INIT(\[re-flex\],\[\)[0-9.]*/\1$1/" configure.ac > configure.tmp && mv -f configure.tmp configure.ac || exit 1
aclocal
autoheader
rm -f config.guess config.sub ar-lib compile depcomp install-sh missing
automake --add-missing --foreign
autoconf
automake
touch config.h.in
./configure
echo OK
# removed: visit GitHub releases to create a tag instead
# pushd $HOME/GitHub/RE-flex; git tag -a reflex-$1 -m "reflex version $1"; popd
else
echo "Usage: ./makemake.sh 5.v.v"
exit 1
fi