]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: use parse-date() only for hwclock
authorKarel Zak <kzak@redhat.com>
Thu, 7 Nov 2019 08:02:23 +0000 (09:02 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 7 Nov 2019 08:02:23 +0000 (09:02 +0100)
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>
include/timeutils.h
lib/Makemodule.am
sys-utils/Makemodule.am
sys-utils/hwclock-parse-date.y [moved from lib/parse-date.y with 99% similarity]
sys-utils/hwclock.h

index 95f1b44daabe7885ec5ca0ef53ca35ab9856e9c2..9318d2f986bc9cb98c80e6acb34e4ab84044fd5d 100644 (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 */
index 90e9a5de6ce3d21f4077dbd0a18adff2588666cd..b4d0fba2bffbd71282e1e9d037b240b4bbb9f653 100644 (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 \
index 98e2cc29b88346635b8d854f9fc0c0a65b9d2262..0c0657e1314f5c816592e714f658268b82363dd6 100644 (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 += \
similarity index 99%
rename from lib/parse-date.y
rename to sys-utils/hwclock-parse-date.y
index bb5abb5d4cf468959be8e567c21bbc91bb3de3c8..df95e16b71a24e999d61f41fcfd3c948eb0ad38b 100644 (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
index 92fdb5f82edc1a07f7e9e9dcbe8812c1a925426c..627cf514520f7851f4cc9d5e87e04327cb588d63 100644 (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 */