[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: batch printing



I had a chance to go and figure this all out, and here is the
resulting make file which I am using (thanks Ben and Peter for the
tips here). I'm sure this can be greatly improved to be more flexible
and use more of make's built in macros and so on.

=====

PROJNAME = project1
SHEETS = sheet1.sch sheet2.sch sheet3.sch sheet4.sch

open: $(SHEETS)
	gschem $(SHEETS)

printpdf: $(PROJNAME).ps
	ps2pdf -dOptimize=true -dUseFlateCompression=true -sPAPERSIZE=a4 $<
$(PROJNAME).pdf

$(PROJNAME).ps : printps

printps: $(SHEETS)
	rm -f ONEPAGE.ps
	rm -f $(PROJNAME).ps
	for S in $(SHEETS); \
	do \
	gschem -q -p -o ONEPAGE.ps -s$(HOME)/geda/share/gEDA/scheme/print.scm $$S; \
	cat ONEPAGE.ps; done > $(PROJNAME).ps
	rm -f ONEPAGE.ps

=====

I set gschem's default page printing to A4 by modifying
system-gschemrc to set the default paper size to A4.

Like I said, I'm sure there is room for improvement in the Makefile.
Would it be possible to setup a simple Makefile that would act as a
project management file? As I have it above, all that is needed is a
project name and the sheets for the project. Making a netlist could be
added by adding a "netlist" make rule, and so on.

Anyone interested in contributing to this?


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user