From: Emil Velikov <emil.l.velikov@gmail.com>
To: linux-modules@vger.kernel.org
Cc: emil.l.velikov@gmail.com
Subject: [PATCH 4/4] configure: manage libkmod.pc.in and version.py.in via AC_CONFIG_FILES
Date: Tue, 21 Feb 2023 13:19:29 +0000 [thread overview]
Message-ID: <20230221131929.106951-5-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <20230221131929.106951-1-emil.l.velikov@gmail.com>
From: Emil Velikov <emil.velikov@collabora.com>
Replace the manual sed command, build rules and dist/clean for using
AC_CONFIG_FILES. It does the exact same thing, with an added bonus...
Currently we're missing version.py.in in the EXTRA_DIST. Thus a simple
"touch Makefile" should retrigger the regeneration of version.py. Which
would presumably fail, since the input file isn't in the distribution
tarball.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
Feel free to compare the diff between the old/new "make distcheck".
Cannot realistically add that here as it seemingly confuses the hell out
of git am.
---
Makefile.am | 25 -------------------------
configure.ac | 2 ++
2 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 61dbdf0..8ba85c9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,26 +24,6 @@ AM_CPPFLAGS = \
AM_CFLAGS = $(OUR_CFLAGS)
AM_LDFLAGS = $(OUR_LDFLAGS)
-SED_PROCESS = \
- $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
- -e 's,@VERSION\@,$(VERSION),g' \
- -e 's,@prefix\@,$(prefix),g' \
- -e 's,@exec_prefix\@,$(exec_prefix),g' \
- -e 's,@libdir\@,$(libdir),g' \
- -e 's,@includedir\@,$(includedir),g' \
- -e 's,@libzstd_CFLAGS\@,${libzstd_CFLAGS},g' \
- -e 's,@libzstd_LIBS\@,${libzstd_LIBS},g' \
- -e 's,@liblzma_CFLAGS\@,${liblzma_CFLAGS},g' \
- -e 's,@liblzma_LIBS\@,${liblzma_LIBS},g' \
- -e 's,@zlib_CFLAGS\@,${zlib_CFLAGS},g' \
- -e 's,@zlib_LIBS\@,${zlib_LIBS},g' \
- -e 's,@libcrypto_CFLAGS\@,${libcrypto_CFLAGS},g' \
- -e 's,@libcrypto_LIBS\@,${libcrypto_LIBS},g' \
- < $< > $@ || rm $@
-
-%.pc: %.pc.in Makefile
- $(SED_PROCESS)
-
# Rules for libtool versioning (from https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html)
# 1. Start with version information of ‘0:0:0’ for each libtool library.
# 2. Update the version information only immediately before a public release of
@@ -116,8 +96,6 @@ libkmod_libkmod_internal_la_LIBADD = $(libkmod_libkmod_la_LIBADD)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libkmod/libkmod.pc
-EXTRA_DIST += libkmod/libkmod.pc.in
-CLEANFILES += libkmod/libkmod.pc
bashcompletiondir=@bashcompletiondir@
dist_bashcompletion_DATA = \
@@ -179,9 +157,6 @@ am__v_CYTHON_0 = @echo " CYTHON " $@;
.pyx.c:
$(AM_V_CYTHON)$(CYTHON) -o $@ $<
-%.py: %.py.in Makefile
- $(SED_PROCESS)
-
# Remove some warnings for generated code
PYTHON_NOWARN = -Wno-redundant-decls -Wno-shadow -Wno-strict-aliasing
diff --git a/configure.ac b/configure.ac
index 892f5d9..65902d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -292,6 +292,8 @@ AC_CONFIG_FILES([
man/Makefile
libkmod/docs/Makefile
libkmod/docs/version.xml
+ libkmod/libkmod.pc
+ libkmod/python/kmod/version.py
])
--
2.39.2
next prev parent reply other threads:[~2023-02-21 13:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 13:19 [PATCH 0/4] kmod: Paper cuts - dead code removal, don't SED manually Emil Velikov
2023-02-21 13:19 ` [PATCH 1/4] libkmod: remove unused kmod_module_get_builtin Emil Velikov
2023-02-21 13:19 ` [PATCH 2/4] libkmod: annotate kmod_builtin_iter API as static Emil Velikov
2023-02-21 13:19 ` [PATCH 3/4] shared: annotate local " Emil Velikov
2023-02-21 13:19 ` Emil Velikov [this message]
2023-02-22 0:40 ` [PATCH 0/4] kmod: Paper cuts - dead code removal, don't SED manually Lucas De Marchi
2023-02-22 11:50 ` Emil Velikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230221131929.106951-5-emil.l.velikov@gmail.com \
--to=emil.l.velikov@gmail.com \
--cc=linux-modules@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).