diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 57 |
1 files changed, 33 insertions, 24 deletions
@@ -1,8 +1,11 @@ PREFIX="/usr" INSTALLDIR="$(DESTDIR)$(PREFIX)" +SED_PREFIX=$$(sed -e 's/\//\\\//g' <<<$(PREFIX)) +all: core truncater manpages infomanual ponythinkcompletion -all: truncater manpages infomanual ponythinkcompletion +core: + sed -e 's/'\''\/usr\//'\'"$(SED_PREFIX)"'\//g' <"ponysay.py" >"ponysay.py.install" truncater: $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o "truncater" "truncater.c" @@ -16,16 +19,16 @@ infomanual: gzip -9 -f "ponysay.info" ponysaycompletion: - sed -e 's/\/usr\//'"$$(sed -e 's/\//\\\//g' <<<$(PREFIX))"'\//g' <"completion/bash-completion.sh" >"completion/bash-completion.sh.install" - sed -e 's/\/usr\//'"$$(sed -e 's/\//\\\//g' <<<$(PREFIX))"'\//g' <"completion/fish-completion.fish" >"completion/fish-completion.fish.install" - sed -e 's/\/usr\//'"$$(sed -e 's/\//\\\//g' <<<$(PREFIX))"'\//g' <"completion/zsh-completion.zsh" >"completion/zsh-completion.zsh.install" + sed -e 's/'\''\/usr\//'\'"$(SED_PREFIX)"'\//g' <"completion/bash-completion.sh" >"completion/bash-completion.sh.install" + sed -e 's/'\''\/usr\//'\'"$(SED_PREFIX)"'\//g' <"completion/fish-completion.fish" >"completion/fish-completion.fish.install" + sed -e 's/'\''\/usr\//'\'"$(SED_PREFIX)"'\//g' <"completion/zsh-completion.zsh" >"completion/zsh-completion.zsh.install" ponythinkcompletion: ponysaycompletion sed -e 's/ponysay/ponythink/g' <"completion/bash-completion.sh.install" | sed -e 's/\/ponythink\//\/ponysay\//g' -e 's/\\\/ponythink\\\//\\\/ponysay\\\//g' >"completion/bash-completion-think.sh" sed -e 's/ponysay/ponythink/g' <"completion/fish-completion.fish.install" | sed -e 's/\/ponythink\//\/ponysay\//g' -e 's/\\\/ponythink\\\//\\\/ponysay\\\//g' >"completion/fish-completion-think.fish" sed -e 's/ponysay/ponythink/g' <"completion/zsh-completion.zsh.install" | sed -e 's/\/ponythink\//\/ponysay\//g' -e 's/\\\/ponythink\\\//\\\/ponysay\\\//g' >"completion/zsh-completion-think.zsh" -install-min: truncater +install-min: core truncater mkdir -p "$(INSTALLDIR)/share/ponysay/" mkdir -p "$(INSTALLDIR)/share/ponysay/ponies" mkdir -p "$(INSTALLDIR)/share/ponysay/ttyponies" @@ -34,17 +37,14 @@ install-min: truncater cp -P ttyponies/*.pony "$(INSTALLDIR)/share/ponysay/ttyponies/" cp -P quotes/*.* "$(INSTALLDIR)/share/ponysay/quotes/" - mkdir -p "$(INSTALLDIR)/bin/" - install "ponysay" "$(INSTALLDIR)/bin/ponysay" - ln -sf "ponysay" "$(INSTALLDIR)/bin/ponythink" + mkdir -p "$(INSTALLDIR)/bin/" + install "ponysay" "$(INSTALLDIR)/bin/ponysay" + install "ponysay.py" "$(INSTALLDIR)/bin/ponysay.py" + ln -sf "ponysay" "$(INSTALLDIR)/bin/ponythink" + ln -sf "ponysay.py" "$(INSTALLDIR)/bin/ponythink.py" - mkdir -p "$(INSTALLDIR)/lib/ponysay/" - install -s "truncater" "$(INSTALLDIR)/lib/ponysay/truncater" - install "list.pl" "$(INSTALLDIR)/lib/ponysay/list.pl" - install "linklist.pl" "$(INSTALLDIR)/lib/ponysay/linklist.pl" - install "pq4ps" "$(INSTALLDIR)/lib/ponysay/pq4ps" - install "pq4ps.pl" "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" - install "pq4ps-list.pl" "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" + mkdir -p "$(INSTALLDIR)/lib/ponysay/" + install -s "truncater" "$(INSTALLDIR)/lib/ponysay/truncater" mkdir -p "$(INSTALLDIR)/share/licenses/ponysay/" install "COPYING" "$(INSTALLDIR)/share/licenses/ponysay/COPYING" @@ -103,7 +103,7 @@ install: install-no-info install-info '| |_| \___/ |_| |_| \__, ||___/ \__,_| \__, | |\n'\ '| |___/ |___/ |\n'\ '\\--------------------------------------------------/' - @echo '' | ./ponysay -f ./`if [[ "$$TERM" = "linux" ]]; then echo ttyponies; else echo ponies; fi`/pinkiecannon.pony | tail --lines=30 ; echo -e '\n' + @echo 'dummy' | ./ponysay -f ./`if [[ "$$TERM" = "linux" ]]; then echo ttyponies; else echo ponies; fi`/pinkiecannon.pony | tail --lines=30 ; echo -e '\n' uninstall: if [ -d "$(INSTALLDIR)/share/ponysay" ]; then rm -fr "$(INSTALLDIR)/share/ponysay" ; fi @@ -129,19 +129,28 @@ uninstall-old: if [ -d "$(INSTALLDIR)/share/ponies" ]; then rm -fr "$(INSTALLDIR)/share/ponies" ; fi if [ -d "$(INSTALLDIR)/share/ttyponies" ]; then rm -fr "$(INSTALLDIR)/share/ttyponies" ; fi if [ -f "$(INSTALLDIR)/bin/ponysaytruncater" ]; then unlink "$(INSTALLDIR)/bin/ponysaytruncater" ; fi + if [ -d "$(INSTALLDIR)/lib/ponysay/link.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/link.pl" ; fi + if [ -d "$(INSTALLDIR)/lib/ponysay/linklist.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/linklist.pl" ; fi + if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps" ; fi + if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ; fi if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ; fi + if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ; fi clean: - if [ -f "truncater" ]; then rm -f "truncater" ; fi - if [ -f "completion/bash-completion-think.sh" ]; then rm -f "completion/bash-completion-think.sh" ; fi - if [ -f "completion/fish-completion-think.fish" ]; then rm -f "completion/fish-completion-think.fish"; fi - if [ -f "completion/zsh-completion-think.zsh" ]; then rm -f "completion/zsh-completion-think.zsh" ; fi - if [ -f "manuals/manpage.6.gz" ]; then rm -f "manuals/manpage.6.gz" ; fi - if [ -f "manuals/manpage.es.6.gz" ]; then rm -f "manuals/manpage.es.6.gz" ; fi - if [ -f "ponysay.info.gz" ]; then rm -f "ponysay.info.gz" ; fi + if [ -f "truncater" ]; then rm -f "truncater" ; fi + if [ -f "completion/bash-completion-think.sh" ]; then rm -f "completion/bash-completion-think.sh" ; fi + if [ -f "completion/fish-completion-think.fish" ]; then rm -f "completion/fish-completion-think.fish" ; fi + if [ -f "completion/zsh-completion-think.zsh" ]; then rm -f "completion/zsh-completion-think.zsh" ; fi + if [ -f "completion/bash-completion.sh.install" ]; then rm -f "completion/bash-completion.sh.install" ; fi + if [ -f "completion/fish-completion.fish.install" ]; then rm -f "completion/fish-completion.fish.install"; fi + if [ -f "completion/zsh-completion.zsh.install" ]; then rm -f "completion/zsh-completion.zsh.install" ; fi + if [ -f "manuals/manpage.6.gz" ]; then rm -f "manuals/manpage.6.gz" ; fi + if [ -f "manuals/manpage.es.6.gz" ]; then rm -f "manuals/manpage.es.6.gz" ; fi + if [ -f "ponysay.info.gz" ]; then rm -f "ponysay.info.gz" ; fi + if [ -f "ponysay.py.install" ]; then rm -f "ponysay.py.install" ; fi clean-old: - if [ -f "ponysaytruncater" ]; then rm -f "ponysaytruncater" ; fi + if [ -f "ponysaytruncater" ]; then rm -f "ponysaytruncater"; fi ## Scripts for maintainers |