comparison 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
comparison
equal deleted inserted replaced
223:0e99eade579c 224:4d0f53998e8a
87 docs: $(DOCS) 87 docs: $(DOCS)
88 88
89 $(PROGRAM).doc: aguide.mm 89 $(PROGRAM).doc: aguide.mm
90 if test "x$(GROFF)" != "x" ; then \ 90 if test "x$(GROFF)" != "x" ; then \
91 $(GROFF) -P-c -P-b -P-u -t -mm -Tascii aguide.mm > $(PROGRAM).doc ;\ 91 $(GROFF) -P-c -P-b -P-u -t -mm -Tascii aguide.mm > $(PROGRAM).doc ;\
92 elif test "x$(NROFF)" != "x" -a "x$(TBL)" != "x" -a "x$(COLCRT)" != "x" ; then \ 92 elif test "x$(NROFF)" != "x" && test "x$(TBL)" != "x" && test "x$(COLCRT)" != "x" ; then \
93 $(TBL) aguide.mm | $(NROFF) -mm | $(COLCRT) - > $(PROGRAM).doc ;\ 93 $(TBL) aguide.mm | $(NROFF) -mm | $(COLCRT) - > $(PROGRAM).doc ;\
94 fi 94 fi
95 95
96 install: $(PROGRAM) 96 install: all
97 -touch test 97 touch test
98 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \ 98 if test ! -f $(DESTDIR)$(SCOREFILE) ; then \
99 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi 99 mkdir -p `dirname $(DESTDIR)$(SCOREFILE)` ; \
100 -if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ 100 $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi
101 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi 101 if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \
102 -if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ 102 mkdir -p `dirname $(DESTDIR)$(LOGFILE)` ; \
103 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi 103 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi
104 if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \
105 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi
106 mkdir -p $(DESTDIR)$(bindir)
104 $(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) 107 $(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
105 -if test "x$(GROUPOWNER)" != "x" ; then \ 108 -if test "x$(GROUPOWNER)" != "x" ; then \
106 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ 109 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \
107 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ 110 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \
108 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ 111 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \
109 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ 112 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \
110 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ 113 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \
111 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ 114 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \
112 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ 115 chmod 0464 $(DESTDIR)$(LOGFILE) ; \
113 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ 116 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \
114 fi 117 fi
115 -if test ! -d $(DESTDIR)$(docdir) ; \ 118 if test ! -d $(DESTDIR)$(docdir) ; \
116 then mkdir -p $(DESTDIR)$(docdir) ; fi 119 then mkdir -p $(DESTDIR)$(docdir) ; fi
117 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT 120 $(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT
118 -$(INSTALL) -m 0644 $(DOCS) $(DESTDIR)$(docdir) 121 $(INSTALL) -m 0644 $(DOCS) $(DOCSRC) $(DESTDIR)$(docdir)
119 -$(RM) test 122 $(RM) test
120 123
121 uninstall: 124 uninstall:
122 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) 125 $(RM) $(DESTDIR)$(bindir)/$(PROGRAM)
123 -$(RM) -r $(DESTDIR)$(docdir) 126 $(RM) -r $(DESTDIR)$(docdir)
124 127
125 reinstall: uninstall install 128 reinstall: uninstall install
126 129
127 clean: 130 clean:
128 $(RM) $(OBJS1) 131 $(RM) $(OBJS1)
129 $(RM) $(OBJS2) 132 $(RM) $(OBJS2)