build-sys: add parse-date.y
* add lib/parse-date.y to build system * add necessary autotools stuff to generate .c on the fly (autotools are smart enough to add generated file to tarball) * check for bison version by ./autogen.sh * add non-wanted junk to .gitignore With some modification by J William Piggott with regard to moving the parse-date API into timeutils.h Signed-off-by: J William Piggott <elseifthen@gmx.com>
This commit is contained in:
parent
7088bd8832
commit
30d7f61f4f
|
@ -55,6 +55,7 @@ test-suite.log
|
|||
tests/run.sh.log
|
||||
tests/run.sh.trs
|
||||
update.log
|
||||
ylwrap
|
||||
|
||||
#
|
||||
# binaries
|
||||
|
|
20
autogen.sh
20
autogen.sh
|
@ -67,6 +67,25 @@ test -f sys-utils/mount.c || {
|
|||
DIE=1
|
||||
}
|
||||
|
||||
if ! (bison --version) < /dev/null > /dev/null 2>&1; then
|
||||
echo
|
||||
echo "You must have bison installed to build the util-linux."
|
||||
echo
|
||||
DIE=1
|
||||
else
|
||||
lexver=$(bison --version | awk '/bison \(GNU Bison\)/ { print $4 }')
|
||||
case "$lexver" in
|
||||
[2-9].*)
|
||||
;;
|
||||
*)
|
||||
echo
|
||||
echo "You must have bison version >= 2.x, but you have $lexver."
|
||||
echo
|
||||
DIE=1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
LIBTOOLIZE=libtoolize
|
||||
case `uname` in Darwin*) LIBTOOLIZE=glibtoolize ;; esac
|
||||
if ! ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1; then
|
||||
|
@ -104,6 +123,7 @@ echo " autoconf: $(autoconf --version | head -1)"
|
|||
echo " autoheader: $(autoheader --version | head -1)"
|
||||
echo " automake: $(automake --version | head -1)"
|
||||
echo " libtoolize: $($LIBTOOLIZE --version | head -1)"
|
||||
echo " bison: $(bison --version | head -1)"
|
||||
|
||||
rm -rf autom4te.cache
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@ AC_SUBST([usrlib_execdir])
|
|||
AM_PROG_CC_C_O
|
||||
AC_PROG_MKDIR_P
|
||||
AC_PROG_CC_STDC
|
||||
AC_PROG_YACC
|
||||
AC_CANONICAL_HOST
|
||||
AC_C_CONST
|
||||
AC_C_VOLATILE
|
||||
|
@ -153,7 +154,6 @@ PKG_PROG_PKG_CONFIG
|
|||
GTK_DOC_CHECK([1.10])
|
||||
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||
|
||||
|
||||
linux_os=no
|
||||
bsd_os=no
|
||||
AS_CASE([${host_os}],
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
parse-date.c
|
|
@ -16,6 +16,7 @@ libcommon_la_SOURCES = \
|
|||
lib/mbsedit.c\
|
||||
lib/md5.c \
|
||||
lib/pager.c \
|
||||
lib/parse-date.y \
|
||||
lib/path.c \
|
||||
lib/randutils.c \
|
||||
lib/setproctitle.c \
|
||||
|
|
Loading…
Reference in New Issue