title: target doesn't match the target pattern
body: <p>I am compiling (&amp; linking) my Linux driver code and getting the following error while module linking. I tried to check my Makefile for any potential errors(tabs, spaces, etc). However, it's pretty much used for my other kernel module programming and it works fine. Any sort of poi</p>
  
  <p>Module Src : </p>
  
  <p>Makefile : </p>
  
  <blockquote>
    <p>obj-m += static_waitqueue_driver.c</p>
    
    <p>KDIR = /lib/modules/$(shell uname -r)/build</p>
    
    <p>all:
        make -C $(KDIR)  M=$(shell pwd) modules</p>
    
    <p>clean:
        make -C $(KDIR)  M=$(shell pwd) clean</p>
  </blockquote>
  
  <p>Error : </p>
  
  <blockquote>
    <p>User:sudhanshu   Host:UbuntuVirtualBox  Date:Wed Apr 01<br>
    Time:13:23:36 24  ~/tmp/01_linux_learning/10_wait_queue $ make make -C
    /lib/modules/5.3.0-28-generic/build 
    M=/home/sudhanshu/tmp/01_linux_learning/10_wait_queue modules make[1]:
    Entering directory '/usr/src/linux-headers-5.3.0-28-generic'<br>
    Building modules, stage 2. scripts/Makefile.modpost:113: target
    '/home/sudhanshu/tmp/01_linux_learning/10_wait_queue/static_waitqueue_driver.c'
    doesn't match the target pattern scripts/Makefile.modpost:114:
    warning: overriding recipe for target
    '/home/sudhanshu/tmp/01_linux_learning/10_wait_queue/static_waitqueue_driver.c'
    scripts/Makefile.modpost:101: warning: ignoring old recipe for target
    '/home/sudhanshu/tmp/01_linux_learning/10_wait_queue/static_waitqueue_driver.c'
    scripts/Makefile.modpost:128: target
    '/home/sudhanshu/tmp/01_linux_learning/10_wait_queue/static_waitqueue_driver.c'
    doesn't match the target pattern scripts/Makefile.modpost:129:
    warning: overriding recipe for target
    '/home/sudhanshu/tmp/01_linux_learning/10_wait_queue/static_waitqueue_driver.c'
    scripts/Makefile.modpost:114: warning: ignoring old recipe for target
    '/home/sudhanshu/tmp/01_linux_learning/10_wait_queue/static_waitqueue_driver.c'
    MODPOST 1 modules   LD [M] 
    /home/sudhanshu/tmp/01_linux_learning/10_wait_queue/static_waitqueue_driver.c
    ld: no input files scripts/Makefile.modpost:129: recipe for target
    '/home/sudhanshu/tmp/01_linux_learning/10_wait_queue/static_waitqueue_driver.c'
    failed make[2]: <strong>*
    [/home/sudhanshu/tmp/01_linux_learning/10_wait_queue/static_waitqueue_driver.c]
    Error 1 Makefile:1658: recipe for target 'modules' failed make[1]: *</strong>
    [modules] Error 2 make[1]: Leaving directory
    '/usr/src/linux-headers-5.3.0-28-generic' Makefile:6: recipe for
    target 'all' failed make: *** [all] Error 2</p>
  </blockquote>