| [0b990d] | 1 | TOPDIR=.. | 
|---|
|  | 2 | ifndef SRCDIR | 
|---|
|  | 3 | SRCDIR=$(shell pwd) | 
|---|
|  | 4 | endif | 
|---|
|  | 5 |  | 
|---|
|  | 6 | include $(SRCDIR)/$(TOPDIR)/lib/GlobalMakefile | 
|---|
|  | 7 |  | 
|---|
|  | 8 | DOXYGEN=doxygen | 
|---|
|  | 9 |  | 
|---|
|  | 10 | # Get rid of end-of-comments.  This is done so all pages can be combined | 
|---|
|  | 11 | # into a single man page. | 
|---|
|  | 12 | MAN_SED_PAGE = (sed s.*/..) | 
|---|
|  | 13 |  | 
|---|
|  | 14 | # This makes pages into sections and sections into subsections.  That way | 
|---|
|  | 15 | # all the documentation is stuck into a single man page.  The opening | 
|---|
|  | 16 | # comment is also removed, because all the pages have to be combined into a | 
|---|
|  | 17 | # single comment to suit doxygen. | 
|---|
|  | 18 | MAN_SED_SEC = (sed 's.^*/.\<br\>.' | sed 's+\\subsection+\\subsubsection+'| sed 's+\\section+\\subsection+' | sed 's+/\**.*\\page+\\section+') | 
|---|
|  | 19 |  | 
|---|
|  | 20 | # This makes the bullets into an 'o', which looks better in the text man pages. | 
|---|
|  | 21 | NROFF_SED = sed 's/\\(bu/o/' | 
|---|
|  | 22 |  | 
|---|
|  | 23 | .PHONY: all | 
|---|
|  | 24 | all:: html | 
|---|
|  | 25 | ifeq ($(DOXYGEN_MAN),YES) | 
|---|
|  | 26 | all:: man1 man3 | 
|---|
|  | 27 | endif | 
|---|
|  | 28 |  | 
|---|
|  | 29 | .PHONY: man1 | 
|---|
|  | 30 | man1: mpqc.man.dox | 
|---|
|  | 31 | $(DOXYGEN) doxygen.man1.cfg | 
|---|
|  | 32 | $(NROFF_SED) < man/man1/mpqc.1 > man/man1/mpqc.1.tmp | 
|---|
|  | 33 | /bin/mv man/man1/mpqc.1.tmp man/man1/mpqc.1 | 
|---|
|  | 34 |  | 
|---|
|  | 35 | .PHONY: man3 | 
|---|
|  | 36 | man3: | 
|---|
|  | 37 | $(DOXYGEN) doxygen.man3.cfg | 
|---|
|  | 38 |  | 
|---|
|  | 39 | .PHONY: mpqc.man.dox | 
|---|
|  | 40 | mpqc.man.dox: | 
|---|
|  | 41 | /bin/rm -f $@ | 
|---|
|  | 42 | $(MAN_SED_PAGE) < $(SRCDIR)/$(TOPDIR)/src/bin/mpqc/mpqc.dox > $@ | 
|---|
|  | 43 | $(MAN_SED_SEC) < $(SRCDIR)/$(TOPDIR)/src/bin/mpqc/mpqcover.dox >> $@ | 
|---|
|  | 44 | $(MAN_SED_SEC) < $(SRCDIR)/$(TOPDIR)/src/bin/mpqc/mpqcrunning.dox >> $@ | 
|---|
|  | 45 | $(MAN_SED_SEC) < $(SRCDIR)/$(TOPDIR)/src/bin/mpqc/mpqcinp.dox >> $@ | 
|---|
|  | 46 | $(MAN_SED_SEC) < $(SRCDIR)/$(TOPDIR)/src/bin/mpqc/mpqcsimp.dox >> $@ | 
|---|
|  | 47 | $(MAN_SED_SEC) < $(SRCDIR)/$(TOPDIR)/src/bin/mpqc/mpqcoo.dox >> $@ | 
|---|
|  | 48 | $(MAN_SED_SEC) < $(SRCDIR)/$(TOPDIR)/src/bin/mpqc/mpqcval.dox >> $@ | 
|---|
|  | 49 | $(MAN_SED_SEC) < $(SRCDIR)/$(TOPDIR)/src/lib/chemistry/qc/psi/mpqcpsi.dox >> $@ | 
|---|
|  | 50 | $(MAN_SED_SEC) < $(SRCDIR)/$(TOPDIR)/src/lib/chemistry/cca/mpqccomponents.dox >> $@ | 
|---|
|  | 51 | $(MAN_SED_SEC) < $(SRCDIR)/$(TOPDIR)/src/bin/mpqc/mpqclic.dox >> $@ | 
|---|
|  | 52 | $(MAN_SED_SEC) < $(SRCDIR)/$(TOPDIR)/src/bin/mpqc/mpqcwar.dox >> $@ | 
|---|
|  | 53 | echo "*/" >> $@ | 
|---|
|  | 54 |  | 
|---|
|  | 55 | .PHONY: html | 
|---|
|  | 56 | html: | 
|---|
|  | 57 | $(DOXYGEN) doxygen.cfg | 
|---|
|  | 58 |  | 
|---|
|  | 59 | .PHONY: veryclean | 
|---|
|  | 60 | veryclean: | 
|---|
|  | 61 | /bin/rm -rf html latex man | 
|---|
|  | 62 | /bin/rm -rf *~ | 
|---|
|  | 63 |  | 
|---|
|  | 64 | .PHONY: clean | 
|---|
|  | 65 | clean: | 
|---|
|  | 66 | /bin/rm -rf *~ | 
|---|
|  | 67 |  | 
|---|
|  | 68 | install: | 
|---|
|  | 69 | $(INSTALL) $(INSTALLDIROPT) $(installroot)$(prefix) | 
|---|
|  | 70 | /bin/cp -r html $(installroot)$(prefix) | 
|---|
|  | 71 |  | 
|---|
|  | 72 | install_devel: install_man install_samples | 
|---|
|  | 73 |  | 
|---|
|  | 74 | .PHONY: install_man | 
|---|
|  | 75 | install_man: | 
|---|
|  | 76 | $(INSTALL) $(INSTALLDIROPT) $(installroot)$(prefix) | 
|---|
|  | 77 | /bin/cp -r man $(installroot)$(prefix) | 
|---|
|  | 78 |  | 
|---|
|  | 79 | .PHONY: install_samples | 
|---|
|  | 80 | install_samples: | 
|---|
|  | 81 | $(INSTALL) $(INSTALLDIROPT) $(installroot)$(prefix) | 
|---|
|  | 82 | $(INSTALL) $(INSTALLDIROPT) $(installroot)$(prefix)/examples | 
|---|
|  | 83 | $(INSTALL) $(INSTALLDIROPT) $(installroot)$(prefix)/examples/mp2 | 
|---|
|  | 84 | $(INSTALL) $(INSTALLLIBOPT) $(SRCDIR)/devsamp/mp2.cc \ | 
|---|
|  | 85 | $(installroot)$(prefix)/examples/mp2 | 
|---|
|  | 86 | $(INSTALL) $(INSTALLLIBOPT) $(SRCDIR)/devsamp/mp2.in \ | 
|---|
|  | 87 | $(installroot)$(prefix)/examples/mp2 | 
|---|
|  | 88 | sed "s+/usr/local/mpqc/current+$(prefix)+" < \ | 
|---|
|  | 89 | $(SRCDIR)/devsamp/Makefile \ | 
|---|
|  | 90 | > $(installroot)$(prefix)/examples/mp2/Makefile | 
|---|