 (defun mymake-add-source-template (config)
   (let ((pch (mymake-assoc 'pch config 'nil)))
     ;; Syntax highlighting works _way_ better when one string is inserted instead of in different parts...
-    (if (not (endp pch))
+    (if (not (eq nil pch))
 	(insert (concat "#include \"" pch "\"\n"))))
   (let* ((header (mymake-assoc 'header-ext config "h"))
 	 (fn (concat (file-name-base buffer-file-name) "." header)))

	 (args (mymake-args-str prepend replace (mymake-assoc 'cmdline config))))
    (compile (concat
	      mymake-command " "
	      (if (endp force)
		  args
		(concat "-f " args))) t)))


;; Get parent directory or nil if none.
(defun parent-directory (dir)
  (let ((r (file-name-directory (directory-file-name dir))))
    (cond ((eq nil r) 'nil)
	  ((< (length r) (length dir)) r)
	  (t 'nil))))

