Remove the BUILD_INFO_FILE variable
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 13 May 2016 18:31:38 +0000 (14:31 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 16 Jun 2016 15:48:36 +0000 (11:48 -0400)
This allowed developers to specify their own .c file for the build info,
instead of using whatever is generated by make/kbuild.  That seems like a
potential mess, since there's nothing keeping those make files in sync
with build_info.{c,h}.  And it doesn't seem particularly useful.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
Makefile
kern/src/Kbuild

index 6007871..37e23a9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -403,9 +403,6 @@ export CFLAGS_USER CXXFLAGS_USER CFLAGS_USER_LIBS
 # kernel build output.  Right now, it's only passed down to tests/
 dummy-1 := $(shell mkdir -p $(OBJDIR)/kern/)
 
-# Machinery to create the kernel build info source
-export BUILD_INFO_FILE
-
 # Since we're doing this outside of the dot-config part, some targets, such as
 # clean, won't read in our .config/auto.conf, and won't know about the
 # KFS_PATH.  Future rules related to KFS will have issues (mkdir with no
index 9381b18..ada8815 100644 (file)
@@ -6,20 +6,16 @@ $(src)/build_info.cid:
        @rm -f $(src)/build_info.cid.tmp
 
 $(src)/build_info.c: $(src)/build_info.cid
-ifeq ($(BUILD_INFO_FILE),)
-               @echo "/* Automatically generated. DO NOT EDIT! */" > $(@)
-               @echo "" >> $(@)
-               @echo "const char build_info_date[] = { \"`date`\" };"\
-                       >> $(@)
-               @echo "const char build_info_commitid[] = { \"`cat $(src)/build_info.cid`\" };"\
-                       >> $(@)
-               @echo "const char build_info_version[] = { \"$(KERNELVERSION)\" };"\
-                       >> $(@)
-               @echo "const char build_info_version_name[] = { \"$(VERNAME)\" };"\
-                       >> $(@)
-else
-               cp $(BUILD_INFO_FILE) $(@)
-endif
+       @echo "/* Automatically generated. DO NOT EDIT! */" > $(@)
+       @echo "" >> $(@)
+       @echo "const char build_info_date[] = { \"`date`\" };"\
+               >> $(@)
+       @echo "const char build_info_commitid[] = { \"`cat $(src)/build_info.cid`\" };"\
+               >> $(@)
+       @echo "const char build_info_version[] = { \"$(KERNELVERSION)\" };"\
+               >> $(@)
+       @echo "const char build_info_version_name[] = { \"$(VERNAME)\" };"\
+               >> $(@)
 
 clean-files += build_info.c build_info.cid