diff options
-rw-r--r-- | Makefile | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -7,8 +7,16 @@ # For a command not to echo itself, prefix @ to the command # https://unix.stackexchange.com/a/740226/459013 -SH = alarm backlight bell ccgp cfg chmodef curlqb dateft dirnameall gita gitfork gitmetap gitmetar gitpu grrc il lastarg loop lsp mll mmi mpra mpva mpvy mvln mvtr mvtu news o orgext pa pq px qg qw rate reco rfp sbar ta time-uuid topa upd vinfo wh wtr xmq prp vip vpn dnd cgm ggm ccp u -PACMAN_HOOKS = setcap-intel_gpu_top.hook setcap-iotop-c.hook setcap-nethogs.hook +# SH = $(wildcard sh/*) will print filenames with sh/ dir (more about wildcard see `info make` ) +# - more make commands maybe able to substitute it to only basename, maybe see https://stackoverflow.com/a/14447924 +# I use `find sh -type f -printf '%f '` which only prints basename +# - note: "SH = $$(...)" seems replace ${SH} with $(...), so everytime I use ${SH}, shell command in $(...) is run once, which is not ideal +# - so I use "SH = $(shell ...)" to only run it once when assign variable +# alternative: `find sh -type f -execdir basename -a '{}' \+` +# busybox find does not support -printf and -execdir, so here's another alternative: `find sh -type f -exec basename -a '{}' \+` +# about $$: https://stackoverflow.com/q/28533059 +SH = $(shell find sh -type f -printf '%f ') +PACMAN_HOOKS = $(shell find pacman_hooks -type f -printf '%f ') PREFIX = /usr/local install: |