Mercurial > hg > early-roguelike
diff arogue7/Makefile.in @ 224:4d0f53998e8a
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.
author | John "Elwin" Edwards |
---|---|
date | Fri, 26 Feb 2016 17:30:30 -0500 |
parents | 0e99eade579c |
children | 455464db5800 |
line wrap: on
line diff
--- a/arogue7/Makefile.in Sun Feb 21 20:47:12 2016 -0500 +++ b/arogue7/Makefile.in Fri Feb 26 17:30:30 2016 -0500 @@ -89,18 +89,21 @@ $(PROGRAM).doc: aguide.mm if test "x$(GROFF)" != "x" ; then \ $(GROFF) -P-c -P-b -P-u -t -mm -Tascii aguide.mm > $(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) aguide.mm | $(NROFF) -mm | $(COLCRT) - > $(PROGRAM).doc ;\ fi -install: $(PROGRAM) - -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: all + 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) ; \ @@ -111,17 +114,17 @@ chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ chmod 0464 $(DESTDIR)$(LOGFILE) ; \ chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ - fi - -if test ! -d $(DESTDIR)$(docdir) ; \ + fi + if test ! -d $(DESTDIR)$(docdir) ; \ then mkdir -p $(DESTDIR)$(docdir) ; fi - -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT - -$(INSTALL) -m 0644 $(DOCS) $(DESTDIR)$(docdir) - -$(RM) test + $(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT + $(INSTALL) -m 0644 $(DOCS) $(DOCSRC) $(DESTDIR)$(docdir) + $(RM) test -uninstall: - -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) - -$(RM) -r $(DESTDIR)$(docdir) - +uninstall: + $(RM) $(DESTDIR)$(bindir)/$(PROGRAM) + $(RM) -r $(DESTDIR)$(docdir) + reinstall: uninstall install clean: