home *** CD-ROM | disk | FTP | other *** search
- .K PAT,>/K
- .BRA {
- .KET }
- ;; MAKEDEP -- Create dependency lists for C makefiles.
-
- ;; Source files are assumed to have the ".c" extension, and #includes
- ;; to end in either ".h" or ".c". The script is NOT smart enough to do
- ;; nested includes!
-
- mat #?.c key {PAT}
- if WARN
- Mat >T:depen "'#include # (?||<)^#?.(h|c)^#?" "^1 " tag ^B@@@^F@^|^B@@@^F@ nolines {PAT}.c
- else
- Mat >T:depen "'#include # (?||<)^#?.(h|c)^#?" "^1 " tag ^B@@@^F@^|^B@@@^F@ nolines {PAT}
- endif
- if "{>}" eq ""
- Mat @@@^#?^.c@^#? "^B^1.o : ^1.c ^3" T:depen label ^B###
- else
- Mat >{>} @@@^#?^.c@^#? "^B^1.o : ^1.c ^3" T:depen label ^B###
- endif
- del T:depen
-
- ;; Creating a dependency list in "make" format requires two passes of Mat.
- ;; The first pass creates a temporary file ("T:depen") that contains one
- ;; line for each line scanned. After a (probably unnecessary) "@@@" prefix
- ;; comes the filename, another "@" and all the included filenames found
- ;; (assumed to end in either ".h" or ".c").
- ;; The second pass strips the ".c" extension off the filename (it MUST BE
- ;; a ".c" file!) and rearranges things into a standard dependency line.
-
-