# --------------------------------------------------------------------------- # \author mdejong # # This file implements the part of the general make procedure which # handels specific action(s) for a single file or directory. # # The options for the various actions, including compilation, # linking and document generation are defined here. # # Note that the symbol LOADLIBES refers to the list of library files # which may be target dependent. # # --------------------------------------------------------------------------- ifndef __JMAKERULES__ __JMAKERULES__=$(lastword $(MAKEFILE_LIST)) include $(JPP_DIR)/make/JMakedefines $(JPP_BIN): $(MKDIR) $@ $(JPP_LIB): $(MKDIR) $@ $(JPP_DOC): $(MKDIR) $@ $(JPP_BIN)%: % $(INSTALL) $(INSTALL_XMODE) $^ $@ $(JPP_LIB)%: % $(INSTALL) $(INSTALL_MODE) $^ $@ $(JPP_DOC)%: % $(INSTALL) $^ $@ %: %.o $(CXX) $(LDFLAGS) $^ $(filter-out $(JPP_LIBS), $(LOADLIBES)) $(findstring $(JPP_LIBS), $(LOADLIBES)) -o $@ %.o: %.cc %.d $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MT $@ -MMD -MP -MF $*.d -DSOURCE=\"$(CURDIR)/$<\" -c -o $@ $< %.so: $(CXX) $(LDFLAGS) $(SOFLAGS) -o $@ $^ %.PDF: %.tex @if [ "`egrep -l gitstyle $<`" == $< ]; then \ echo -n "\\newcommand{\\GITAUTHOR}{\\texttt{" > $(basename $<).gitstyle; \ git --no-pager log --reverse --pretty="format:%ct '%an'" $< |\ sort -k 2 -uf |\ sort -k 1 -g |\ awk -F "'" '{ if (NR > 1) {printf ", "}; printf "%s", $$2}' >> $(basename $<).gitstyle; \ echo "}}" >> $(basename $<).gitstyle; \ git log -n1 --pretty='tformat:\newcommand{\GITCOMMITDATE}{\texttt{%cd}}' --date=format:'%Y-%m-%d %H:%M:%S' $< >> $(basename $<).gitstyle; \ git log -n1 --pretty='tformat:\newcommand{\GITCOMMITNAME}{\texttt{%cn}}' $< >> $(basename $<).gitstyle; \ git log -n1 --pretty='tformat:\newcommand{\GITCOMMITMAIL}{\texttt{%ce}}' $< >> $(basename $<).gitstyle; \ fi $(PDFLATEX) $< if [ -f $(basename $<).bib ]; then \ $(BIBTEX) $(basename $<); \ fi $(PDFLATEX) $< $(PDFLATEX) $< @mv $(basename $<).pdf $@ %.PDF: %.pptx $(LIBREOFFICE) $^ %.PDF: %.docx $(LIBREOFFICE) $^ %.TEX: %.tex $(CP) $^ $@ %.PPTX: %.pptx $(CP) $^ $@ %.DOCX: %.docx $(CP) $^ $@ endif