Improved makefile

This commit is contained in:
Eduard Urbach 2017-06-16 15:42:22 +02:00
parent 880222a65d
commit 6e3e818552
3 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
MYDIR="$(dirname "$(realpath "$0")")" MYDIR="$(dirname "$(realpath "$0")")"
cd "$MYDIR" cd "$MYDIR"
for dir in ./*; do ([ -d "$dir" ] && cd "$dir" && echo "Building $dir" && go build); done for dir in ./*; do ([ -d "$dir" ] && cd "$dir" && echo "Building jobs/$dir" && go build); done

View File

@ -28,10 +28,10 @@ assets:
depslist: depslist:
$(GOCMD) list -f {{.Deps}} | sed -e 's/\[//g' -e 's/\]//g' | tr " " "\n" $(GOCMD) list -f {{.Deps}} | sed -e 's/\[//g' -e 's/\]//g' | tr " " "\n"
clean: clean:
find . -type f | xargs file | grep "ELF.*executable" | awk -F: '{print $1}' | rm find . -type f | xargs file | grep "ELF.*executable" | awk -F: '{print $1}' | xargs rm
ports: ports:
$(IPTABLES) -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 4000 $(IPTABLES) -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 4000
$(IPTABLES) -t nat -A OUTPUT -o lo -p tcp --dport 443 -j REDIRECT --to-port 4001 $(IPTABLES) -t nat -A OUTPUT -o lo -p tcp --dport 443 -j REDIRECT --to-port 4001
all: assets server jobs patches ports all: assets server jobs patches ports
.PHONY: jobs .PHONY: jobs patches

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
MYDIR="$(dirname "$(realpath "$0")")" MYDIR="$(dirname "$(realpath "$0")")"
cd "$MYDIR" cd "$MYDIR"
for dir in ./*; do ([ -d "$dir" ] && cd "$dir" && echo "Building $dir" && go build); done for dir in ./*; do ([ -d "$dir" ] && cd "$dir" && echo "Building patches/$dir" && go build); done