Thread: [complement-svn] SF.net SVN: complement: [1595] trunk/complement/explore/app/exam/doc/ requirements
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-07-02 11:54:14
|
Revision: 1595 http://svn.sourceforge.net/complement/?rev=1595&view=rev Author: complement Date: 2007-07-02 04:54:13 -0700 (Mon, 02 Jul 2007) Log Message: ----------- prototype for automation Added Paths: ----------- trunk/complement/explore/app/exam/doc/requirements/Makefile Added: trunk/complement/explore/app/exam/doc/requirements/Makefile =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/Makefile (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/Makefile 2007-07-02 11:54:13 UTC (rev 1595) @@ -0,0 +1,64 @@ +PDFNAMES = UseCaseSpec + +UseCaseSpec_SRC_TEX = UseCaseSpec.tex +UseCaseSpec_SRC_FIG = p1.fig p2.fig p3.fig p4.fig p5.fig debug-focus.fig + +all: UseCaseSpec.pdf + +OUTDIR = .out + +PDF_DIR_SRC = +FIG_BASE = +define pdf_ +PDF_DIR_SRC += $$(dir $${$(1)_SRC_TEX} $${$(1)_SRC_FIG} ) +FIG_BASE += $$(basename $${$(1)_SRC_FIG}) +$(1)_ALLMP := $$(addsuffix .mp,$$(basename $${$(1)_SRC_FIG} ) ) +$(1)_ALLMPS := $$(addsuffix .mps,$$(basename $${$(1)_SRC_FIG} ) ) +$(1)_ALL0 := $$(addsuffix .0,$$(basename $${$(1)_SRC_FIG} ) ) + +$(1)_MP := $$(addprefix $$(OUTDIR)/,$${$(1)_ALLMP}) +$(1)_MPS := $$($(1)_ALLMPS) +$(1)_0 := $$(addprefix $$(OUTDIR)/,$${$(1)_ALL0}) + +$(1).pdf: $$($(1)_SRC_TEX) $$($(1)_MPS) + pdflatex $$< +endef + +$(foreach pdf,$(PDFNAMES),$(eval $(call pdf_,$(pdf)))) + +# if sources disposed in several dirs, calculate appropriate rules + +DIRS_UNIQUE_SRC := $(dir $(SRC_FIG) $(SRC_TEX) ) +DIRS_UNIQUE_SRC := $(sort $(DIRS_UNIQUE_SRC) $(PDF_DIR_SRC)) + + +define rule_mp +$$(OUTDIR$(1))/%.mp: $(2)%.fig + $$(chdirs) + fig2dev -L mp $$< $$@ +endef + +define rule_mps +$(1).mps: $$(OUTDIR)/$(1).0 + ln -sf $$< $$@ + +$$(OUTDIR)/$(1).0: $$(OUTDIR)/$(1).mp + (cd ${OUTDIR}; mpost `basename $$<`) +endef + +define rules_m_ +$(call rule_mp,,$(1)) +endef + +$(foreach mps,${FIG_BASE},$(eval $(call rule_mps,$$(notdir $(mps))))) + +$(foreach dir,$(DIRS_UNIQUE_SRC),$(eval $(call rules_m_,$(dir)))) + +define chdirs +if [ ! -d ${OUTDIR} ]; then \ + mkdir -p ${OUTDIR}; \ +fi +endef + +.PHONY: dirs + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2008-02-27 14:22:56
|
Revision: 1821 http://complement.svn.sourceforge.net/complement/?rev=1821&view=rev Author: complement Date: 2008-02-27 06:22:44 -0800 (Wed, 27 Feb 2008) Log Message: ----------- use general solution Modified Paths: -------------- trunk/complement/explore/app/exam/doc/requirements/Makefile Modified: trunk/complement/explore/app/exam/doc/requirements/Makefile =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/Makefile 2008-02-27 14:18:59 UTC (rev 1820) +++ trunk/complement/explore/app/exam/doc/requirements/Makefile 2008-02-27 14:22:44 UTC (rev 1821) @@ -1,3 +1,13 @@ +# Time-stamp: <08/01/08 15:20:25 ptr> +# +# Copyright (c) 2007,2008 +# Petr Ovtchenkov +# +# Licensed under the Academic Free License version 3.0 +# + +SRCROOT := ../../../.. + PDFNAMES = ExamUseCaseSpec ExamUseCaseSpec_SRC_TEX = ExamUseCaseSpec.tex @@ -3,59 +13,3 @@ ExamUseCaseSpec_SRC_FIG = p1.fig p2.fig p3.fig p4.fig p5.fig debug-focus.fig -all: $(addsuffix .pdf,$(PDFNAMES)) - -OUTDIR = .out - -PDF_DIR_SRC = -FIG_BASE = -define pdf_ -PDF_DIR_SRC += $$(dir $${$(1)_SRC_TEX} $${$(1)_SRC_FIG} ) -FIG_BASE += $$(basename $${$(1)_SRC_FIG}) -$(1)_ALLMP := $$(addsuffix .mp,$$(basename $${$(1)_SRC_FIG} ) ) -$(1)_ALLMPS := $$(addsuffix .mps,$$(basename $${$(1)_SRC_FIG} ) ) -$(1)_ALL0 := $$(addsuffix .0,$$(basename $${$(1)_SRC_FIG} ) ) - -$(1)_MP := $$(addprefix $$(OUTDIR)/,$${$(1)_ALLMP}) -$(1)_MPS := $$($(1)_ALLMPS) -$(1)_0 := $$(addprefix $$(OUTDIR)/,$${$(1)_ALL0}) - -$(1).pdf: $$($(1)_SRC_TEX) $$($(1)_MPS) - pdflatex $$< -endef - -$(foreach pdf,$(PDFNAMES),$(eval $(call pdf_,$(pdf)))) - -# if sources disposed in several dirs, calculate appropriate rules - -DIRS_UNIQUE_SRC := $(dir $(SRC_FIG) $(SRC_TEX) ) -DIRS_UNIQUE_SRC := $(sort $(DIRS_UNIQUE_SRC) $(PDF_DIR_SRC)) - - -define rule_mp -$$(OUTDIR$(1))/%.mp: $(2)%.fig - $$(chdirs) - fig2dev -L mp $$< $$@ -endef - -define rule_mps -$(1).mps: $$(OUTDIR)/$(1).0 - ln -sf $$< $$@ - -$$(OUTDIR)/$(1).0: $$(OUTDIR)/$(1).mp - (cd ${OUTDIR}; mpost `basename $$<`) -endef - -define rules_m_ -$(call rule_mp,,$(1)) -endef - -$(foreach mps,${FIG_BASE},$(eval $(call rule_mps,$$(notdir $(mps))))) - -$(foreach dir,$(DIRS_UNIQUE_SRC),$(eval $(call rules_m_,$(dir)))) - -define chdirs -if [ ! -d ${OUTDIR} ]; then \ - mkdir -p ${OUTDIR}; \ -fi -endef - +include $(SRCROOT)/Makefiles/gmake/topdoc.mak This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |