Mercurial > hg > early-roguelike
comparison xrogue/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 | 2d221d574280 |
children | 455464db5800 |
comparison
equal
deleted
inserted
replaced
223:0e99eade579c | 224:4d0f53998e8a |
---|---|
64 | 64 |
65 $(PROGRAM): $(HDRS) $(OBJS) | 65 $(PROGRAM): $(HDRS) $(OBJS) |
66 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ | 66 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ |
67 | 67 |
68 install: $(PROGRAM) | 68 install: $(PROGRAM) |
69 -touch test | 69 touch test |
70 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \ | 70 if test ! -f $(DESTDIR)$(SCOREFILE) ; then \ |
71 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi | 71 mkdir -p `dirname $(DESTDIR)$(SCOREFILE)` ; \ |
72 -if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ | 72 $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi |
73 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi | 73 if test ! -f $(DESTDIR)$(LOGFILE) ; then \ |
74 -if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ | 74 mkdir -p `dirname $(DESTDIR)$(LOGFILE)` ; \ |
75 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi | 75 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi |
76 if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ | |
77 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi | |
78 mkdir -p $(DESTDIR)$(bindir) | |
76 $(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) | 79 $(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) |
77 -if test "x$(GROUPOWNER)" != "x" ; then \ | 80 -if test "x$(GROUPOWNER)" != "x" ; then \ |
78 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ | 81 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ |
79 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ | 82 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ |
80 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | 83 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ |
81 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ | 84 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ |
82 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | 85 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ |
83 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ | 86 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ |
84 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ | 87 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ |
85 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ | 88 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ |
86 fi | 89 fi |
87 -if test ! -d $(DESTDIR)$(docdir) ; \ | 90 if test ! -d $(DESTDIR)$(docdir) ; \ |
88 then mkdir -p $(DESTDIR)$(docdir) ; fi | 91 then mkdir -p $(DESTDIR)$(docdir) ; fi |
89 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT | 92 $(INSTALL) -m 0644 LICENSE.TXT README.TXT $(DESTDIR)$(docdir) |
90 -$(INSTALL) -m 0644 README.TXT $(DESTDIR)$(docdir) | 93 $(RM) test |
91 -$(RM) test | |
92 | 94 |
93 uninstall: | 95 uninstall: |
94 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) | 96 $(RM) $(DESTDIR)$(bindir)/$(PROGRAM) |
95 -$(RM) -r $(DESTDIR)$(docdir) | 97 $(RM) -r $(DESTDIR)$(docdir) |
96 | 98 |
97 reinstall: uninstall install | 99 reinstall: uninstall install |
98 | 100 |
99 clean: | 101 clean: |
100 $(RM) $(OBJS1) | 102 $(RM) $(OBJS1) |
101 $(RM) $(OBJS2) | 103 $(RM) $(OBJS2) |