Hi,

I am trying to make a makefile to convert PDFs in a directory to 4-up PDFs using psnup but I am not able to.

I have L??N.pdf files in a directory and wish to produce a corresponding 4-up PDF for each file named L??N-4up.pdf.

I have a shell script which converts all L??N.pdf files to 4up PDF files:
#########################################################
#!/bin/bash

if (( $# != 1 )); then
        echo "Usage: $0 <pdf file>"
        exit -1
fi

#get the base name of the file
bn=`basename $1 .pdf`

#use acroread to get the PS of the file. acroread gives smaller PS
#files than pdf2ps!
acroread -toPostScript $1

#now convert the PS file to 4up and then to the final PDF version
psnup -m0.5cm -l -Pletter -pletter -4 ${bn}.ps | ps2pdf - ${bn}-4up.pdf

#delete the intermediate ps file
rm -f ${bn}.ps
###############################################################


This works great, but using a makefile would be even better, won't need to run the script on all PDF in a directory if only a few are revised.

Here is my dismal attempt at making a makefile:
#########################################################
SRC=$(wildcard L??N.pdf)
OBJS=$(patsubst  %N.pdf,%N-4up.pdf,$(wildcard L??N.pdf))

#reset recognized suffixes
.SUFFIXES: N.pdf N-4up.pdf

#%N-4up.pdf: %N.pdf
#       echo 'making #> #@'

%N-4up.pdf: %N.pdf
        echo "making $@ from $?"


4ups: *N-4up.pdf
#########################################################

Any help in making this makefile is greatly apprecaited.
Thanks,
->HS

--
(Remove all underscores,if any, from my email address to get the correct one. Apologies for the inconvenience but this is to reduce spam.)



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to