Re: General and specific make questions
On Tue, 9 Jun 2009 16:31:42 +0200 (CEST) Wojciech Puchar said: > >> Correct. I do the same here. > > > > I also do use make to produce LaTeX documents. I even `published' my > > collection of makefiles at https://gna.org/projects/bsdmakepscripts/ > > make is universal too, as many other unix tools. for example i use make > and cpp (C preprocessor) for making HTML pages :) Yep. On the old DG/SCO (spit) box I used to admin; I used a makefile to generate the Sales, Inventory, AR, AP, etc. reports every day. if SGDSR.SP out of date or missing? then run script to spool it to disk. if ARAGE.SP out of date or missing? then run script ... etc. ... -- Don Readdon_r...@att.net It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: General and specific make questions
Correct. I do the same here. I also do use make to produce LaTeX documents. I even `published' my collection of makefiles at https://gna.org/projects/bsdmakepscripts/ make is universal too, as many other unix tools. for example i use make and cpp (C preprocessor) for making HTML pages :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: General and specific make questions
On Tuesday 09 June 2009 04:18:10 Grünewald Michaël wrote: > Le 8 juin 09 à 23:20, Polytropon a écrit : > > On Mon, 8 Jun 2009 22:12:17 +0200, Roland Smith > > > > wrote: > >> On Sun, Jun 07, 2009 at 11:52:17PM -0500, Lars Eighner wrote: > >>> 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 > >>> implicit 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 > >> from compiling a C program. > > > > Correct. I do the same here. > > I also do use make to produce LaTeX documents. I even `published' my > collection of makefiles at https://gna.org/projects/bsdmakepscripts/ And I'm using a heavily customized version of this CA setup: http://sial.org/howto/openssl/ca/ -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: General and specific make questions
Le 8 juin 09 à 23:20, Polytropon a écrit : On Mon, 8 Jun 2009 22:12:17 +0200, Roland Smith wrote: On Sun, Jun 07, 2009 at 11:52:17PM -0500, Lars Eighner wrote: 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 implicit 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 from compiling a C program. Correct. I do the same here. I also do use make to produce LaTeX documents. I even `published' my collection of makefiles at https://gna.org/projects/bsdmakepscripts/ There is some terse indications for using these makefiles in a TeX document: http://home.gna.org/bsdmakepscripts/tex.html (much more need to be written as usual). An interesting feature of these scripts is the good integration of METAPOST and BIBTEX (this is not yet exemplified). As you have guessed, make can be used for much more than C files compilation, but as it has been pointed out, these other uses are not conceptually different from the `C-case'. In fact in the typical way of using a UNIX-like workstation, data is processed through a stack of elementary treatments in order to obtain a final object (whether it is a program, a PostScript file or a full web site). This is why make can be viewed as the central part of the work with a UNIX-like workstation (sharing its place with an editor of your choice). -- All the best, Michaël ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: General and specific make questions
On Mon, Jun 08, 2009 at 01:58:57PM -0400, Chuck Robey typed: > Lars Eighner wrote: > > > > I have some sources which may or may not exist. My target should be > > rebuilt > > 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? Have a look at /etc/mail/Makefile. I think that does what you want, e.g. it will rebuild the genericstable.db, but only if the genericstable file exists and is newer. Ruben ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: General and specific make questions
On Mon, 8 Jun 2009 22:12:17 +0200, Roland Smith wrote: > On Sun, Jun 07, 2009 at 11:52:17PM -0500, Lars Eighner wrote: > > > > 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 implicit 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 > from compiling a C program. Correct. I do the same here. Additionally, I use make and Makefile to process HTML to "emulate SSI before uploading", which I do with - you already guessed it - with "make install" (uses ftp -u then), and "make deinstall" deletes stuff from the webserver. :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: General and specific make questions
On Sun, Jun 07, 2009 at 11:52:17PM -0500, Lars Eighner wrote: > > 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 implicit 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 from compiling a C program. > I have some sources which may or may not exist. My target should be rebuilt > 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) .PHONY: all clean .SUFFIXES: .eps .pdf .gp .d # See VARIABLE ASSIGNMENTS in make(1) GP!=ls *.gp|sed -e 's/\.gp/\.pdf/g' all: ${GP} # Suffix-transformation rule. See chapter 3 in the PMake tutorial # (/usr/share/doc/psd/12.make/paper.ascii.gz) .gp.pdf: gnuplot $*.gp 2>&- epstopdf $*.eps rm -f $*.eps *.log clean: rm -f *.log *.pdf *.eps - Makefile fragment - Roland -- 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) pgpgC8luAFOjC.pgp Description: PGP signature
Re: General and specific make questions
Lars Eighner wrote: > > 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 > implicit 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. > > Second, it appears to me that the pmake document in the books section of > the > documentation is not longer in sync with make as actually installed in > FreeBSD 7.x. In particular, the pmake doc refers to switches which make no > longer recognizes and which do not have clear replacements in man make. > > Now for my particular question. > > I have some sources which may or may not exist. My target should be > rebuilt > 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? > OK, first, about those docs in /usr/share/doc/{psd|smm|usd|others}, they all come from the original papers written by the CSRG folks well before FreeBSD was created. They are somewhat useful, so for that (and sheer historical interest) they're kept around, but they aren't updated. If you wanted to see updated stuff, try the man page, which is both constantly updated and complete in it's coverage. OK, for your "particular question", it's honestly not real clear what you're asking ... are you asking how to tell make NOT to make something? I'll make a guess here, and lay the guess out for you to comment on, maybe asking you to reconsider your question might have the side effect of making the answer be obvious? Anyhow, maybe you have a target that has a dependency listed for it, but make(1) doesn't have rules on how to remake that dependency, and either make(1) can't find it, or does find it, but finds that the time stamps of that dependency shows it has to be remade. One easy way to fix that would be to do a "touch" (read the man page on touch for info) that dependency, which should cause make(1) to lose interest in rebuilding it. I couldn't get more exact without having a better idea of what's happening. Oh, BTW, about applications of make for other than C progs. Using make(1) to compile other things, like maybe python progs, or whatever, is fairly obvious that it can be handled just like the C progs. Yes, you CAN use make(1) for non-compilation tasks, but I've never seen any documentation for that beyond the make(1) man page. In fact, the only example of doing that which I've even seen was helping NIS to maintain itself. Two things about make(1): first, it's very widely terrified programmers, but (secondly) it's really not all that complex, so it's actually frightening everyone based upon it's reputation. Well, that, and the one truly poor makefile I've ever seen, that one defaulted to by all of the autoconf tools (the gcc Makefile is an example of this, it's too bad to be described without using foul language). It doesn't have to be that way, but it does a fine job of scaring everyone away from make(1). ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
General and specific make questions
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 implicit 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. Second, it appears to me that the pmake document in the books section of the documentation is not longer in sync with make as actually installed in FreeBSD 7.x. In particular, the pmake doc refers to switches which make no longer recognizes and which do not have clear replacements in man make. Now for my particular question. I have some sources which may or may not exist. My target should be rebuilt 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? -- Lars Eighner http://www.larseighner.com/index.html 8800 N IH35 APT 1191 AUSTIN TX 78753-5266 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"