nsxiv696f687
Rename icon & desktop and add install-all in Makefile (#96)
* Rename in Makefile
Renamed {icon,desktop} => install-{icon,desktop}
* Add install-all in Makefile
* Added .PHONY targets and renamed icon_cleanup
Added .PHONY targets and renamed icon_cleanup to uninstall_icon
* Update README.md
+13 −7
2 files changed
| @@ -46,7 +46,7 @@ LDLIBS = -lImlib2 -lX11 -lXft -lfontconfig $(OPTIONAL_LIBS) | |||
| 46 | 46 | OBJS = autoreload_$(AUTORELOAD).o commands.o image.o main.o options.o \ | |
| 47 | 47 | thumbs.o util.o window.o | |
| 48 | 48 | ||
| 49 | − | .PHONY: all clean install uninstall icon | |
| 49 | + | .PHONY: all clean install uninstall install-all install-icon uninstall-icon install-desktop | |
| 50 | 50 | .SUFFIXES: | |
| 51 | 51 | .SUFFIXES: .c .o | |
| 52 | 52 | ||
| @@ -87,12 +87,14 @@ version.h: Makefile .git/index | |||
| 87 | 87 | clean: | |
| 88 | 88 | $(RM) *.o nsxiv | |
| 89 | 89 | ||
| 90 | − | desktop: | |
| 90 | + | install-all: install install-desktop install-icon | |
| 91 | + | ||
| 92 | + | install-desktop: | |
| 91 | 93 | @echo "INSTALL nsxiv.desktop" | |
| 92 | 94 | mkdir -p $(DESTDIR)$(PREFIX)/share/applications | |
| 93 | 95 | cp nsxiv.desktop $(DESTDIR)$(PREFIX)/share/applications | |
| 94 | 96 | ||
| 95 | − | icon: | |
| 97 | + | install-icon: | |
| 96 | 98 | @echo "INSTALL icon" | |
| 97 | 99 | for f in $(ICONS); do \ | |
| 98 | 100 | dir="$(DESTDIR)$(PREFIX)/share/icons/hicolor/$${f%.png}/apps"; \ | |
| @@ -101,7 +103,7 @@ icon: | |||
| 101 | 103 | chmod 644 "$$dir/nsxiv.png"; \ | |
| 102 | 104 | done | |
| 103 | 105 | ||
| 104 | − | icon_cleanup: | |
| 106 | + | uninstall-icon: | |
| 105 | 107 | @echo "REMOVE icon" | |
| 106 | 108 | for f in $(ICONS); do \ | |
| 107 | 109 | dir="$(DESTDIR)$(PREFIX)/share/icons/hicolor/$${f%.png}/apps"; \ | |
| @@ -119,7 +121,7 @@ install: all | |||
| 119 | 121 | @echo "INSTALL share/nsxiv/" | |
| 120 | 122 | install -Dt $(DESTDIR)$(DOCPREFIX)/examples examples/* | |
| 121 | 123 | ||
| 122 | − | uninstall: icon_cleanup | |
| 124 | + | uninstall: uninstall-icon | |
| 123 | 125 | @echo "REMOVE bin/nsxiv" | |
| 124 | 126 | rm -f $(DESTDIR)$(PREFIX)/bin/nsxiv | |
| 125 | 127 | @echo "REMOVE nsxiv.1" | |
| @@ -82,11 +82,15 @@ Installing nsxiv: | |||
| 82 | 82 | ||
| 83 | 83 | Installing desktop entry: | |
| 84 | 84 | ||
| 85 | − | # make desktop | |
| 85 | + | # make install-desktop | |
| 86 | 86 | ||
| 87 | 87 | Installing icons: | |
| 88 | 88 | ||
| 89 | − | # make icon | |
| 89 | + | # make install-icon | |
| 90 | + | ||
| 91 | + | Installing all of the above: | |
| 92 | + | ||
| 93 | + | # make install-all | |
| 90 | 94 | ||
| 91 | 95 | Please note, that these requires root privileges. | |
| 92 | 96 | By default, nsxiv is installed using the prefix `/usr/local`, so the full path | |