Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12241212
Makefile
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
746 B
Referenced Files
None
Subscribers
None
Makefile
View Options
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
Details
Attached
Mime Type
text/x-makefile
Expires
Sun, Oct 12, 04:58 (1 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3064966
Default Alt Text
Makefile (746 B)
Attached To
Mode
rPHPWRAP run-php-script wrappers
Attached
Detach File
Event Timeline
Log In to Comment