mirror of
https://github.com/schoebel/mars
synced 2025-02-26 01:20:29 +00:00
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.
|
# 3) if a file 'DISTVERSION' exists (out-of-tree tarball), use its content.
|
||||||
# 4) otherwise "no-buildtag-available"
|
# 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
|
extra-y += buildtag.h
|
||||||
$(obj)/buildtag.h: $(patsubst $(obj)/buildtag.h,,$(wildcard $(obj)/*.[ch])) $(obj)/*/*.[ch]
|
$(obj)/buildtag.h: $(patsubst $(obj)/buildtag.h,,$(wildcard $(obj)/*.[ch])) $(obj)/*/*.[ch]
|
||||||
$(Q)$(kecho) "MARS: Generating $@"
|
$(Q)$(kecho) "MARS: Generating $@"
|
||||||
@ -99,6 +102,9 @@ $(obj)/buildtag.h: $(patsubst $(obj)/buildtag.h,,$(wildcard $(obj)/*.[ch])) $(ob
|
|||||||
else \
|
else \
|
||||||
BUILDTAG="no-buildtag-available"; \
|
BUILDTAG="no-buildtag-available"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
if [ "$$KERNELRELEASE" != "" ]; then \
|
||||||
|
BUILDTAG="$$BUILDTAG-for-$$KERNELRELEASE"; \
|
||||||
|
fi; \
|
||||||
/bin/echo -e "#define BUILDTAG \"$$BUILDTAG\"";\
|
/bin/echo -e "#define BUILDTAG \"$$BUILDTAG\"";\
|
||||||
/bin/echo -e "#define BUILDHOST \"$$USER@`hostname`\"";\
|
/bin/echo -e "#define BUILDHOST \"$$USER@`hostname`\"";\
|
||||||
/bin/echo -e "#define BUILDDATE \"$$(date '+%F %T')\""
|
/bin/echo -e "#define BUILDDATE \"$$(date '+%F %T')\""
|
||||||
|
Loading…
Reference in New Issue
Block a user