PageRenderTime 4ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/get-log-index.sed

https://code.google.com/p/latex-makefile/
sed | 19 lines | 10 code | 2 blank | 7 comment | 0 complexity | a0497dd38fe86526d7595206fbdcefc0 MD5 | raw file
  1. #(##defaults(target_files="TARGET_FILES", stem="STEM")##)
  2. # Look for missing index or glossary files.
  3. s/^No file \(.*\.ind\)\.$/TARGETS=\1/
  4. s/^No file \(.*\.[gn]ls\)\.$/TARGETS=\1/
  5. # Escape spaces in file names
  6. s/[[:space:]]/\\&/g
  7. # If we have a target, rewrite it to be a make dependency rule
  8. /^TARGETS=/{
  9. # Save it, rewrite to a make dependency
  10. h
  11. s!^TARGETS=!(##target_files##): !p
  12. # Get the old one back, add yet another make dependency
  13. g
  14. s!^TARGETS=\(.*\)!\1: (##stem##).tex!p
  15. }
  16. # Anything else is trash
  17. d