diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 61 |
1 files changed, 37 insertions, 24 deletions
@@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # -# On Debian systems, the complete text of the GNU General Public License +# The complete text of the GNU General Public License # can be found in /usr/share/common-licenses/GPL-3 file. SHELL := sh -e @@ -48,23 +48,12 @@ mkfs.fat: mkfs.fat.o rebuild: distclean build -install: install-bin install-doc install-man +install: install-bin install-doc install-man install-symlinks install-bin: build install -d -m 0755 $(DESTDIR)/$(SBINDIR) install -m 0755 fatlabel fsck.fat mkfs.fat $(DESTDIR)/$(SBINDIR) - # legacy symlinks - ln -sf fatlabel $(DESTDIR)/$(SBINDIR)/dosfslabel - - ln -sf fsck.fat $(DESTDIR)/$(SBINDIR)/dosfsck - ln -sf fsck.fat $(DESTDIR)/$(SBINDIR)/fsck.msdos - ln -sf fsck.fat $(DESTDIR)/$(SBINDIR)/fsck.vfat - - ln -sf mkfs.fat $(DESTDIR)/$(SBINDIR)/mkdosfs - ln -sf mkfs.fat $(DESTDIR)/$(SBINDIR)/mkfs.msdos - ln -sf mkfs.fat $(DESTDIR)/$(SBINDIR)/mkfs.vfat - install-doc: install -d -m 0755 $(DESTDIR)/$(DOCDIR)/dosfstools install -p -m 0644 ChangeLog doc/* $(DESTDIR)/$(DOCDIR)/dosfstools @@ -84,17 +73,41 @@ install-man: install -D -m 0644 $${MANPAGE} $(DESTDIR)/$(PREFIX)/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \ done; \ done - - # legacy symlinks - ln -sf fatlabel.8 $(DESTDIR)/$(MANDIR)/man8/dosfslabel.8 - - ln -sf fsck.fat.8 $(DESTDIR)/$(MANDIR)/man8/dosfsck.8 - ln -sf fsck.fat.8 $(DESTDIR)/$(MANDIR)/man8/fsck.msdos.8 - ln -sf fsck.fat.8 $(DESTDIR)/$(MANDIR)/man8/fsck.vfat.8 - - ln -sf mkfs.fat.8 $(DESTDIR)/$(MANDIR)/man8/mkdosfs.8 - ln -sf mkfs.fat.8 $(DESTDIR)/$(MANDIR)/man8/mkfs.msdos.8 - ln -sf mkfs.fat.8 $(DESTDIR)/$(MANDIR)/man8/mkfs.vfat.8 +install-symlinks: + if [ -e $(DESTDIR)/$(SBINDIR)/fatlabel ]; \ + then \ + ln -sf fatlabel $(DESTDIR)/$(SBINDIR)/dosfslabel; \ + if [ -e $(DESTDIR)/$(MANDIR)/man8/dosfslabel.8 ]; \ + then \ + ln -sf fatlabel.8 $(DESTDIR)/$(MANDIR)/man8/dosfslabel.8; \ + fi; \ + fi + + if [ -e $(DESTDIR)/$(SBINDIR)/fsck.fat ]; \ + then \ + ln -sf fsck.fat $(DESTDIR)/$(SBINDIR)/dosfsck; \ + ln -sf fsck.fat $(DESTDIR)/$(SBINDIR)/fsck.msdos; \ + ln -sf fsck.fat $(DESTDIR)/$(SBINDIR)/fsck.vfat; \ + if [ -e $(DESTDIR)/$(MANDIR)/man8/fsck.fat.8 ]; \ + then \ + ln -sf fsck.fat.8 $(DESTDIR)/$(MANDIR)/man8/dosfsck.8; \ + ln -sf fsck.fat.8 $(DESTDIR)/$(MANDIR)/man8/fsck.msdos.8; \ + ln -sf fsck.fat.8 $(DESTDIR)/$(MANDIR)/man8/fsck.vfat.8; \ + fi; \ + fi + + if [ -e $(DESTDIR)/$(SBINDIR)/mkfs.fat ]; \ + then \ + ln -sf mkfs.fat $(DESTDIR)/$(SBINDIR)/mkdosfs; \ + ln -sf mkfs.fat $(DESTDIR)/$(SBINDIR)/mkfs.msdos; \ + ln -sf mkfs.fat $(DESTDIR)/$(SBINDIR)/mkfs.vfat; \ + if [ -e $(DESTDIR)/$(MANDIR)/man8/mkfs.fat.8 ]; \ + then \ + ln -sf mkfs.fat.8 $(DESTDIR)/$(MANDIR)/man8/mkdosfs.8; \ + ln -sf mkfs.fat.8 $(DESTDIR)/$(MANDIR)/man8/mkfs.msdos.8; \ + ln -sf mkfs.fat.8 $(DESTDIR)/$(MANDIR)/man8/mkfs.vfat.8; \ + fi; \ + fi uninstall: uninstall-bin uninstall-doc uninstall-man |