Skip to content

Commit 9876299

Browse files
committed
drop "make patch"
1 parent bf5c951 commit 9876299

4 files changed

Lines changed: 3 additions & 79 deletions

File tree

Makefile

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ endif
3232

3333
DEBUG := 0
3434

35-
.PHONY: default clean modules load unload install patch check_hdaps mk-hdaps.diff \
35+
.PHONY: default clean modules load unload install check_hdaps \
3636
check-ver set-version create-tgz create-rpm
3737
export TP_MODULES
3838

@@ -49,9 +49,8 @@ clean:
4949
rm -f tp_smapi.mod.* tp_smapi.o tp_smapi.ko .tp_smapi.*.cmd
5050
rm -f thinkpad_ec.mod.* thinkpad_ec.o thinkpad_ec.ko .thinkpad_ec.*.cmd
5151
rm -f hdaps.mod.* hdaps.o hdaps.ko .hdaps.*.cmd
52-
rm -f *~ diff/*~ *.orig diff/*.orig *.rej diff/*.rej
53-
rm -f tp_smapi-*-for-*.patch
54-
rm -fr .tmp_versions Modules.symvers diff/hdaps.diff.tmp
52+
rm -f *~ *.orig *.rej
53+
rm -fr .tmp_versions Modules.symvers
5554

5655
load: check_hdaps unload modules
5756
@( [ `id -u` == 0 ] || { echo "Must be root to load modules"; exit 1; } )
@@ -86,59 +85,6 @@ endif
8685
depmod $(KVER)
8786

8887

89-
#####################################################################
90-
# Generate a stand-alone kernel patch
91-
92-
TP_VER := 0.44
93-
ORG := a
94-
NEW := b
95-
PATCH := tp_smapi-$(TP_VER)-for-$(KVER).patch
96-
97-
BASE_IN_PATCH := 1
98-
SMAPI_IN_PATCH := 1
99-
HDAPS_IN_PATCH := 1
100-
101-
patch: $(KSRC)
102-
@TMPDIR=`mktemp -d /tmp/tp_smapi-patch.XXXXXX` &&\
103-
echo "Working directory: $$TMPDIR" &&\
104-
cd $$TMPDIR &&\
105-
mkdir -p $(ORG)/$(TP_DIR) &&\
106-
mkdir -p $(ORG)/$(IDIR) &&\
107-
mkdir -p $(ORG)/drivers/platform/x86 &&\
108-
cp $(KSRC)/$(TP_DIR)/{Kconfig,Makefile} $(ORG)/$(TP_DIR) &&\
109-
cp $(KSRC)/drivers/platform/x86/{Kconfig,hdaps.c} $(ORG)/drivers/platform/x86/ &&\
110-
cp -r $(ORG) $(NEW) &&\
111-
\
112-
if [ "$(BASE_IN_PATCH)" == 1 ]; then \
113-
cp $(PWD)/thinkpad_ec.c $(NEW)/$(TP_DIR)/thinkpad_ec.c &&\
114-
cp $(PWD)/thinkpad_ec.h $(NEW)/$(TP_DIR)/thinkpad_ec.h &&\
115-
perl -i -pe 'print `cat $(PWD)/diff/Kconfig-thinkpad_ec.add` if m/^(endmenu|endif # X86_PLATFORM_DEVICES)$$/' $(NEW)/$(TP_DIR)/Kconfig &&\
116-
sed -i -e '$$aobj-$$(CONFIG_THINKPAD_EC) += thinkpad_ec.o' $(NEW)/$(TP_DIR)/Makefile \
117-
; fi &&\
118-
\
119-
if [ "$(HDAPS_IN_PATCH)" == 1 ]; then \
120-
cp $(PWD)/hdaps.c $(NEW)/drivers/platform/x86/ &&\
121-
perl -i -0777 -pe 's/(config SENSORS_HDAPS\n\ttristate [^\n]+\n\tdepends [^\n]+\n)/$$1\tselect THINKPAD_EC\n/' $(NEW)/drivers/platform/x86/Kconfig \
122-
; fi &&\
123-
\
124-
if [ "$(SMAPI_IN_PATCH)" == 1 ]; then \
125-
sed -i -e '$$aobj-$$(CONFIG_TP_SMAPI) += tp_smapi.o' $(NEW)/$(TP_DIR)/Makefile &&\
126-
perl -i -pe 'print `cat $(PWD)/diff/Kconfig-tp_smapi.add` if m/^(endmenu|endif # X86_PLATFORM_DEVICES)$$/' $(NEW)/$(TP_DIR)/Kconfig &&\
127-
cp $(PWD)/tp_smapi.c $(NEW)/$(TP_DIR)/tp_smapi.c &&\
128-
mkdir -p $(NEW)/Documentation &&\
129-
perl -0777 -pe 's/\n(Installation\n---+|Conflict with HDAPS\n---+|Files in this package\n---+|Setting and getting CD-ROM speed:\n).*?\n(?=[^\n]*\n-----)/\n/gs' $(PWD)/README > $(NEW)/Documentation/tp_smapi.txt \
130-
; fi &&\
131-
\
132-
{ diff -dNurp $(ORG) $(NEW) > patch \
133-
|| [ $$? -lt 2 ]; } &&\
134-
{ echo "Generated for $(KVER) in $(KSRC)"; echo; diffstat patch; echo; echo; cat patch; } \
135-
> $(PWD)/${PATCH} &&\
136-
rm -r $$TMPDIR
137-
@echo
138-
@diffstat ${PATCH}
139-
@echo -e "\nPatch file created:\n ${PATCH}"
140-
@echo -e "To apply, use:\n patch -p1 -d ${KSRC} < ${PATCH}"
141-
14288
#####################################################################
14389
# Tools for preparing a release. Ignore these.
14490

README

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,6 @@ thinkpad_ec.*
326326
hdaps.c
327327
Modified version of hdaps.c driver from mainline kernel, patched to use
328328
thinkpad_ec and several other improvements.
329-
diff/* (excluding above)
330-
Used by "make patch" to create a clean stand-alone patch.
331329

332330

333331
More about SMAPI

diff/Kconfig-thinkpad_ec.add

Lines changed: 0 additions & 8 deletions
This file was deleted.

diff/Kconfig-tp_smapi.add

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)