depcomp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. #! /bin/sh
  2. # depcomp - compile a program generating dependencies as side-effects
  3. scriptversion=2007-03-29.01
  4. # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
  5. # Foundation, Inc.
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  17. # 02110-1301, USA.
  18. # As a special exception to the GNU General Public License, if you
  19. # distribute this file as part of a program that contains a
  20. # configuration script generated by Autoconf, you may include it under
  21. # the same distribution terms that you use for the rest of that program.
  22. # Originally written by Alexandre Oliva <[email protected]>.
  23. case $1 in
  24. '')
  25. echo "$0: No command. Try \`$0 --help' for more information." 1>&2
  26. exit 1;
  27. ;;
  28. -h | --h*)
  29. cat <<\EOF
  30. Usage: depcomp [--help] [--version] PROGRAM [ARGS]
  31. Run PROGRAMS ARGS to compile a file, generating dependencies
  32. as side-effects.
  33. Environment variables:
  34. depmode Dependency tracking mode.
  35. source Source file read by `PROGRAMS ARGS'.
  36. object Object file output by `PROGRAMS ARGS'.
  37. DEPDIR directory where to store dependencies.
  38. depfile Dependency file to output.
  39. tmpdepfile Temporary file to use when outputing dependencies.
  40. libtool Whether libtool is used (yes/no).
  41. Report bugs to <[email protected]>.
  42. EOF
  43. exit $?
  44. ;;
  45. -v | --v*)
  46. echo "depcomp $scriptversion"
  47. exit $?
  48. ;;
  49. esac
  50. if test -z "$depmode" || test -z "$source" || test -z "$object"; then
  51. echo "depcomp: Variables source, object and depmode must be set" 1>&2
  52. exit 1
  53. fi
  54. # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
  55. depfile=${depfile-`echo "$object" |
  56. sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
  57. tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
  58. rm -f "$tmpdepfile"
  59. # Some modes work just like other modes, but use different flags. We
  60. # parameterize here, but still list the modes in the big case below,
  61. # to make depend.m4 easier to write. Note that we *cannot* use a case
  62. # here, because this file can only contain one case statement.
  63. if test "$depmode" = hp; then
  64. # HP compiler uses -M and no extra arg.
  65. gccflag=-M
  66. depmode=gcc
  67. fi
  68. if test "$depmode" = dashXmstdout; then
  69. # This is just like dashmstdout with a different argument.
  70. dashmflag=-xM
  71. depmode=dashmstdout
  72. fi
  73. case "$depmode" in
  74. gcc3)
  75. ## gcc 3 implements dependency tracking that does exactly what
  76. ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
  77. ## it if -MD -MP comes after the -MF stuff. Hmm.
  78. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
  79. ## the command line argument order; so add the flags where they
  80. ## appear in depend2.am. Note that the slowdown incurred here
  81. ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
  82. for arg
  83. do
  84. case $arg in
  85. -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
  86. *) set fnord "$@" "$arg" ;;
  87. esac
  88. shift # fnord
  89. shift # $arg
  90. done
  91. "$@"
  92. stat=$?
  93. if test $stat -eq 0; then :
  94. else
  95. rm -f "$tmpdepfile"
  96. exit $stat
  97. fi
  98. mv "$tmpdepfile" "$depfile"
  99. ;;
  100. gcc)
  101. ## There are various ways to get dependency output from gcc. Here's
  102. ## why we pick this rather obscure method:
  103. ## - Don't want to use -MD because we'd like the dependencies to end
  104. ## up in a subdir. Having to rename by hand is ugly.
  105. ## (We might end up doing this anyway to support other compilers.)
  106. ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
  107. ## -MM, not -M (despite what the docs say).
  108. ## - Using -M directly means running the compiler twice (even worse
  109. ## than renaming).
  110. if test -z "$gccflag"; then
  111. gccflag=-MD,
  112. fi
  113. "$@" -Wp,"$gccflag$tmpdepfile"
  114. stat=$?
  115. if test $stat -eq 0; then :
  116. else
  117. rm -f "$tmpdepfile"
  118. exit $stat
  119. fi
  120. rm -f "$depfile"
  121. echo "$object : \\" > "$depfile"
  122. alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
  123. ## The second -e expression handles DOS-style file names with drive letters.
  124. sed -e 's/^[^:]*: / /' \
  125. -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
  126. ## This next piece of magic avoids the `deleted header file' problem.
  127. ## The problem is that when a header file which appears in a .P file
  128. ## is deleted, the dependency causes make to die (because there is
  129. ## typically no way to rebuild the header). We avoid this by adding
  130. ## dummy dependencies for each header file. Too bad gcc doesn't do
  131. ## this for us directly.
  132. tr ' ' '
  133. ' < "$tmpdepfile" |
  134. ## Some versions of gcc put a space before the `:'. On the theory
  135. ## that the space means something, we add a space to the output as
  136. ## well.
  137. ## Some versions of the HPUX 10.20 sed can't process this invocation
  138. ## correctly. Breaking it into two sed invocations is a workaround.
  139. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  140. rm -f "$tmpdepfile"
  141. ;;
  142. hp)
  143. # This case exists only to let depend.m4 do its work. It works by
  144. # looking at the text of this script. This case will never be run,
  145. # since it is checked for above.
  146. exit 1
  147. ;;
  148. sgi)
  149. if test "$libtool" = yes; then
  150. "$@" "-Wp,-MDupdate,$tmpdepfile"
  151. else
  152. "$@" -MDupdate "$tmpdepfile"
  153. fi
  154. stat=$?
  155. if test $stat -eq 0; then :
  156. else
  157. rm -f "$tmpdepfile"
  158. exit $stat
  159. fi
  160. rm -f "$depfile"
  161. if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
  162. echo "$object : \\" > "$depfile"
  163. # Clip off the initial element (the dependent). Don't try to be
  164. # clever and replace this with sed code, as IRIX sed won't handle
  165. # lines with more than a fixed number of characters (4096 in
  166. # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
  167. # the IRIX cc adds comments like `#:fec' to the end of the
  168. # dependency line.
  169. tr ' ' '
  170. ' < "$tmpdepfile" \
  171. | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
  172. tr '
  173. ' ' ' >> $depfile
  174. echo >> $depfile
  175. # The second pass generates a dummy entry for each header file.
  176. tr ' ' '
  177. ' < "$tmpdepfile" \
  178. | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
  179. >> $depfile
  180. else
  181. # The sourcefile does not contain any dependencies, so just
  182. # store a dummy comment line, to avoid errors with the Makefile
  183. # "include basename.Plo" scheme.
  184. echo "#dummy" > "$depfile"
  185. fi
  186. rm -f "$tmpdepfile"
  187. ;;
  188. aix)
  189. # The C for AIX Compiler uses -M and outputs the dependencies
  190. # in a .u file. In older versions, this file always lives in the
  191. # current directory. Also, the AIX compiler puts `$object:' at the
  192. # start of each line; $object doesn't have directory information.
  193. # Version 6 uses the directory in both cases.
  194. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
  195. test "x$dir" = "x$object" && dir=
  196. base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
  197. if test "$libtool" = yes; then
  198. tmpdepfile1=$dir$base.u
  199. tmpdepfile2=$base.u
  200. tmpdepfile3=$dir.libs/$base.u
  201. "$@" -Wc,-M
  202. else
  203. tmpdepfile1=$dir$base.u
  204. tmpdepfile2=$dir$base.u
  205. tmpdepfile3=$dir$base.u
  206. "$@" -M
  207. fi
  208. stat=$?
  209. if test $stat -eq 0; then :
  210. else
  211. rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
  212. exit $stat
  213. fi
  214. for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
  215. do
  216. test -f "$tmpdepfile" && break
  217. done
  218. if test -f "$tmpdepfile"; then
  219. # Each line is of the form `foo.o: dependent.h'.
  220. # Do two passes, one to just change these to
  221. # `$object: dependent.h' and one to simply `dependent.h:'.
  222. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
  223. # That's a tab and a space in the [].
  224. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
  225. else
  226. # The sourcefile does not contain any dependencies, so just
  227. # store a dummy comment line, to avoid errors with the Makefile
  228. # "include basename.Plo" scheme.
  229. echo "#dummy" > "$depfile"
  230. fi
  231. rm -f "$tmpdepfile"
  232. ;;
  233. icc)
  234. # Intel's C compiler understands `-MD -MF file'. However on
  235. # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
  236. # ICC 7.0 will fill foo.d with something like
  237. # foo.o: sub/foo.c
  238. # foo.o: sub/foo.h
  239. # which is wrong. We want:
  240. # sub/foo.o: sub/foo.c
  241. # sub/foo.o: sub/foo.h
  242. # sub/foo.c:
  243. # sub/foo.h:
  244. # ICC 7.1 will output
  245. # foo.o: sub/foo.c sub/foo.h
  246. # and will wrap long lines using \ :
  247. # foo.o: sub/foo.c ... \
  248. # sub/foo.h ... \
  249. # ...
  250. "$@" -MD -MF "$tmpdepfile"
  251. stat=$?
  252. if test $stat -eq 0; then :
  253. else
  254. rm -f "$tmpdepfile"
  255. exit $stat
  256. fi
  257. rm -f "$depfile"
  258. # Each line is of the form `foo.o: dependent.h',
  259. # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
  260. # Do two passes, one to just change these to
  261. # `$object: dependent.h' and one to simply `dependent.h:'.
  262. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
  263. # Some versions of the HPUX 10.20 sed can't process this invocation
  264. # correctly. Breaking it into two sed invocations is a workaround.
  265. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
  266. sed -e 's/$/ :/' >> "$depfile"
  267. rm -f "$tmpdepfile"
  268. ;;
  269. hp2)
  270. # The "hp" stanza above does not work with aCC (C++) and HP's ia64
  271. # compilers, which have integrated preprocessors. The correct option
  272. # to use with these is +Maked; it writes dependencies to a file named
  273. # 'foo.d', which lands next to the object file, wherever that
  274. # happens to be.
  275. # Much of this is similar to the tru64 case; see comments there.
  276. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
  277. test "x$dir" = "x$object" && dir=
  278. base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
  279. if test "$libtool" = yes; then
  280. tmpdepfile1=$dir$base.d
  281. tmpdepfile2=$dir.libs/$base.d
  282. "$@" -Wc,+Maked
  283. else
  284. tmpdepfile1=$dir$base.d
  285. tmpdepfile2=$dir$base.d
  286. "$@" +Maked
  287. fi
  288. stat=$?
  289. if test $stat -eq 0; then :
  290. else
  291. rm -f "$tmpdepfile1" "$tmpdepfile2"
  292. exit $stat
  293. fi
  294. for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
  295. do
  296. test -f "$tmpdepfile" && break
  297. done
  298. if test -f "$tmpdepfile"; then
  299. sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
  300. # Add `dependent.h:' lines.
  301. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
  302. else
  303. echo "#dummy" > "$depfile"
  304. fi
  305. rm -f "$tmpdepfile" "$tmpdepfile2"
  306. ;;
  307. tru64)
  308. # The Tru64 compiler uses -MD to generate dependencies as a side
  309. # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
  310. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
  311. # dependencies in `foo.d' instead, so we check for that too.
  312. # Subdirectories are respected.
  313. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
  314. test "x$dir" = "x$object" && dir=
  315. base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
  316. if test "$libtool" = yes; then
  317. # With Tru64 cc, shared objects can also be used to make a
  318. # static library. This mechanism is used in libtool 1.4 series to
  319. # handle both shared and static libraries in a single compilation.
  320. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
  321. #
  322. # With libtool 1.5 this exception was removed, and libtool now
  323. # generates 2 separate objects for the 2 libraries. These two
  324. # compilations output dependencies in $dir.libs/$base.o.d and
  325. # in $dir$base.o.d. We have to check for both files, because
  326. # one of the two compilations can be disabled. We should prefer
  327. # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
  328. # automatically cleaned when .libs/ is deleted, while ignoring
  329. # the former would cause a distcleancheck panic.
  330. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
  331. tmpdepfile2=$dir$base.o.d # libtool 1.5
  332. tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
  333. tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
  334. "$@" -Wc,-MD
  335. else
  336. tmpdepfile1=$dir$base.o.d
  337. tmpdepfile2=$dir$base.d
  338. tmpdepfile3=$dir$base.d
  339. tmpdepfile4=$dir$base.d
  340. "$@" -MD
  341. fi
  342. stat=$?
  343. if test $stat -eq 0; then :
  344. else
  345. rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
  346. exit $stat
  347. fi
  348. for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
  349. do
  350. test -f "$tmpdepfile" && break
  351. done
  352. if test -f "$tmpdepfile"; then
  353. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
  354. # That's a tab and a space in the [].
  355. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
  356. else
  357. echo "#dummy" > "$depfile"
  358. fi
  359. rm -f "$tmpdepfile"
  360. ;;
  361. #nosideeffect)
  362. # This comment above is used by automake to tell side-effect
  363. # dependency tracking mechanisms from slower ones.
  364. dashmstdout)
  365. # Important note: in order to support this mode, a compiler *must*
  366. # always write the preprocessed file to stdout, regardless of -o.
  367. "$@" || exit $?
  368. # Remove the call to Libtool.
  369. if test "$libtool" = yes; then
  370. while test $1 != '--mode=compile'; do
  371. shift
  372. done
  373. shift
  374. fi
  375. # Remove `-o $object'.
  376. IFS=" "
  377. for arg
  378. do
  379. case $arg in
  380. -o)
  381. shift
  382. ;;
  383. $object)
  384. shift
  385. ;;
  386. *)
  387. set fnord "$@" "$arg"
  388. shift # fnord
  389. shift # $arg
  390. ;;
  391. esac
  392. done
  393. test -z "$dashmflag" && dashmflag=-M
  394. # Require at least two characters before searching for `:'
  395. # in the target name. This is to cope with DOS-style filenames:
  396. # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
  397. "$@" $dashmflag |
  398. sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
  399. rm -f "$depfile"
  400. cat < "$tmpdepfile" > "$depfile"
  401. tr ' ' '
  402. ' < "$tmpdepfile" | \
  403. ## Some versions of the HPUX 10.20 sed can't process this invocation
  404. ## correctly. Breaking it into two sed invocations is a workaround.
  405. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  406. rm -f "$tmpdepfile"
  407. ;;
  408. dashXmstdout)
  409. # This case only exists to satisfy depend.m4. It is never actually
  410. # run, as this mode is specially recognized in the preamble.
  411. exit 1
  412. ;;
  413. makedepend)
  414. "$@" || exit $?
  415. # Remove any Libtool call
  416. if test "$libtool" = yes; then
  417. while test $1 != '--mode=compile'; do
  418. shift
  419. done
  420. shift
  421. fi
  422. # X makedepend
  423. shift
  424. cleared=no
  425. for arg in "$@"; do
  426. case $cleared in
  427. no)
  428. set ""; shift
  429. cleared=yes ;;
  430. esac
  431. case "$arg" in
  432. -D*|-I*)
  433. set fnord "$@" "$arg"; shift ;;
  434. # Strip any option that makedepend may not understand. Remove
  435. # the object too, otherwise makedepend will parse it as a source file.
  436. -*|$object)
  437. ;;
  438. *)
  439. set fnord "$@" "$arg"; shift ;;
  440. esac
  441. done
  442. obj_suffix="`echo $object | sed 's/^.*\././'`"
  443. touch "$tmpdepfile"
  444. ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
  445. rm -f "$depfile"
  446. cat < "$tmpdepfile" > "$depfile"
  447. sed '1,2d' "$tmpdepfile" | tr ' ' '
  448. ' | \
  449. ## Some versions of the HPUX 10.20 sed can't process this invocation
  450. ## correctly. Breaking it into two sed invocations is a workaround.
  451. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  452. rm -f "$tmpdepfile" "$tmpdepfile".bak
  453. ;;
  454. cpp)
  455. # Important note: in order to support this mode, a compiler *must*
  456. # always write the preprocessed file to stdout.
  457. "$@" || exit $?
  458. # Remove the call to Libtool.
  459. if test "$libtool" = yes; then
  460. while test $1 != '--mode=compile'; do
  461. shift
  462. done
  463. shift
  464. fi
  465. # Remove `-o $object'.
  466. IFS=" "
  467. for arg
  468. do
  469. case $arg in
  470. -o)
  471. shift
  472. ;;
  473. $object)
  474. shift
  475. ;;
  476. *)
  477. set fnord "$@" "$arg"
  478. shift # fnord
  479. shift # $arg
  480. ;;
  481. esac
  482. done
  483. "$@" -E |
  484. sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
  485. -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
  486. sed '$ s: \\$::' > "$tmpdepfile"
  487. rm -f "$depfile"
  488. echo "$object : \\" > "$depfile"
  489. cat < "$tmpdepfile" >> "$depfile"
  490. sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
  491. rm -f "$tmpdepfile"
  492. ;;
  493. msvisualcpp)
  494. # Important note: in order to support this mode, a compiler *must*
  495. # always write the preprocessed file to stdout, regardless of -o,
  496. # because we must use -o when running libtool.
  497. "$@" || exit $?
  498. IFS=" "
  499. for arg
  500. do
  501. case "$arg" in
  502. "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
  503. set fnord "$@"
  504. shift
  505. shift
  506. ;;
  507. *)
  508. set fnord "$@" "$arg"
  509. shift
  510. shift
  511. ;;
  512. esac
  513. done
  514. "$@" -E |
  515. sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
  516. rm -f "$depfile"
  517. echo "$object : \\" > "$depfile"
  518. . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
  519. echo " " >> "$depfile"
  520. . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
  521. rm -f "$tmpdepfile"
  522. ;;
  523. none)
  524. exec "$@"
  525. ;;
  526. *)
  527. echo "Unknown depmode $depmode" 1>&2
  528. exit 1
  529. ;;
  530. esac
  531. exit 0
  532. # Local Variables:
  533. # mode: shell-script
  534. # sh-indentation: 2
  535. # eval: (add-hook 'write-file-hooks 'time-stamp)
  536. # time-stamp-start: "scriptversion="
  537. # time-stamp-format: "%:y-%02m-%02d.%02H"
  538. # time-stamp-end: "$"
  539. # End: