Skip to content

Commit

Permalink
Makefile: list sources via find conditionally
Browse files Browse the repository at this point in the history
Taken directly from podman's repository. The current list of sources
doesn't list vendor sources and therefore if you need to make changes to
vendor for testing a backport or anything else, it's required to
modify the Makefile before attempting to do so. Since we don't list
the sources manually anymore, don't do makefile source validation check.

Signed-off-by: Danish Prakash <[email protected]>
  • Loading branch information
danishprakash committed Nov 5, 2024
1 parent 3c43322 commit 40612f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ LIBSECCOMP_COMMIT := release-2.3

EXTRA_LDFLAGS ?=
BUILDAH_LDFLAGS := $(GO_LDFLAGS) '-X main.GitCommit=$(GIT_COMMIT) -X main.buildInfo=$(SOURCE_DATE_EPOCH) -X main.cniVersion=$(CNI_COMMIT) $(EXTRA_LDFLAGS)'
SOURCES=*.go imagebuildah/*.go bind/*.go chroot/*.go copier/*.go define/*.go docker/*.go internal/config/*.go internal/mkcw/*.go internal/mkcw/types/*.go internal/parse/*.go internal/sbom/*.go internal/source/*.go internal/tmpdir/*.go internal/*.go internal/util/*.go internal/volumes/*.go manifests/*.go pkg/binfmt/*.go pkg/blobcache/*.go pkg/chrootuser/*.go pkg/cli/*.go pkg/completion/*.go pkg/formats/*.go pkg/jail/*.go pkg/overlay/*.go pkg/parse/*.go pkg/rusage/*.go pkg/sshagent/*.go pkg/umask/*.go pkg/util/*.go pkg/volumes/*.go util/*.go

# This isn't what we actually build; it's a superset, used for target
# dependencies. Basically: all *.go and *.c files, except *_test.go,
# and except anything in a dot subdirectory. If any of these files is
# newer than our target (bin/buildah), a rebuild is triggered.
SOURCES=$(shell find . -path './.*' -prune -o \( \( -name '*.go' -o -name '*.c' \) -a ! -name '*_test.go' \) -print)

LINTFLAGS ?=

Expand Down Expand Up @@ -136,7 +141,6 @@ validate: install.tools
./tests/validate/whitespace.sh
./hack/xref-helpmsgs-manpages
./tests/validate/pr-should-include-tests
./hack/makefile_sources

.PHONY: install.tools
install.tools:
Expand Down
20 changes: 0 additions & 20 deletions hack/makefile_sources

This file was deleted.

0 comments on commit 40612f1

Please sign in to comment.