mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-28 12:40:42 +00:00
Surer `make clean' implementation
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@581 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
57f2f6d7ef
commit
fc20445e02
10 files changed
+48
-15
No files matched your search
@@ -129,7 +129,7 @@ MANGRP := root
|
||||
# to do this.
|
||||
|
||||
# The subdirectories we need to build things in
|
||||
SRCDIRS :=
|
||||
SRCDIRS := mkpatch
|
||||
ifeq ($(COMPILE_KERNEL),1)
|
||||
SRCDIRS += kernel kernel/busses kernel/chips kernel/include
|
||||
endif
|
||||
|
||||
+2
-1
@@ -19,6 +19,7 @@
|
||||
# 'simply expanded variable'. That means that its value is substituted
|
||||
# verbatim in the rules, until it is redefined.
|
||||
MODULE_DIR := kernel
|
||||
KERNELDIR := $(MODULE_DIR)
|
||||
|
||||
# Regrettably, even 'simply expanded variables' will not put their currently
|
||||
# defined value verbatim into the command-list of rules...
|
||||
@@ -39,5 +40,5 @@ install-kernel: all-kernel
|
||||
install :: install-kernel
|
||||
|
||||
clean-kernel:
|
||||
$(RM) $(KERNELTARGETS) $(KERNELTARGETS:.o=.d)
|
||||
$(RM) $(KERNELDIR)/*.o $(KERNELDIR)/*.d
|
||||
clean :: clean-kernel
|
||||
@@ -19,6 +19,7 @@
|
||||
# 'simply expanded variable'. That means that its value is substituted
|
||||
# verbatim in the rules, until it is redefined.
|
||||
MODULE_DIR := kernel/busses
|
||||
KERNELBUSSESDIR := $(MODULE_DIR)
|
||||
|
||||
# Regrettably, even 'simply expanded variables' will not put their currently
|
||||
# defined value verbatim into the command-list of rules...
|
||||
@@ -53,5 +54,5 @@ install-kernel-busses: all-kernel-busses
|
||||
install :: install-kernel-busses
|
||||
|
||||
clean-kernel-busses:
|
||||
$(RM) $(KERNELBUSSESTARGETS) $(KERNELBUSSESTARGETS:.o=.d)
|
||||
$(RM) $(KERNELBUSSESDIR)/*.o $(KERNELBUSSESDIR)/*.d
|
||||
clean :: clean-kernel-busses
|
||||
@@ -19,6 +19,7 @@
|
||||
# 'simply expanded variable'. That means that its value is substituted
|
||||
# verbatim in the rules, until it is redefined.
|
||||
MODULE_DIR := kernel/chips
|
||||
KERNELCHIPSDIR := $(MODULE_DIR)
|
||||
|
||||
# Regrettably, even 'simply expanded variables' will not put their currently
|
||||
# defined value verbatim into the command-list of rules...
|
||||
@@ -68,5 +69,5 @@ install-kernel-chips: all-kernel-chips
|
||||
install :: install-kernel-chips
|
||||
|
||||
clean-kernel-chips:
|
||||
$(RM) $(KERNELCHIPSTARGETS) $(KERNELCHIPSTARGETS:.o=.d)
|
||||
$(RM) $(KERNELCHIPSDIR)/*.o $(KERNELCHIPSDIR)/*.d
|
||||
clean :: clean-kernel-chips
|
||||
@@ -19,6 +19,7 @@
|
||||
# 'simply expanded variable'. That means that its value is substituted
|
||||
# verbatim in the rules, until it is redefined.
|
||||
MODULE_DIR := kernel/include
|
||||
KERNELINCLUDEDIR := $(MODULE_DIR)
|
||||
|
||||
KERNELINCLUDEFILES :=
|
||||
ifneq ($(shell if grep -q '^CONFIG_SENSORS=y' $(LINUX)/.config; then echo 1; fi),1)
|
||||
@@ -35,6 +36,6 @@ install-all-kernel-include:
|
||||
install :: install-all-kernel-include
|
||||
|
||||
clean-all-kernel-include:
|
||||
$(RM) $(KERNELINCLUDEFILES:.h=.h.install)
|
||||
$(RM) $(KERNELINCLUDEDIR)/*.h.install
|
||||
|
||||
clean :: clean-all-kernel-include
|
||||
+6
-4
@@ -19,6 +19,7 @@
|
||||
# 'simply expanded variable'. That means that its value is substituted
|
||||
# verbatim in the rules, until it is redefined.
|
||||
MODULE_DIR := lib
|
||||
LIBDIR := $(MODULE_DIR)
|
||||
|
||||
# The manual dirs and files
|
||||
LIBMAN3DIR := $(MANDIR)/man3
|
||||
@@ -48,7 +49,8 @@ LIBCSOURCES := $(MODULE_DIR)/data.c $(MODULE_DIR)/general.c \
|
||||
LIBOTHEROBJECTS := $(MODULE_DIR)/conf-parse.o $(MODULE_DIR)/conf-lex.o
|
||||
LIBSHOBJECTS := $(LIBCSOURCES:.c=.lo) $(LIBOTHEROBJECTS:.o=.lo)
|
||||
LIBSTOBJECTS := $(LIBCSOURCES:.c=.ao) $(LIBOTHEROBJECTS:.o=.ao)
|
||||
LIBEXTRACLEAN := $(MODULE_DIR)/conf-parse.h $(MODULE_DIR)/libsensors.so*
|
||||
LIBEXTRACLEAN := $(MODULE_DIR)/conf-parse.h $(MODULE_DIR)/conf-parse.c \
|
||||
$(MODULE_DIR)/conf-lex.c
|
||||
|
||||
LIBHEADERFILES := $(MODULE_DIR)/error.h $(MODULE_DIR)/sensors.h \
|
||||
$(MODULE_DIR)/chips.h
|
||||
@@ -95,7 +97,7 @@ install-lib: all-lib
|
||||
install :: install-lib
|
||||
|
||||
clean-lib:
|
||||
$(RM) $(LIBTARGETS) $(LIBSHOBJECTS) $(LIBSTOBJECTS)
|
||||
$(RM) $(LIBSHOBJECTS:.lo=.ld) $(LIBSTOBJECTS:.ao=.ad)
|
||||
$(RM) $(LIBOTHEROBJECTS:.o=.c) $(LIBEXTRACLEAN)
|
||||
$(RM) $(LIBDIR)/*.ld $(LIBDIR)/*.ad
|
||||
$(RM) $(LIBDIR)/*.lo $(LIBDIR)/*.ao
|
||||
$(RM) $(LIBTARGETS) $(LIBEXTRACLEAN)
|
||||
clean :: clean-lib
|
||||
@@ -0,0 +1,26 @@
|
||||
# Module.mk - Makefile for a Linux module for reading sensor data.
|
||||
# Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
# Note that MODULE_DIR (the directory in which this file resides) is a
|
||||
# 'simply expanded variable'. That means that its value is substituted
|
||||
# verbatim in the rules, until it is redefined.
|
||||
MODULE_DIR := mkpatch
|
||||
MKPATCHDIR := $(MODULE_DIR)
|
||||
|
||||
clean-mkpatch:
|
||||
$(RM) $(MKPATCHDIR)/.temp
|
||||
clean :: clean-mkpatch
|
||||
@@ -19,6 +19,7 @@
|
||||
# 'simply expanded variable'. That means that its value is substituted
|
||||
# verbatim in the rules, until it is redefined.
|
||||
MODULE_DIR := prog/detect
|
||||
PROGDETECTDIR := $(MODULE_DIR)
|
||||
|
||||
# Regrettably, even 'simply expanded variables' will not put their currently
|
||||
# defined value verbatim into the command-list of rules...
|
||||
@@ -39,6 +40,5 @@ install-prog-detect: all-prog-detect
|
||||
install :: install-prog-detect
|
||||
|
||||
clean-prog-detect:
|
||||
$(RM) $(PROGDETECTSOURCES:.c=.rd) $(PROGDETECTSOURCES:.c=.ro) \
|
||||
$(PROGDETECTTARGETS)
|
||||
$(RM) $(PROGDETECTDIR)/*.rd $(PROGDETECTDIR)/*.ro $(PROGDETECTTARGETS)
|
||||
clean :: clean-prog-detect
|
||||
+2
-2
@@ -19,6 +19,7 @@
|
||||
# 'simply expanded variable'. That means that its value is substituted
|
||||
# verbatim in the rules, until it is redefined.
|
||||
MODULE_DIR := prog/dump
|
||||
PROGDUMPDIR := $(MODULE_DIR)
|
||||
|
||||
# Regrettably, even 'simply expanded variables' will not put their currently
|
||||
# defined value verbatim into the command-list of rules...
|
||||
@@ -33,6 +34,5 @@ all-prog-dump: $(PROGDUMPTARGETS)
|
||||
all :: all-prog-dump
|
||||
|
||||
clean-prog-dump:
|
||||
$(RM) $(PROGDUMPSOURCES:.c=.rd) $(PROGDUMPSOURCES:.c=.ro) \
|
||||
$(PROGDUMPTARGETS)
|
||||
$(RM) $(PROGDUMPDIR)/*.rd $(PROGDUMPDIR)/*.ro $(PROGDUMPTARGETS)
|
||||
clean :: clean-prog-dump
|
||||
@@ -19,6 +19,7 @@
|
||||
# 'simply expanded variable'. That means that its value is substituted
|
||||
# verbatim in the rules, until it is redefined.
|
||||
MODULE_DIR := prog/sensors
|
||||
PROGSENSORSDIR := $(MODULE_DIR)
|
||||
|
||||
PROGSENSORSMAN1DIR := $(MANDIR)/man1
|
||||
PROGSENSORSMAN1FILES := $(MODULE_DIR)/sensors.1
|
||||
@@ -45,6 +46,6 @@ install-prog-sensors: all-prog-sensors
|
||||
install :: install-prog-sensors
|
||||
|
||||
clean-prog-sensors:
|
||||
$(RM) $(PROGSENSORSSOURCES:.c=.rd) $(PROGSENSORSSOURCES:.c=.ro) \
|
||||
$(PROGSENSORSTARGETS)
|
||||
$(RM) $(PROGSENSORSDIR)/*.rd $(PROGSENSORSDIR)/*.ro
|
||||
$(RM) $(PROGSENSORSTARGETS)
|
||||
clean :: clean-prog-sensors
|
||||
Reference in new issue
Block a user