Date: Mon, 8 Jun 2009 22:12:17 +0200 From: Roland Smith <rsmith@xs4all.nl> To: Lars Eighner <luvbeastie@larseighner.com> Cc: freebsd-questions@freebsd.org Subject: Re: General and specific make questions Message-ID: <20090608201217.GD34213@slackbox.xs4all.nl> In-Reply-To: <20090607235205.H85986@qroenaqrq.6qbyyneqvnyhc.pbz> References: <20090607235205.H85986@qroenaqrq.6qbyyneqvnyhc.pbz>
next in thread | previous in thread | raw e-mail | index | archive | help
--n/aVsWSeQ4JHkrmm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 07, 2009 at 11:52:17PM -0500, Lars Eighner wrote: >=20 > What I need most is to find (a) make tutorial(s) that do not suppose make= is > being used for compling c/c++ programs. Yes, I know, that is mostly why > make exists, but many tutorials plunge right into C examples with implici= t C > rules, while -- it seems to me -- make could be much more useful for a > variety of things, and I could sure use more of the general and arbitrary > examples. I use make to e.g. build complex LaTeX documents with included gnuplot graphs. Works like a charm. But that it is not conceptually different =66rom compiling a C program. =20 > I have some sources which may or may not exist. My target should be rebu= ilt > if a source exists that is younger than the target. But sources that do > not exist should be ignored and make should not be perplexed over how to > create them. How do I express that kind of relationship? I use the following to create PDFs from gnuplot files without enumerating them beforehand. Maybe that is what you're looking for? ----- Makefile fragment ----- # See SPECIAL TARGETS in make(1) =2EPHONY: all clean =2ESUFFIXES: .eps .pdf .gp .d # See VARIABLE ASSIGNMENTS in make(1) GP!=3Dls *.gp|sed -e 's/\.gp/\.pdf/g' all: ${GP} # Suffix-transformation rule. See chapter 3 in the PMake tutorial=20 # (/usr/share/doc/psd/12.make/paper.ascii.gz) =2Egp.pdf:=20 gnuplot $*.gp 2>&- epstopdf $*.eps rm -f $*.eps *.log clean: rm -f *.log *.pdf *.eps ----- Makefile fragment ----- Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --n/aVsWSeQ4JHkrmm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkotcKEACgkQEnfvsMMhpyVXIgCfWhqX4yHUuVKzJIu5PjawL8OY mOEAnj1qPbWapcimQ7s3kugeVz8p4pZb =DLfC -----END PGP SIGNATURE----- --n/aVsWSeQ4JHkrmm--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090608201217.GD34213>