FIX: operator syntax & make simpler (rm -rf/mkdir -p are always silencious)

This commit is contained in:
fboltz 2022-02-15 23:06:26 +01:00
parent 8c42531fad
commit 31b389dff9

View file

@ -4,7 +4,8 @@ curpwd := $(shell pwd)
kver := $(shell uname -r)
build:
[[ -d "${curpwd}/${kver}" ]] && echo "${kver} directory already exist." && rm -rf ${curpwd}/${kver} && mkdir -p ${curpwd}/${kver} || mkdir -p ${curpwd}/${kver}
rm -rf ${curpwd}/${kver}
mkdir -p ${curpwd}/${kver}
cp ${curpwd}/Makefile ${curpwd}/nct6687.c ${curpwd}/${kver}
cd ${curpwd}/${kver}
make -C /lib/modules/${kver}/build M=${curpwd}/${kver} modules
@ -15,4 +16,4 @@ install: build
sudo modprobe nct6687
clean:
[[ ! -d "${curpwd}/${kver}" ]] && echo "${kver} directory not found. Aborting!!!" || make -C /lib/modules/${kver}/build M=${curpwd}/${kver} clean
[ -d "${curpwd}/${kver}" ] && make -C /lib/modules/${kver}/build M=${curpwd}/${kver} clean