]> git.joonet.de Git - adminer.git/commitdiff
Add basic Makefile.
authorEvgeny Chernyavskiy <evgeny.chernyavskiy@gmail.com>
Fri, 3 Apr 2020 19:56:11 +0000 (15:56 -0400)
committerJakub Vrána <jakub@vrana.cz>
Sat, 6 Feb 2021 09:45:48 +0000 (10:45 +0100)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..8c5dcfb
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,39 @@
+ROOT_DIRECTORY = $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))")
+PHP := $(shell which php)
+PORT := 8000
+
+
+.DEFAULT_GOAL := default
+
+
+.PHONY: default
+default: compile
+
+.PHONY: compile
+compile:
+       $(PHP) $(ROOT_DIRECTORY)/compile.php
+
+.PHONY: server
+server:
+       php \
+         --server 127.0.0.1:$(PORT) \
+         --docroot $(ROOT_DIRECTORY)
+
+.PHONY: initialize
+initialize:
+       git \
+         -C $(ROOT_DIRECTORY) \
+         submodule \
+         update \
+         --init \
+         --recursive
+
+.PHONY: clean
+clean:
+       rm \
+         --recursive \
+         --force \
+         $(ROOT_DIRECTORY)/adminer.php
+
+.PHONY: clean.all
+clean.all: clean