]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: fix out-of-tree build for hwclock
authorKarel Zak <kzak@redhat.com>
Mon, 25 Nov 2019 12:55:18 +0000 (13:55 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 25 Nov 2019 12:55:18 +0000 (13:55 +0100)
The file sys-utils/hwclock-parse-date.c is generated from .y and
stored in the build directory and "#include hwclock.h" is interpreted
relatively to the build tree rather than to source tree. We need
explicit -I compiler option to point to $srcdir for hwclock.

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/Makemodule.am

index 0c0657e1314f5c816592e714f658268b82363dd6..baf851e5b8d1f067f65f4254941c822e11d1841a 100644 (file)
@@ -454,6 +454,7 @@ hwclock_SOURCES = \
        sys-utils/hwclock.h \
        sys-utils/hwclock-parse-date.y
 hwclock_LDADD = $(LDADD) libcommon.la -lm
+hwclock_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/sys-utils
 if USE_HWCLOCK_CMOS
 hwclock_SOURCES += \
        sys-utils/hwclock-cmos.c