From 24a769cb15ddb650209475d3c21a9a2a63fc21fa Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Thu, 24 Apr 2025 22:47:52 +0800 Subject: [PATCH] Remove version.h from source directory The version.h should be generated from version.h.in. If the build directory is out of the source directory, the version.h is generated in build directory and the original version.h in source directory is not overwritten. However, the latter is used during the build, resulting in a missing runtime version: $ sassc --version sassc: [NA] libsass: [NA] sass2scss: 1.1.1 sass: 3.5 Remove version.h from source directory to ensure that the version.h in build directory is used during the build. Signed-off-by: Yi Zhao --- include/sass/version.h | 12 ------------ src/GNUmakefile.am | 4 ++-- 2 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 include/sass/version.h diff --git a/include/sass/version.h b/include/sass/version.h deleted file mode 100644 index 56ea016a25..0000000000 --- a/include/sass/version.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef SASS_VERSION_H -#define SASS_VERSION_H - -#ifndef LIBSASS_VERSION -#define LIBSASS_VERSION "[NA]" -#endif - -#ifndef LIBSASS_LANGUAGE_VERSION -#define LIBSASS_LANGUAGE_VERSION "3.5" -#endif - -#endif diff --git a/src/GNUmakefile.am b/src/GNUmakefile.am index 9b0e6a99b3..e955f0b43f 100644 --- a/src/GNUmakefile.am +++ b/src/GNUmakefile.am @@ -8,7 +8,7 @@ if ENABLE_COVERAGE AM_COVLDFLAGS += -lgcov endif -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = $(AM_COPT) AM_CXXFLAGS = $(AM_COPT) AM_LDFLAGS = $(AM_COPT) $(AM_COVLDFLAGS) @@ -45,6 +45,6 @@ sass_includedir = $(includedir)/sass sass_include_HEADERS = $(top_srcdir)/include/sass/base.h \ $(top_srcdir)/include/sass/values.h \ - $(top_srcdir)/include/sass/version.h \ + $(top_builddir)/include/sass/version.h \ $(top_srcdir)/include/sass/context.h \ $(top_srcdir)/include/sass/functions.h