mirror of https://github.com/schoebel/mars
Kbuild: add KERNELRELEASE to MARS' buildtag
This commit is contained in:
parent
196e486dd5
commit
fdb0b598b0
|
@ -83,6 +83,9 @@ endif
|
|||
# 3) if a file 'DISTVERSION' exists (out-of-tree tarball), use its content.
|
||||
# 4) otherwise "no-buildtag-available"
|
||||
#
|
||||
# In addition, the suffix -for-$KERNELRELEASE will be useful
|
||||
# for sysadmins having to manage a plethora of kernel versions.
|
||||
#
|
||||
extra-y += buildtag.h
|
||||
$(obj)/buildtag.h: $(patsubst $(obj)/buildtag.h,,$(wildcard $(obj)/*.[ch])) $(obj)/*/*.[ch]
|
||||
$(Q)$(kecho) "MARS: Generating $@"
|
||||
|
@ -99,6 +102,9 @@ $(obj)/buildtag.h: $(patsubst $(obj)/buildtag.h,,$(wildcard $(obj)/*.[ch])) $(ob
|
|||
else \
|
||||
BUILDTAG="no-buildtag-available"; \
|
||||
fi; \
|
||||
if [ "$$KERNELRELEASE" != "" ]; then \
|
||||
BUILDTAG="$$BUILDTAG-for-$$KERNELRELEASE"; \
|
||||
fi; \
|
||||
/bin/echo -e "#define BUILDTAG \"$$BUILDTAG\"";\
|
||||
/bin/echo -e "#define BUILDHOST \"$$USER@`hostname`\"";\
|
||||
/bin/echo -e "#define BUILDDATE \"$$(date '+%F %T')\""
|
||||
|
|
Loading…
Reference in New Issue