Skip to content

Commit

Permalink
Merge pull request #13 from jfv-opensource/rework_makefile
Browse files Browse the repository at this point in the history
rework Makefile logic
  • Loading branch information
jfv-opensource authored Sep 21, 2023
2 parents e012468 + 8167308 commit 9bce79a
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
default: build

clean:
rm -Rf build

common-build:
common-build: common-clean
mkdir -p build
-./inline.sh --in-file km --out-file build/km
-./inline.sh --in-file kc --out-file build/kc
-./inline.sh --in-file kw --out-file build/kw
-./inline.sh --in-file klb --out-file build/klb
chmod 755 build/*

debian: debian-clean common-build
common-clean:
-rm build/*
-rmdir build

build: common-build
mkdir -p usr/bin
cp -f build/* usr/bin/
help2man --no-info usr/bin/kc -n 'Kubernetes controller tool' > debian/kc.1
help2man --no-info usr/bin/km -n 'Kubernetes master' > debian/km.1
help2man --no-info usr/bin/kw -n 'Kubernetes worker' > debian/kw.1
help2man --no-info usr/bin/klb -n 'Kubernetes load-balancer' > debian/klb.1

clean: common-clean
-rm -f debian/*.1
-rm -f usr/bin/*
-rmdir usr/bin usr

.PHONY: debian build
debian:
debuild -us -uc

debian-clean:
Expand All @@ -27,4 +37,4 @@ docker: common-build
cp -f build/kc build/kc.sh
cp -f build/kw build/kw.sh
cp -f build/klb build/klb.sh
docker build -t kubetools .
docker build -t kubetools .

0 comments on commit 9bce79a

Please sign in to comment.