.in scripts are somewhat better handled.
- Also, this build.zsh itself builds itself more nicely, with nice building messages and stuff. - It also fixes the problem of on-system scripts that were… well… kind of ignored. Yeah, I’m not working very seriously on this…master
parent
41b495b0e8
commit
3d91eac15d
8
Makefile
8
Makefile
|
@ -17,7 +17,11 @@ Q := @
|
|||
|
||||
all: build.zsh build/binary.zsh build/library.zsh build/ofile.zsh build/script.zsh build/sharedlib.zsh build/staticlib.zsh
|
||||
|
||||
build.zsh:
|
||||
build.zsh: build.zsh.in
|
||||
@echo '[01;32m [SED] [01;37mbuild.zsh[00m'
|
||||
$(Q)sed -e 's&@LIBDIR@&$(LIBDIR)&;s&@BINDIR@&$(BINDIR)&;s&@SHAREDIR@&$(SHAREDIR)&;' 'build.zsh.in' > 'build.zsh'
|
||||
$(Q)chmod +x 'build.zsh'
|
||||
|
||||
|
||||
build.zsh.install: build.zsh
|
||||
@echo '[01;31m [IN] [01;37m$(BINDIR)/build.zsh[00m'
|
||||
|
@ -25,6 +29,8 @@ build.zsh.install: build.zsh
|
|||
$(Q)install -m0755 build.zsh $(DESTDIR)$(BINDIR)/build.zsh
|
||||
|
||||
build.zsh.clean:
|
||||
@echo '[01;37m [RM] [01;37mbuild.zsh[00m'
|
||||
$(Q)rm -f build.zsh
|
||||
|
||||
build.zsh.uninstall:
|
||||
@echo '[01;37m [RM] [01;37m$(BINDIR)/build.zsh[00m'
|
||||
|
|
|
@ -53,6 +53,10 @@ function RM {
|
|||
echo "${fg_bold[white]} [RM] ${fg_bold[white]}$@${reset_color}"
|
||||
}
|
||||
|
||||
function SED {
|
||||
echo "${fg_bold[green]} [SED] ${fg_bold[white]}$@${reset_color}"
|
||||
}
|
||||
|
||||
function DIR {
|
||||
echo "${fg_bold[magenta]} [DIR] ${fg_bold[white]}$@${reset_color}"
|
||||
}
|
||||
|
@ -166,7 +170,7 @@ function duplicated {
|
|||
return 1
|
||||
}
|
||||
|
||||
for dir in "@SHAREDIR@/build.zsh" build; do
|
||||
for dir in "@SHAREDIR@/build.zsh" ./build; do
|
||||
[[ -d "$dir" ]] && {
|
||||
for i in "$dir"/*.zsh; do
|
||||
. "$i"
|
|
@ -4,8 +4,13 @@ function script.build {
|
|||
|
||||
if [[ -e "${target}.in" ]]; then
|
||||
write " ${target}.in"
|
||||
write "\tcat ${target}.in > ${target}"
|
||||
write "\tchmod +x ${target}"
|
||||
write "\t@echo '$(SED "${target}")'"
|
||||
write -n "\t${Q}sed -e '"
|
||||
write -n "s&@LIBDIR@&\$(LIBDIR)&;"
|
||||
write -n "s&@BINDIR@&\$(BINDIR)&;"
|
||||
write -n "s&@SHAREDIR@&\$(SHAREDIR)&;"
|
||||
write "' '${target}.in' > '${target}'"
|
||||
write "\t${Q}chmod +x '${target}'"
|
||||
fi
|
||||
|
||||
write "\n"
|
||||
|
|
Loading…
Reference in New Issue