build-sys: use parse-date() only for hwclock

The parse-date.y is used only for hwclock, let's keep it together.
Note that the file (originally from gnulib) has GPLv3 license, so it's
better to make it obvious that we use it really only for hwclock (also
GPL).

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2019-11-07 09:02:23 +01:00
parent 39f5af2598
commit 8e1b131e0a
5 changed files with 5 additions and 4 deletions

View File

@ -88,6 +88,4 @@ int strtime_short(const time_t *t, struct timeval *now, int flags, char *buf, si
extern time_t timegm(struct tm *tm);
#endif
int parse_date(struct timespec *, char const *, struct timespec const *);
#endif /* UTIL_LINUX_TIME_UTIL_H */

View File

@ -17,7 +17,6 @@ libcommon_la_SOURCES = \
lib/mbsedit.c\
lib/md5.c \
lib/pager.c \
lib/parse-date.y \
lib/pwdutils.c \
lib/randutils.c \
lib/setproctitle.c \

View File

@ -451,7 +451,8 @@ dist_man_MANS += \
PATHFILES += sys-utils/hwclock.8
hwclock_SOURCES = \
sys-utils/hwclock.c \
sys-utils/hwclock.h
sys-utils/hwclock.h \
sys-utils/hwclock-parse-date.y
hwclock_LDADD = $(LDADD) libcommon.la -lm
if USE_HWCLOCK_CMOS
hwclock_SOURCES += \

View File

@ -42,6 +42,7 @@
#include "c.h"
#include "timeutils.h"
#include "hwclock.h"
/**
* There's no need to extend the stack, so there's no need to involve

View File

@ -77,4 +77,6 @@ extern int set_epoch_rtc(const struct hwclock_control *ctl);
extern void __attribute__((__noreturn__))
hwclock_exit(const struct hwclock_control *ctl, int status);
extern int parse_date(struct timespec *, char const *, struct timespec const *);
#endif /* HWCLOCK_CLOCK_H */