Advertisement
Guest User

make_n_bug_report

a guest
Aug 31st, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.91 KB | None | 0 0
  1. $ ####################################################
  2. $ # start by building everything
  3. $ make
  4. touch foo.in
  5. echo "foo1.out foo2.out" >> list.ref
  6. mv list.ref list
  7. echo "list contains: `cat list`"
  8. list contains: foo1.out foo2.out
  9. touch `cat list`
  10. date > tgt
  11. rm list
  12. $ # check that build is clean
  13. $ make
  14. make: Nothing to be done for `all'.
  15. $ # yes build is clean
  16. $ # what files were created?
  17. $ ls
  18. foo1.out foo2.out foo.in Makefile tgt
  19. $ # let's update foo.in
  20. $ touch foo.in
  21. $ # what does make say it will do?
  22. $ make -n
  23. echo "foo1.out foo2.out" >> list.ref
  24. mv list.ref list
  25. echo "list contains: `cat list`"
  26. touch `cat list`
  27. date > tgt
  28. rm list
  29. $ # okay, let's run make
  30. $ make
  31. echo "foo1.out foo2.out" >> list.ref
  32. $ # why didn't make do what "make -n" said it would do? try again?
  33. $ make
  34. echo "foo1.out foo2.out" >> list.ref
  35. $ # nope. what does make say it will do?
  36. $ make -n
  37. echo "foo1.out foo2.out" >> list.ref
  38. mv list.ref list
  39. echo "list contains: `cat list`"
  40. touch `cat list`
  41. date > tgt
  42. rm list
  43. $ ####################################################
  44. $
  45. $
  46. $
  47. $ ####################################################
  48. $ # let's clean up the list files
  49. $ make clean_lists
  50. rm -f list list.ref
  51. $ # what does make say it will do? (now with debugging output)
  52. $ make -r -d -n
  53. GNU Make 3.81
  54. Copyright (C) 2006 Free Software Foundation, Inc.
  55. This is free software; see the source for copying conditions.
  56. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
  57. PARTICULAR PURPOSE.
  58.  
  59. This program built for x86_64-pc-linux-gnu
  60. Reading makefiles...
  61. Reading makefile `Makefile'...
  62. Updating makefiles....
  63. Considering target file `Makefile'.
  64. Looking for an implicit rule for `Makefile'.
  65. No implicit rule found for `Makefile'.
  66. Finished prerequisites of target file `Makefile'.
  67. No need to remake target `Makefile'.
  68. Updating goal targets....
  69. Considering target file `all'.
  70. File `all' does not exist.
  71. Considering target file `tgt'.
  72. Considering target file `foo1.out'.
  73. Looking for an implicit rule for `foo1.out'.
  74. Trying pattern rule with stem `.'.
  75. Trying implicit prerequisite `foo.in'.
  76. Found an implicit rule for `foo1.out'.
  77. Considering target file `foo.in'.
  78. Finished prerequisites of target file `foo.in'.
  79. No need to remake target `foo.in'.
  80. Finished prerequisites of target file `foo1.out'.
  81. Prerequisite `foo.in' is newer than target `foo1.out'.
  82. Must remake target `foo1.out'.
  83. echo "foo1.out foo2.out" >> list.ref
  84. Successfully remade target file `foo1.out'.
  85. Considering target file `foo2.out'.
  86. File `foo2.out' was considered already.
  87. Considering target file `list'.
  88. File `list' does not exist.
  89. Pruning file `foo1.out'.
  90. Pruning file `foo2.out'.
  91. Finished prerequisites of target file `list'.
  92. Must remake target `list'.
  93. mv list.ref list
  94. echo "list contains: `cat list`"
  95. Successfully remade target file `list'.
  96. Finished prerequisites of target file `tgt'.
  97. Prerequisite `list' is newer than target `tgt'.
  98. Must remake target `tgt'.
  99. touch `cat list`
  100. date > tgt
  101. Successfully remade target file `tgt'.
  102. Finished prerequisites of target file `all'.
  103. Must remake target `all'.
  104. Successfully remade target file `all'.
  105. Removing intermediate files...
  106. rm list
  107. $ # see the line that says "Must remake target `list'."
  108. $ # okay, let's run make with debugging output
  109. $ make -r -d
  110. GNU Make 3.81
  111. Copyright (C) 2006 Free Software Foundation, Inc.
  112. This is free software; see the source for copying conditions.
  113. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
  114. PARTICULAR PURPOSE.
  115.  
  116. This program built for x86_64-pc-linux-gnu
  117. Reading makefiles...
  118. Reading makefile `Makefile'...
  119. Updating makefiles....
  120. Considering target file `Makefile'.
  121. Looking for an implicit rule for `Makefile'.
  122. No implicit rule found for `Makefile'.
  123. Finished prerequisites of target file `Makefile'.
  124. No need to remake target `Makefile'.
  125. Updating goal targets....
  126. Considering target file `all'.
  127. File `all' does not exist.
  128. Considering target file `tgt'.
  129. Considering target file `foo1.out'.
  130. Looking for an implicit rule for `foo1.out'.
  131. Trying pattern rule with stem `.'.
  132. Trying implicit prerequisite `foo.in'.
  133. Found an implicit rule for `foo1.out'.
  134. Considering target file `foo.in'.
  135. Finished prerequisites of target file `foo.in'.
  136. No need to remake target `foo.in'.
  137. Finished prerequisites of target file `foo1.out'.
  138. Prerequisite `foo.in' is newer than target `foo1.out'.
  139. Must remake target `foo1.out'.
  140. echo "foo1.out foo2.out" >> list.ref
  141. Putting child 0x0131ce60 (foo1.out) PID 25280 on the chain.
  142. Live child 0x0131ce60 (foo1.out) PID 25280
  143. Reaping winning child 0x0131ce60 PID 25280
  144. Removing child 0x0131ce60 PID 25280 from chain.
  145. Successfully remade target file `foo1.out'.
  146. Considering target file `foo2.out'.
  147. File `foo2.out' was considered already.
  148. Finished prerequisites of target file `tgt'.
  149. Prerequisite `list' of target `tgt' does not exist.
  150. No need to remake target `tgt'.
  151. Finished prerequisites of target file `all'.
  152. Must remake target `all'.
  153. Successfully remade target file `all'.
  154. $ # see that there is no line mentioning remaking target `list'
  155. $ # again make differs between dry and actual runs
  156. $ ####################################################
  157. $
  158. $
  159. $
  160. $
  161. $ ####################################################
  162. $ # let's clean up the list files
  163. $ make clean_lists
  164. rm -f list list.ref
  165. $ # let's store the commands make says it would run during the dry run
  166. $ make -n > scratch.sh
  167. $ # let's run those commands
  168. $ sh scratch.sh
  169. list contains: foo1.out foo2.out
  170. $ # now what does make say?
  171. $ make
  172. make: Nothing to be done for `all'.
  173. $ # see that build would be clean if make did what it said it would do during dry-run
  174. $ ####################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement