comparison arogue5/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 a666e4a034ed
children 455464db5800
comparison
equal deleted inserted replaced
223:0e99eade579c 224:4d0f53998e8a
73 73
74 lint: 74 lint:
75 lint -hxbc $(CFILES) $(CRLIB) > linterrs 75 lint -hxbc $(CFILES) $(CRLIB) > linterrs
76 76
77 install: $(PROGRAM) 77 install: $(PROGRAM)
78 -touch test 78 touch test
79 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \ 79 if test ! -f $(DESTDIR)$(SCOREFILE) ; then \
80 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi 80 mkdir -p `dirname $(DESTDIR)$(SCOREFILE)` ; \
81 -if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ 81 $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi
82 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi 82 if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \
83 -if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ 83 mkdir -p `dirname $(DESTDIR)$(LOGFILE)` ; \
84 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi 84 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi
85 -$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) 85 if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \
86 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi
87 mkdir -p $(DESTDIR)$(bindir)
88 $(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
86 -if test "x$(GROUPOWNER)" != "x" ; then \ 89 -if test "x$(GROUPOWNER)" != "x" ; then \
87 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ 90 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \
88 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ 91 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \
89 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ 92 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \
90 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ 93 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \
91 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ 94 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \
92 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ 95 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \
93 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ 96 chmod 0464 $(DESTDIR)$(LOGFILE) ; \
94 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ 97 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \
95 fi 98 fi
96 -if test ! -d $(DESTDIR)$(docdir) ; \ 99 if test ! -d $(DESTDIR)$(docdir) ; \
97 then mkdir -p $(DESTDIR)$(docdir) ; fi 100 then mkdir -p $(DESTDIR)$(docdir) ; fi
98 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT 101 $(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT
99 -$(INSTALL) -m 0644 $(DOCS) $(DESTDIR)$(docdir) 102 $(INSTALL) -m 0644 $(DOCS) $(DESTDIR)$(docdir)
100 -$(RM) test 103 $(RM) test
101 104
102 uninstall: 105 uninstall:
103 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) 106 $(RM) $(DESTDIR)$(bindir)/$(PROGRAM)
104 -$(RM) -r $(DESTDIR)$(docdir) 107 $(RM) -r $(DESTDIR)$(docdir)
105 108
106 reinstall: uninstall install 109 reinstall: uninstall install
107 110
108 clean: 111 clean:
109 $(RM) $(OBJS1) 112 $(RM) $(OBJS1)
110 $(RM) $(OBJS2) 113 $(RM) $(OBJS2)