Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Makefile: Move the .git-commit: rule block to below the all: rule
Browse files Browse the repository at this point in the history
the first rule defined becomes the default and the default rule should be all.

Signed-off-by: Julio Montes <[email protected]>
  • Loading branch information
Julio Montes committed Nov 29, 2019
1 parent 7bcce3d commit 9dd3f13
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,6 @@ SHIMV2_DIR = $(CLI_DIR)/$(SHIMV2)
SOURCES := $(shell find . 2>&1 | grep -E '.*\.(c|h|go)$$')
VERSION := ${shell cat ./VERSION}

# Targets that depend on .git-commit can use $(shell cat .git-commit) to get a
# git revision string. They will only be rebuilt if the revision string
# actually changes.
.PHONY: .git-commit.tmp
.git-commit: .git-commit.tmp
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
.git-commit.tmp:
@echo -n "$$(git rev-parse HEAD 2>/dev/null)" >$@
@test -n "$$(git status --porcelain --untracked-files=no)" && echo -n "-dirty" >>$@ || true

# List of configuration files to build and install
CONFIGS =
CONFIG_PATHS =
Expand Down Expand Up @@ -483,6 +473,16 @@ endef

all: runtime containerd-shim-v2 netmon

# Targets that depend on .git-commit can use $(shell cat .git-commit) to get a
# git revision string. They will only be rebuilt if the revision string
# actually changes.
.PHONY: .git-commit.tmp
.git-commit: .git-commit.tmp
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
.git-commit.tmp:
@echo -n "$$(git rev-parse HEAD 2>/dev/null)" >$@
@test -n "$$(git status --porcelain --untracked-files=no)" && echo -n "-dirty" >>$@ || true

containerd-shim-v2: $(SHIMV2_OUTPUT)

netmon: $(NETMON_TARGET_OUTPUT)
Expand Down

0 comments on commit 9dd3f13

Please sign in to comment.