From owner-freebsd-questions@FreeBSD.ORG Mon Jun 8 20:12:20 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE16F1065672 for ; Mon, 8 Jun 2009 20:12:20 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr14.xs4all.nl (smtp-vbr14.xs4all.nl [194.109.24.34]) by mx1.freebsd.org (Postfix) with ESMTP id 492E08FC08 for ; Mon, 8 Jun 2009 20:12:20 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr14.xs4all.nl (8.13.8/8.13.8) with ESMTP id n58KCIxt065582; Mon, 8 Jun 2009 22:12:18 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id DDC8FBA8B; Mon, 8 Jun 2009 22:12:17 +0200 (CEST) Date: Mon, 8 Jun 2009 22:12:17 +0200 From: Roland Smith To: Lars Eighner Message-ID: <20090608201217.GD34213@slackbox.xs4all.nl> References: <20090607235205.H85986@qroenaqrq.6qbyyneqvnyhc.pbz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="n/aVsWSeQ4JHkrmm" Content-Disposition: inline In-Reply-To: <20090607235205.H85986@qroenaqrq.6qbyyneqvnyhc.pbz> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: General and specific make questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 20:12:21 -0000 --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--