Makefile fixes related to installation.
'make install' and 'make uninstall' should now work correctly, placing the documentation in the proper places. Any directories needed will be created.
This commit is contained in:
parent
c6f7d67623
commit
f5c2898524
7 changed files with 173 additions and 160 deletions
|
|
@ -182,7 +182,7 @@ scmisc.o scedit.o:
|
|||
$(PROGRAM).doc: rogue.me
|
||||
if test "x$(GROFF)" != "x" ; then \
|
||||
$(GROFF) -P-c -P-b -P-u -t -me -Tutf8 rogue.me > $(PROGRAM).doc ;\
|
||||
elif test "x$(NROFF)" != "x" -a "x$(TBL)" != "x" -a "x$(COLCRT)" != "x" ; then \
|
||||
elif test "x$(NROFF)" != "x" && test "x$(TBL)" != "x" && test "x$(COLCRT)" != "x" ; then \
|
||||
tbl rogue.me | $(NROFF) -me | colcrt - > $(PROGRAM).doc ;\
|
||||
fi
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ $(PROGRAM).doc: rogue.me
|
|||
$(PROGRAM).cat: rogue.6
|
||||
if test "x$(GROFF)" != "x" ; then \
|
||||
$(GROFF) -P-c -P-b -P-u -Tascii -man rogue.6 > $(PROGRAM).cat ;\
|
||||
elif test "x$(NROFF)" != "x" -a "x$(COLCRT)" != "x" ; then \
|
||||
elif test "x$(NROFF)" != "x" && test "x$(COLCRT)" != "x" ; then \
|
||||
$(NROFF) -man rogue.6 | $(COLCRT) - > $(PROGRAM).cat ;\
|
||||
fi
|
||||
|
||||
|
|
@ -203,13 +203,17 @@ dist: clean $(PROGRAM)
|
|||
gzip -f $(DISTFILE).tar
|
||||
|
||||
install: all
|
||||
-$(TOUCH) test
|
||||
-if test ! -f $(DESTDIR)$(SCOREFILE) ; then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi
|
||||
-if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \
|
||||
$(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi
|
||||
-if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \
|
||||
$(MKDIR) -p $(DESTDIR)$(SAVEDIR) ; fi
|
||||
-$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
|
||||
$(TOUCH) test
|
||||
if test ! -f $(DESTDIR)$(SCOREFILE) ; then \
|
||||
$(MKDIR) -p `dirname $(DESTDIR)$(SCOREFILE)` ; \
|
||||
$(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi
|
||||
if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \
|
||||
$(MKDIR) -p `dirname $(DESTDIR)$(LOGFILE)` ; \
|
||||
$(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi
|
||||
if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \
|
||||
$(MKDIR) -p $(DESTDIR)$(SAVEDIR) ; fi
|
||||
$(MKDIR) -p $(DESTDIR)$(bindir)
|
||||
$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
|
||||
-if test "x$(GROUPOWNER)" != "x" ; then \
|
||||
$(CHGRP) $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \
|
||||
$(CHGRP) $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \
|
||||
|
|
@ -219,28 +223,28 @@ install: all
|
|||
$(CHMOD) 0464 $(DESTDIR)$(SCOREFILE) ; \
|
||||
$(CHMOD) 0464 $(DESTDIR)$(LOGFILE) ; \
|
||||
$(CHMOD) 0775 $(DESTDIR)$(SAVEDIR) ; \
|
||||
fi
|
||||
-if test -d $(DESTDIR)$(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi
|
||||
-if test ! -d $(DESTDIR)$(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; fi
|
||||
-$(INSTALL) -m 0644 $(PROGRAM).doc $(DESTDIR)$(docdir)/$(PROGRAM).doc
|
||||
-$(INSTALL) -m 0644 rogue.html $(DESTDIR)$(docdir)/$(PROGRAM).html
|
||||
-$(INSTALL) -m 0644 $(PROGRAM).cat $(DESTDIR)$(docdir)/$(PROGRAM).cat
|
||||
-$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT
|
||||
-$(INSTALL) -m 0644 rogue.me $(DESTDIR)$(docdir)/$(PROGRAM).me
|
||||
-if test "x$(LOCKFILE)" != "x" && test ! -f $(DESTDIR)$(LOCKFILE) ; then \
|
||||
fi
|
||||
if test ! -d $(DESTDIR)$(man6dir) && test -d $(DESTDIR)$(mandir) ; \
|
||||
then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; \
|
||||
else mkdir -p $(DESTDIR)$(man6dir) ; \
|
||||
$(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi
|
||||
$(MKDIR) -p $(DESTDIR)$(docdir)
|
||||
$(INSTALL) -m 0644 $(DOCS) $(DESTDIR)$(docdir)
|
||||
$(INSTALL) -m 0644 rogue.html $(DESTDIR)$(docdir)/$(PROGRAM).html
|
||||
$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT
|
||||
$(INSTALL) -m 0644 rogue.me $(DESTDIR)$(docdir)/$(PROGRAM).me
|
||||
if test "x$(LOCKFILE)" != "x" && test ! -f $(DESTDIR)$(LOCKFILE) ; then \
|
||||
$(INSTALL) -m 0666 test $(DESTDIR)$(LOCKFILE) ; \
|
||||
$(RM) $(DESTDIR)$(LOCKFILE) ; \
|
||||
fi
|
||||
-$(RM) test
|
||||
fi
|
||||
$(RM) test
|
||||
|
||||
uninstall:
|
||||
-$(RM) $(DESTDIR)$(bindir)/$(PROGRAM)
|
||||
-$(RM) $(DESTDIR)$(man6dir)/$(PROGRAM).6
|
||||
-$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).doc
|
||||
-$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).cat
|
||||
-$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).me
|
||||
-$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).html
|
||||
-$(RM) $(DESTDIR)$(LOCKFILE)
|
||||
-$(RMDIR) $(DESTDIR)$(docdir)$(PROGRAM)
|
||||
$(RM) $(DESTDIR)$(bindir)/$(PROGRAM)
|
||||
$(RM) $(DESTDIR)$(man6dir)/$(PROGRAM).6
|
||||
$(RM) $(DESTDIR)$(mandir)/$(PROGRAM).6
|
||||
$(RM) -r $(DESTDIR)$(docdir)
|
||||
if test "x$(LOCKFILE)" != "x" ; then \
|
||||
$(RM) $(DESTDIR)$(LOCKFILE) ; fi
|
||||
|
||||
reinstall: uninstall install
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue