Bash: call make when directory changes
You're going to get false positives by comparing the output of ls -l.  In many locales, this command gives date stamps in different formats for newer files (day+time) and older files (year+day).  When any file transitions from &quot;new&quot; to &quot;old&quot; in this scheme, you'll get a spurious notification.  If you have the GNU implementation of ls, you can make it use a specific timestamp format (e.g. --time-style=full-iso) which might alleviate that problem.  Or just accept the false positives (make should be reasonably quick if nothing actually changed).
The usual problem of failing to quote arguments ($1 where you should have written &quot;$1&quot;) will mess up arguments that contain whitespace or shell pattern characters.  Although that might be unlikely for your source directories, it's trivial to fix, and a good habit to have.
Testing that the string true is non-empty ([ true ]) is an unusual approach to making an infinite loop - most shell programmers would simply use the true command.  Actually, it's probably better to test the result of sleep, which returns non-zero if interrupted.
Instead of polling, you should be able to block on filesystem notification events.  Perhaps inotifywait meets your needs here?
If we use plain [ rather than [[, the code becomes portable (POSIX) shell, without needing Bash extensions, so is useful to more people.
Is it right that you want to run make in the current directory?  For some users, it might make more sense to make -C &quot;$1&quot;.  You could be more flexible by allowing a command to be specified (here I've kept make as default):
monitor_and_build()
{
    local d=${1:-.}; shift
    test -d &quot;$d&quot; || return 1
    local sauce=$(ls -l --time-style=full-iso &quot;$d&quot;)
    while sleep 1
    do
        local newsauce=$(ls -l --time-style=full-iso &quot;$d&quot;)
        if [ &quot;$sauce&quot; != &quot;$newsauce&quot; ]
        then &quot;${@:-make}&quot;
        fi
        local sauce=&quot;$newsauce&quot;
    done
}