Skip to content

Instantly share code, notes, and snippets.

@toddlers
Created November 16, 2017 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toddlers/be29a4878bc53364572c9a86b449feb8 to your computer and use it in GitHub Desktop.
Save toddlers/be29a4878bc53364572c9a86b449feb8 to your computer and use it in GitHub Desktop.
Makefil debugging

makefile has a very stupid relation with tabs , all actions of every rule are identified by tabs. and No 4 spaces dont make a tab , only a tab makes a tab...

to check i use the command

cat -e -t -v  makefile_name

it shows the presence of tabs with ^I and line endings with $ both are vital to ensure that dependencies end properly and tabs mark the action for the rules so that they are easily identifiable to the make utility.

foo@e:~$ cat -e -t -v  foo.txt
hello$
 from$
^Ithis $
   world$
sureshp@e1:~$ cat foo.txt
hello
 from
	this
   world
foo@e:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment