Sponsored Content
Top Forums UNIX for Dummies Questions & Answers epstopdf for multiple files using makefile Post 302402186 by wwoord on Tuesday 9th of March 2010 07:05:35 AM
Old 03-09-2010
Bug epstopdf for multiple files using makefile

Greetings!

I'm fairly new to the unix world and I hope someone here can help me with my question. I'm using a Makefile to run a few programs and the final output is several .eps files. However I need them to be .pdf files, so I want to use epstopdf to convert the files.

Since I'm already using a Makefile I'd like to just add an extra line to the file, so I tried:
Code:
convert:
  epstopdf `find -name '*eps'`

however this doesn't work, because epstopdf has too many inputfiles! Any help in how to change this such that epstopdf is called for all the .eps files separately is much appreciated. I still want to be able to just add a (few) lines to my Makefile though.

Cheers!

wwoord

---------- Post updated at 12:40 PM ---------- Previous update was at 12:30 PM ----------

Hi all,

problem solved already, by looking in to other threads on this forum with similar problems. I changed the code to:
Code:
convert:
  ls *.eps | awk '{system("epstopdf "$0 )}'

now epstopdf is called for each .eps file one at a time.

Cheers!

---------- Post updated at 01:05 PM ---------- Previous update was at 12:40 PM ----------

Hi all,

just a quick update, the command I posted works fine:
Code:
ls *.eps | awk '{system("epstopdf "$0 )}'

however in a makefile $ is interpreted as a user variable, so this doesn't work:
Code:
convert: 
  ls *.eps | awk '{system("epstopdf "$0 )}'

adding an extra $ fixes this and now it works fine if called from a makefile!
Code:
convert: 
  ls *.eps | awk '{system("epstopdf "$$0 )}'

 

10 More Discussions You Might Find Interesting

1. Solaris

Makefile:57: *** multiple target patterns. Stop.

Hi, I am getting the following error while building on Solaris 64 , while I am trying to build. Error Snippet :- ---------------------- Makefile:57: *** multiple target patterns. Stop. make: Leaving directory `/work1/patch/vds6053sun64o/vobs/jvi' make: *** Error 2 make: Leaving directory... (0 Replies)
Discussion started by: nileshborate
0 Replies

2. UNIX for Advanced & Expert Users

Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error: make: module: command not found Why is this? Is there any way to run this command in a Makefile? NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies

3. Programming

Makefile: multiple target variable substitution

Greetings! Basically, I would like to properly handle this with gnu make: alltools: my_tool mysecond_tool mythird_tool etc_tool %_tool: dir1/%_tool.vf dir2/%_tool/subdir2/%_tool.ver <tab>@echo done %.vf: <tab>RUN_VF $* %.ver: <tab>RUN_VER $* So, if I were to do something like:... (0 Replies)
Discussion started by: Harlinator
0 Replies

4. Shell Programming and Scripting

Multiple script lines into a Makefile

Hi All I am creating a makefile and I want to do a clean section. In the clean section I would like to check if the file exists and then delete it. I always have an error 'unexpected end of file' What's wrong in it? Thanks msntn firstCpp: first.cpp g++ -o first first.cpp clean: ... (1 Reply)
Discussion started by: manustone
1 Replies

5. UNIX for Dummies Questions & Answers

epstopdf etc. commands

guys I would like to have more commands (as epstopdf) as this e.g. jpgtogif etc. how can I install them? where I need to have a look on it... I use MacOSX (1 Reply)
Discussion started by: c_lady
1 Replies

6. UNIX for Advanced & Expert Users

makefile head-scratcher: multiple targets in one go

Hi! I've got a build process where scripts create multiple targets from their sources. But here I'm running into a conceptual problem of GNU make: If one has multiple targets in a dependency, make applies the rules once for every target that is out of sync - which is correct for normal... (3 Replies)
Discussion started by: treczoks
3 Replies

7. Homework & Coursework Questions

Help with Simple Multi-Level Makefile (Extremely New at Makefile)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies

8. Programming

Makefile for building multiple programs

I have the following part of a makefile and want to simplify it using rules rather than having to code the same two blocks when I need ti build another program. An having difficulty doing it all: 1dvel2 1dvel 2dvel ... (8 Replies)
Discussion started by: kristinu
8 Replies

9. Shell Programming and Scripting

Help: Makefile with multiple executables

I am trying to create executables for the following files Currently, I am making 9 different directories for for each. I would like to make 1 directory but everytime I try it does not work. CROSS_COMPILE?= # CROSS_COMPILE used to = arm-arago-linux-gnueabi... (1 Reply)
Discussion started by: bpetersen
1 Replies

10. Shell Programming and Scripting

Makefile with multiple executables

CROSS_COMPILE?= LIBDIR_APP_LOADER?=../../../../app_loader/lib INCDIR_APP_LOADER?=../../../../app_loader/include BINDIR?=../../bin CFLAGS+= -Wall -I$(INCDIR_APP_LOADER) -D__DEBUG -O2 -mtune=cortex-a8 -march=armv7-a -std=gnu99 LDFLAGS+=-L$(LIBDIR_APP_LOADER) -lprussdrv -lpthread OBJDIR=obj... (1 Reply)
Discussion started by: bpetersen
1 Replies
PSTOPDF(1)							      ConTeXt								PSTOPDF(1)

NAME
pstopdf - convert EPS to PDF SYNOPSIS
pstopdf [ OPTION ... ] FILE [ ... ] DESCRIPTION
pstopdf converts EPS (encapsulated PostScript) to PDF. OPTIONS
--help Print usage and version information. --convert Convert EPS to PDF. This option is assumed if none is given. --method=string What method to use for bounding boxes when converting to PDF. Specify one of crop, bounded (the default), or raw. Older versions of ConTeXt used numerical methods (1, 2, or 3). --resolution=string The resolution to use when when converting to pdf. Specify one of low, normal, medium, high, printer, print, screen, ebook, or default. --request Handle exa request file. --watch Watch folders for conversions (untested). EXAMPLES
To make cow.pdf: pstopdf cow.eps or (one of several equivalents): pstopdf --convert cow.eps cow.pdf SEE ALSO
epstopdf(1), mptopdf(1), ps2pdf(1), texexec(1). ConTeXt wiki <http://www.contextgarden.net>. AUTHOR
This (incomplete) manual page was written by Sanjoy Mahajan <sanjoy@mit.edu>. It is in the public domain. pstopdf 2.0 December 2006 PSTOPDF(1)
All times are GMT -4. The time now is 03:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy