Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.5 makefile.in #377

Merged
merged 2 commits into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions 4.5/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ signature: all
$(MODSIGN_COMMAND) wacom_w8001.ko
$(MODSIGN_COMMAND) wacom_i2c.ko

install modules_install:
kernel_install:
$(MAKE) -C $(WCM_KERNEL_DIR) M=$(PWD) modules_install mod_sign_cmd='$(MODSIGN_COMMAND)'

depmod: SEARCH_EXTRA=$(strip $(wildcard /lib/modules/$(MODUTS)/extra/wacom.ko*))
depmod: SEARCH_UPDATES=$(strip $(wildcard /lib/modules/$(MODUTS)/updates/wacom.ko*))
depmod: MODINST_DIR=$(strip $(if $(SEARCH_EXTRA), extra, $(if $(SEARCH_UPDATES), updates)))
depmod:
$(if $(MODINST_DIR),,$(error Could not find where driver was installed))
mkdir -p /etc/depmod.d
echo "override wacom * extra" > /etc/depmod.d/input-wacom.conf
echo "override wacom_w8001 * extra" >> /etc/depmod.d/input-wacom.conf
echo "override wacom_i2c * extra" >> /etc/depmod.d/input-wacom_i2c.conf
echo "override wacom * $(MODINST_DIR)" > /etc/depmod.d/input-wacom.conf
echo "override wacom_w8001 * $(MODINST_DIR)" >> /etc/depmod.d/input-wacom.conf
echo "override wacom_i2c * $(MODINST_DIR)" >> /etc/depmod.d/input-wacom.conf
PATH="$(PATH):/bin:/sbin" depmod -a $(MODUTS)
ifdef UPDATE_INITRAMFS
$(UPDATE_INITRAMFS) -u -k $(MODUTS)
Expand All @@ -65,15 +71,18 @@ ifdef DRACUT
$(DRACUT) -f --kver=$(MODUTS)
endif

install modules_install: kernel_install depmod

uninstall: SEARCH_EXTRA=$(strip $(wildcard /lib/modules/$(MODUTS)/extra/wacom.ko*))
uninstall: SEARCH_UPDATES=$(strip $(wildcard /lib/modules/$(MODUTS)/updates/wacom.ko*))
uninstall: MODINST_DIR=$(strip $(if $(SEARCH_EXTRA), extra, $(if $(SEARCH_UPDATES), updates)))
uninstall:
@# Debian uses symlinks in the path to WCM_KERNEL_DIR
@# which causes trouble for tools like 'rm' which don't
@# see the path how you might think. As a workaround,
@# first cd into the directory and then remove.
cd $(WCM_KERNEL_DIR)/../extra; rm wacom.ko*
cd $(WCM_KERNEL_DIR)/../extra; rm wacom_w8001.ko*
cd $(WCM_KERNEL_DIR)/../extra; rm wacom_i2c.ko*
rm -f /etc/depmod.d/input-wacom.conf
cd /lib/modules/$(MODUTS)/$(MODINST_DIR); rm wacom*.ko*
rm -f /etc/depmod.d/input-wacom*.conf
PATH="$(PATH):/bin:/sbin" depmod -a $(MODUTS)
ifdef UPDATE_INITRAMFS
$(UPDATE_INITRAMFS) -u -k $(MODUTS)
Expand All @@ -98,6 +107,6 @@ distdir:

EMPTY_AUTOMAKE_TARGETS = install-data install-exec uninstall install-info
EMPTY_AUTOMAKE_TARGETS += installdirs check dvi pdf ps info html tags ctags mostlyclean maintainer-clean
EMPTY_AUTOMAKE_TARGETS += signature
EMPTY_AUTOMAKE_TARGETS += signature depmod kernel_install
.PHONY: $(EMPTY_AUTOMAKE_TARGETS)
$(EMPTY_AUTOMAKE_TARGETS):
Loading