Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ ####################################################
- $ # start by building everything
- $ make
- touch foo.in
- echo "foo1.out foo2.out" >> list.ref
- mv list.ref list
- echo "list contains: `cat list`"
- list contains: foo1.out foo2.out
- touch `cat list`
- date > tgt
- rm list
- $ # check that build is clean
- $ make
- make: Nothing to be done for `all'.
- $ # yes build is clean
- $ # what files were created?
- $ ls
- foo1.out foo2.out foo.in Makefile tgt
- $ # let's update foo.in
- $ touch foo.in
- $ # what does make say it will do?
- $ make -n
- echo "foo1.out foo2.out" >> list.ref
- mv list.ref list
- echo "list contains: `cat list`"
- touch `cat list`
- date > tgt
- rm list
- $ # okay, let's run make
- $ make
- echo "foo1.out foo2.out" >> list.ref
- $ # why didn't make do what "make -n" said it would do? try again?
- $ make
- echo "foo1.out foo2.out" >> list.ref
- $ # nope. what does make say it will do?
- $ make -n
- echo "foo1.out foo2.out" >> list.ref
- mv list.ref list
- echo "list contains: `cat list`"
- touch `cat list`
- date > tgt
- rm list
- $ ####################################################
- $
- $
- $
- $ ####################################################
- $ # let's clean up the list files
- $ make clean_lists
- rm -f list list.ref
- $ # what does make say it will do? (now with debugging output)
- $ make -r -d -n
- GNU Make 3.81
- Copyright (C) 2006 Free Software Foundation, Inc.
- This is free software; see the source for copying conditions.
- There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
- PARTICULAR PURPOSE.
- This program built for x86_64-pc-linux-gnu
- Reading makefiles...
- Reading makefile `Makefile'...
- Updating makefiles....
- Considering target file `Makefile'.
- Looking for an implicit rule for `Makefile'.
- No implicit rule found for `Makefile'.
- Finished prerequisites of target file `Makefile'.
- No need to remake target `Makefile'.
- Updating goal targets....
- Considering target file `all'.
- File `all' does not exist.
- Considering target file `tgt'.
- Considering target file `foo1.out'.
- Looking for an implicit rule for `foo1.out'.
- Trying pattern rule with stem `.'.
- Trying implicit prerequisite `foo.in'.
- Found an implicit rule for `foo1.out'.
- Considering target file `foo.in'.
- Finished prerequisites of target file `foo.in'.
- No need to remake target `foo.in'.
- Finished prerequisites of target file `foo1.out'.
- Prerequisite `foo.in' is newer than target `foo1.out'.
- Must remake target `foo1.out'.
- echo "foo1.out foo2.out" >> list.ref
- Successfully remade target file `foo1.out'.
- Considering target file `foo2.out'.
- File `foo2.out' was considered already.
- Considering target file `list'.
- File `list' does not exist.
- Pruning file `foo1.out'.
- Pruning file `foo2.out'.
- Finished prerequisites of target file `list'.
- Must remake target `list'.
- mv list.ref list
- echo "list contains: `cat list`"
- Successfully remade target file `list'.
- Finished prerequisites of target file `tgt'.
- Prerequisite `list' is newer than target `tgt'.
- Must remake target `tgt'.
- touch `cat list`
- date > tgt
- Successfully remade target file `tgt'.
- Finished prerequisites of target file `all'.
- Must remake target `all'.
- Successfully remade target file `all'.
- Removing intermediate files...
- rm list
- $ # see the line that says "Must remake target `list'."
- $ # okay, let's run make with debugging output
- $ make -r -d
- GNU Make 3.81
- Copyright (C) 2006 Free Software Foundation, Inc.
- This is free software; see the source for copying conditions.
- There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
- PARTICULAR PURPOSE.
- This program built for x86_64-pc-linux-gnu
- Reading makefiles...
- Reading makefile `Makefile'...
- Updating makefiles....
- Considering target file `Makefile'.
- Looking for an implicit rule for `Makefile'.
- No implicit rule found for `Makefile'.
- Finished prerequisites of target file `Makefile'.
- No need to remake target `Makefile'.
- Updating goal targets....
- Considering target file `all'.
- File `all' does not exist.
- Considering target file `tgt'.
- Considering target file `foo1.out'.
- Looking for an implicit rule for `foo1.out'.
- Trying pattern rule with stem `.'.
- Trying implicit prerequisite `foo.in'.
- Found an implicit rule for `foo1.out'.
- Considering target file `foo.in'.
- Finished prerequisites of target file `foo.in'.
- No need to remake target `foo.in'.
- Finished prerequisites of target file `foo1.out'.
- Prerequisite `foo.in' is newer than target `foo1.out'.
- Must remake target `foo1.out'.
- echo "foo1.out foo2.out" >> list.ref
- Putting child 0x0131ce60 (foo1.out) PID 25280 on the chain.
- Live child 0x0131ce60 (foo1.out) PID 25280
- Reaping winning child 0x0131ce60 PID 25280
- Removing child 0x0131ce60 PID 25280 from chain.
- Successfully remade target file `foo1.out'.
- Considering target file `foo2.out'.
- File `foo2.out' was considered already.
- Finished prerequisites of target file `tgt'.
- Prerequisite `list' of target `tgt' does not exist.
- No need to remake target `tgt'.
- Finished prerequisites of target file `all'.
- Must remake target `all'.
- Successfully remade target file `all'.
- $ # see that there is no line mentioning remaking target `list'
- $ # again make differs between dry and actual runs
- $ ####################################################
- $
- $
- $
- $
- $ ####################################################
- $ # let's clean up the list files
- $ make clean_lists
- rm -f list list.ref
- $ # let's store the commands make says it would run during the dry run
- $ make -n > scratch.sh
- $ # let's run those commands
- $ sh scratch.sh
- list contains: foo1.out foo2.out
- $ # now what does make say?
- $ make
- make: Nothing to be done for `all'.
- $ # see that build would be clean if make did what it said it would do during dry-run
- $ ####################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement