launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29808
[Merge] ~cjwatson/launchpad:charm-tidy-makefile into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:charm-tidy-makefile into launchpad:master.
Commit message:
charm: Remove cruft from Makefile
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/439638
We mostly rely on charm recipes now, but this Makefile is still sometimes handy for local development. However, it has some cruft from before we open-sourced `ols-layers`, which we can now remove.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-tidy-makefile into launchpad:master.
diff --git a/charm/Makefile b/charm/Makefile
index 1b97cdd..800f2de 100644
--- a/charm/Makefile
+++ b/charm/Makefile
@@ -4,7 +4,6 @@ export PATH := $(PATH):/snap/bin
APP_NAME := launchpad
BUILDDIR := $(CURDIR)/dist
-TMPDIR := $(CURDIR)/tmp
CHARM_SERIES ?= 20.04
ARCH := $(shell dpkg --print-architecture)
@@ -25,7 +24,7 @@ help: ## display this help message
@echo "Please use \`make <target>' where <target> is one of"
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | sort | awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
-$(BUILDDIR) $(TMPDIR):
+$(BUILDDIR):
@mkdir -p $@
build: ## build all the charms
@@ -39,19 +38,15 @@ build-launchpad-appserver: dist/$(call charm_file,launchpad-appserver)
dist/%_ubuntu-$(CHARM_SERIES)-$(ARCH).charm: $(BUILDDIR)
echo "Building $*..."
- rm -rf $*/tmp
- cp -a tmp $*/tmp
- cp -a layer/launchpad-base $*/tmp/deps/ols-layers/layer/
cd $* && charmcraft pack
cp -a $*/$(call charm_file,$*) dist/
- rm -rf $*/tmp
clean: ## clean the build environment
clean: $(foreach charm,$(CHARMS),clean-$(charm))
@find . -name \*.pyc -delete
@find . -depth -name '__pycache__' -exec rm -rf '{}' \;
@rm -f bundle.yaml
- @rm -rf $(BUILDDIR) $(TMPDIR)
+ @rm -rf $(BUILDDIR)
clean-%:
@echo "Cleaning $*..."