04-28-07 06:18 PM
desktop <fff@sss.com> writes:
> I have a folder "test" containing the folder "pic" where I put some
> .eps files now and then. In the test folder I would like to put a
> makefile that converts the .eps files to .pdf files (using epstopdf)
> IF new .eps files are added or if they have changed.
>
> Is it possible to use make for this??
Yes.
> The problem is that it should find out what the filenames are:
>
> <newfile>.eps:
> epstopdf <newfile>.eps
>
>
> But I don't know how to make this, any ideas?
[pjb@thalassa t]$ cat Makefile
.SUFFIXES: .pdf .eps
.eps.pdf: ; epstopdf $<
SRC=$(shell echo *.eps)
EPS=$(SRC:.eps=.pdf)
all:$(EPS)
[pjb@thalassa t]$ ls
./ ../ Makefile a.eps b.eps c.eps
[pjb@thalassa t]$ make -n
epstopdf a.eps
epstopdf b.eps
epstopdf c.eps
[pjb@thalassa t]$
--
__Pascal Bourguignon__ http://www.informatimago.com/
PLEASE NOTE: Some quantum physics theories suggest that when the
consumer is not directly observing this product, it may cease to
exist or will exist only in a vague and undetermined state.
[ Post a follow-up to this message ]
|