-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix version header generation for dkms
The dkms build fails for the latest release: #60 The problem is that dkms does not call my Makefile at all, so the version header is never generated. Dkms does have a PRE_BUILD hook though, so use that to call a script that takes care of this. From now on, I must always remember to run a dkms build before a new release. Signed-off-by: Ernesto A. Fernández <ernesto@corellium.com>
- Loading branch information
Showing
3 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ BUILT_MODULE_NAME[0]="apfs" | |
DEST_MODULE_LOCATION[0]="/extra" | ||
|
||
AUTOINSTALL="yes" | ||
PRE_BUILD="genver.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
# | ||
# Script to generate the module version header | ||
# | ||
|
||
if command -v git >/dev/null 2>&1; then | ||
GIT_COMMIT=$(git describe HEAD | tail -c 9) | ||
else | ||
GIT_COMMIT="unknown" | ||
fi | ||
|
||
printf '#define GIT_COMMIT\t"%s"\n' "$GIT_COMMIT" > version.h |