A directory contains a regular file named clean. A developer uses GNU make with the Makefile below. Which statements correctly describe the rule's behaviour? Select every correct statement. Assume the removal command succeeds.
.PHONY: clean clean: rm -f viewer viewer.o
Running make clean executes the removal command despite the file named clean.
Removing the declaration preserves the same behaviour because the rule has no prerequisites.
The declaration makes the removal command delete the regular file named clean.
Keeping the declaration avoids a timestamp comparison against the regular file named clean.
Unlock full course notes by signing up
Compare independent timestamp cases
For each independent case, decide whether make tile.o executes the recipe shown below. All listed inputs exist, have no rules of their own, and remain unchanged. Timestamps are integer seconds from a shared reference time. Enter Run or Skip in each table cell; missing means the target file does not exist.
Match variable assignment behavior
A variable assignment records text for use by GNU make. While reviewing a project's Makefile, match each operator to its behavior, including when expansion occurs. Assume ordinary assignments with no command-line variable definitions or override directives.
Calculate selective rebuild time
A developer runs make console after editing only api.h. Before the edit, every output was current. The edited header now has a strictly newer timestamp than every output. The rules and recipe durations are below. Recipes execute serially, succeed, and update their targets. Ignore make's overhead and assume no other changes.
Find the incremental build time and the time saved compared with rebuilding all four objects and the executable from scratch. Give both answers in seconds, as exact integers.
Trace a build after a recipe fails
A project uses the complete GNU Makefile below. Every recipe line begins with a tab, and each recipe contains exactly one command.
All five output files are initially absent. Every script exists and is executable. The command ./compile-fault returns a nonzero exit status and creates no output. Every other command, if executed, succeeds and creates its named target. There are no additional rules, inherited make options, or instructions to ignore errors.
Consider two independent runs, each starting from this same initial state. Both use -j1, so recipes execute serially and prerequisites are considered in their listed order. Complete the table with exact integer counts. Count a recipe as attempted when its command starts, including a command that fails. Do not count the recipe-free target all as a recipe.