[Dev OpenGP] [136] Image treatments in Makefile

[ Thread Index | Date Index | More opengp.tuxfamily.org/development Archives ]


Revision: 136
Author:   alband85
Date:     2009-03-27 04:22:21 +0100 (Fri, 27 Mar 2009)

Log Message:
-----------
Image treatments in Makefile

Modified Paths:
--------------
    externals/Com/Rapport/Makefile

Removed Paths:
-------------
    externals/Com/Rapport/clean-mpfigs.sh
    externals/Com/Rapport/clean-svgfigs.sh
    externals/Com/Rapport/svg2png.sh


Modified: externals/Com/Rapport/Makefile
===================================================================
--- externals/Com/Rapport/Makefile	2009-03-27 03:05:53 UTC (rev 135)
+++ externals/Com/Rapport/Makefile	2009-03-27 03:22:21 UTC (rev 136)
@@ -1,5 +1,3 @@
-
-
 FILE=rapport.tex
 PDFFILE=rapport.pdf
 PWD:=$(shell pwd)
@@ -8,25 +6,33 @@
 RM=rm -vf
 PDFLATEX=pdflatex -interaction=nonstopmode "-output-directory=$(TEXFILES)"
 
+INKSCAPE=`which inkscape`
+SVG2PNG=$(INKSCAPE) --without-gui --export-area-drawing --file="$file" --export-png="$FILENAME" --export-dpi=600
+
 all: figs pdf
 
 figs: svgfigs 
 
 svgfigs:
-	./svg2png.sh "$(FIGURES)"
+	@if [ -z "$(INKSCAPE)" ]; then\
+		echo "Error: Inkscape not found!";\
+		exit 1;\
+	fi
+	files=`find .|grep -i '\.svg$$'`;\
+	for file in $$files; do\
+		$(INKSCAPE) --without-gui --export-area-drawing --file="$$file" --export-png="`echo "$$file" | sed "s/\.svg$$/.png/i"`" --export-dpi=600;\
+	done
 
-mpfigs:
-	./figures/uml/mp2pdf.sh "$(FIGURES)/uml"
+clean-figs: clean-svgfigs
 
-clean-figs: clean-svgfigs clean-mpfigs
-
 clean-svgfigs:
-	./clean-svgfigs.sh "$(FIGURES)"
+	for file in `find .|grep -i '\.svg$$'`; do \
+		filename=`echo "$$file" | sed "s/\.svg$$/.png/i"`; \
+		if [ -f "$$filename" ]; then \
+			rm -v $$filename; \
+		fi \
+	done
 
-clean-mpfigs:
-	@echo "Skipping MP clean"
-	#./clean-mpfigs.sh "$(FIGURES)"
-
 clean:
 	cd "$(TEXFILES)" ; ${RM} *~ *.nav *.snm *.aux *.out *.log *.toc *.dvi *.pdf *.lof *.lot *.tex.backup
 
@@ -37,7 +43,7 @@
 	${PDFLATEX} "${FILE}" || exit 1 ; ${PDFLATEX} "${FILE}"
 
 biblio:
-	echo "TODO"
+	@echo "TODO"
 
 .PHONY: all clean clean-figs mrproper clean-svgfigs clean-mpfigs
 

Deleted: externals/Com/Rapport/clean-mpfigs.sh
===================================================================
--- externals/Com/Rapport/clean-mpfigs.sh	2009-03-27 03:05:53 UTC (rev 135)
+++ externals/Com/Rapport/clean-mpfigs.sh	2009-03-27 03:22:21 UTC (rev 136)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-if [ -z $1 ]
-then
-	echo "Usage: $0 directory"
-	exit 1
-fi
-
-PWD=$1
-cd "$PWD"
-EXTENSION=".png"
-
-echo "Cleaning bitmap figures in $PWD"
-
-for file in `find .|grep -i '\.svg$'`
-do
-	#FILENAME=`basename "$file" .svg`
-	FILENAME=`echo "$file" | sed "s/\.svg$/$EXTENSION/i"`
-	echo "$FILENAME"
-	if [ -f "$FILENAME" ]
-	then
-		rm "$FILENAME"
-	fi
-done
-
-exit 0

Deleted: externals/Com/Rapport/clean-svgfigs.sh
===================================================================
--- externals/Com/Rapport/clean-svgfigs.sh	2009-03-27 03:05:53 UTC (rev 135)
+++ externals/Com/Rapport/clean-svgfigs.sh	2009-03-27 03:22:21 UTC (rev 136)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-if [ -z $1 ]
-then
-	echo "Usage: $0 directory"
-	exit 1
-fi
-
-PWD=$1
-cd "$PWD"
-EXTENSION=".png"
-
-echo "Cleaning bitmap figures in $PWD"
-
-for file in `find .|grep -i '\.svg$'`
-do
-	#FILENAME=`basename "$file" .svg`
-	FILENAME=`echo "$file" | sed "s/\.svg$/$EXTENSION/i"`
-	echo "$FILENAME"
-	if [ -f "$FILENAME" ]
-	then
-		rm "$FILENAME"
-	fi
-done
-
-exit 0

Deleted: externals/Com/Rapport/svg2png.sh
===================================================================
--- externals/Com/Rapport/svg2png.sh	2009-03-27 03:05:53 UTC (rev 135)
+++ externals/Com/Rapport/svg2png.sh	2009-03-27 03:22:21 UTC (rev 136)
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-if [ -z "$1" ]
-then
-	echo "Usage: $0 directory"
-	exit 1
-fi
-
-INKSCAPE=`which inkscape`
-if [ -z "$INKSCAPE" ]
-then
-	echo "Error: Inkscape not found!"
-	exit 1
-fi
-
-PWD="$1"
-cd "$PWD"
-echo "Converting into PNG all SVG files in $PWD"
-
-for file in `find .|grep -i '\.svg$'`
-do
-	#FILENAME=`basename "$file" .svg`
-	EXTENSION=".png"
-	FILENAME=`echo "$file" | sed "s/\.svg$/$EXTENSION/i"`
-	#$INKSCAPE -z --file="$file" --export-png="$FILENAME$EXTENSION" --export-dpi=300
-	$INKSCAPE --without-gui --export-area-drawing --file="$file" --export-png="$FILENAME" --export-dpi=600
-done
-
-exit 0


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/