I have the following GNU make Makefile
PWD := $(shell pwd)
obj-m += liason.o
default:
bash -c '[ "$(lsmod|grep liason)" == "" ] || rmmod liason'
make -C /src M=$(PWD) modules
I invoke the makefile; it shows this among the output:
bash -c '[ "" == "" ] || rmmod liason'
Thus, rmmod isn't executed.
However:
Module "liason" is installed.
It even shows up when I execute the following from cmdline.
$ lsmod|grep liason
liason 16384 0
Therefore, empty quotes for the same lsmod|grep in the makefile output doesn't make sense.