bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dry run differs from actual run


From: Sam Fok
Subject: dry run differs from actual run
Date: Wed, 31 Aug 2016 14:12:32 -0700

Hi,

I often use the dry-run option to debug makefiles. However, I've attached a makefile where make does not execute all of the commands "make -n" said it would. Below is a sequence of commands to be run with the attached makefile. The inline comments describe my expectations . I've pasted a sample output run of these commands here

I am using 
GNU Make 3.81
built for
x86_64-pc-linux-gnu

Thanks,
Sam

####################################################
# start by building everything
make
# check that build is clean
make
# yes build is clean
# what files were created?
ls
# let's update foo.in
touch foo.in
# what does make say it will do?
make -n
# okay, let's run make
make
# why didn't make do what "make -n" said it would do? try again?
make
# nope. what does make say it will do?
make -n
####################################################



####################################################
# let's clean up the list files
make clean_lists
# what does make say it will do? (now with debugging output)
make -r -d -n
# see the line that says "Must remake target `list'."
# okay, let's run make with debugging output
make -r -d
# 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
# 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
# now what does make say?
make
# see that build would be clean if make did what it said it would do during dry-run
####################################################

Attachment: Makefile
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]