From 9e6d84d135db31dad2b2a0d6284f0f4589e585c0 Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Sun, 9 Nov 2003 03:00:31 +0000 Subject: [PATCH] add dependency on the kernel .config file; quit without it git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2049 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 3 ++- Makefile | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 254cdf80..d66193ae 100644 --- a/CHANGES +++ b/CHANGES @@ -21,7 +21,8 @@ ask CVS about it: Library: Fix bmcsensors scaling, increase number of sensors; Add w83627thf support; Advance version to 2.0.2; Add hermes, ADM1032, ASB100 support - Makefiles: Install fancontrol, pwmconfig, decode-*.pl + Makefiles: Install fancontrol, pwmconfig, decode-*.pl; + Fail if no kernel .config file exists Module asb100: New Module bmcsensors: Fix voltage scaling, voltage and fan limits Module fscher: New (Fujitsu-Siemens Hermes driver) diff --git a/Makefile b/Makefile index 413bc0a3..34133996 100644 --- a/Makefile +++ b/Makefile @@ -303,6 +303,12 @@ help: @echo ' package: create a distribution package' @echo 'Note: make dep is automatic' +$(LINUX)/.config: + @echo "Error - missing file $(LINUX)/.config !! " + @echo " Verify kernel source is in $(LINUX) and then" + @echo " cd to $(LINUX) and run 'make config' !!" + @exit 1 + # Here, we define all implicit rules we want to use. .SUFFIXES: @@ -311,7 +317,8 @@ help: # dir/file.c in front of the dependency file rule. # .o files are used for modules -%.o: %.c +# depend on the kernel config file! +%.o: %.c $(LINUX)/.config $(CC) $(MODCPPFLAGS) $(MODCFLAGS) -c $< -o $@ %.d: %.c