Skip to content

Commit

Permalink
build-sys: Remove dead code in Makefile, fix HACKING.md typo
Browse files Browse the repository at this point in the history
There's only one image now, so remove the `Makefile` bits
around multiple images.  Doing this since I typed `make images`
which failed, when I meant `make image`.
  • Loading branch information
cgwalters committed Oct 27, 2019
1 parent 018160b commit 4070823
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
32 changes: 1 addition & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ _build-%:
image:
hack/build-image

# Build + push + deploy image for a component. Intended to be called via another target.
# Example:
# make _deploy-machine-config-daemon
_deploy-%:
WHAT=$* hack/cluster-push.sh

# Run tests
test: test-unit test-e2e

Expand Down Expand Up @@ -95,21 +89,7 @@ endef
$(foreach C, $(EXTRA_COMPONENTS), $(eval $(call target_template,$(C))))
$(foreach C, $(MCO_COMPONENTS), $(eval $(call target_template,$(patsubst %,machine-config-%,$(C)))))

# Template for image builds.
define image_template =
.PHONY: image-$(1) image-machine-config-$(1) deploy-$(1) deploy-machine-config-$(1)
image-machine-config-$(1): _image-machine-config-$(1) _build-machine-config-$(1)
image-$(1): image-machine-config-$(1)
deploy-machine-config-$(1): _deploy-machine-config-$(1)
deploy-$(1): _deploy-machine-config-$(1)

imc += image-$(1)
endef

# Generate 'image_template' for each component
$(foreach C, $(MCO_COMPONENTS), $(eval $(call image_template,$(C))))

.PHONY: binaries install images images.rhel7
.PHONY: binaries install

# Build all binaries:
# Example:
Expand All @@ -121,16 +101,6 @@ install: binaries
install -D -m 0755 _output/linux/$(GOARCH)/$${component} $(DESTDIR)$(PREFIX)/bin/$${component}; \
done

# Build all images:
# Example:
# make images
images: $(imc)

# Build all images for rhel7
# Example:
# make images.rhel7
images.rhel7: $(imc7)

Dockerfile.rhel7: Dockerfile Makefile
(echo '# THIS FILE IS GENERATED FROM '$<' DO NOT EDIT' && \
sed -e s,org/openshift/release,org/ocp/builder, -e s,/openshift/origin-v4.0:base,/ocp/4.0:base, < $<) > $@.tmp && mv $@.tmp $@
Expand Down
2 changes: 1 addition & 1 deletion docs/HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ generated in `make image` to the container registry of your choice. For example,
in via the command-line:

```
REPO={docker.io/username} /hack/push-image.sh
REPO={docker.io/username} ./hack/push-image.sh
```

Quay.io or any other public registry isn't strictly required - you can use a local
Expand Down

0 comments on commit 4070823

Please sign in to comment.