Page MenuHomeDevCentral

Makefile
No OneTemporary

Makefile

COMMANDS=phan phpcs phpcbf phpunit psysh phpmd phpstan psalm
PREFIX=/usr/local
SED=sed
INSTALL_SCRIPT=install -m0755
# Expand commands into specific targets
# GNU Makefile compatible only
BIN_COMMANDS:=$(COMMANDS:%=$(PREFIX)/bin/%)
WRAP_COMMANDS:=$(COMMANDS:%=build/%)
# Main targets
all: wrappers
install: $(PREFIX)/bin/run-php-script ${BIN_COMMANDS}
# Build targets
wrappers: build $(WRAP_COMMANDS)
build:
mkdir -p build
$(WRAP_COMMANDS):
${SED} s/%%COMMAND%%/${@:build/%=%}/g src/command.template > $@
# Install targets
$(PREFIX)/bin/run-php-script:
${INSTALL_SCRIPT} bin/run-php-script.sh $(PREFIX)/bin/run-php-script
$(BIN_COMMANDS):
${INSTALL_SCRIPT} ${@:$(PREFIX)/bin/%=build/%} $@
# Clean targets
clean:
rm -rf build/

File Metadata

Mime Type
text/x-makefile
Expires
Sun, Oct 12, 04:58 (1 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3064966
Default Alt Text
Makefile (746 B)

Event Timeline