View Single Post
  #2   (View Single Post)  
Old 17th December 2016
J65nko J65nko is offline
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,503

I have used make(1) for simple web pages and XML/XSLT transformations, and creating post-install shell command files from small shell min-blocks. I never did a recursive Makefile, but I think something like this should do it ....

cd subdirA && make
cd subdirB && make
cd subdirC && make
Or a loop using a make .for loop:

You can find some examples of this the directory that is included in most OpenBSD makefiles. (I am on a Linux system right now, so I am not sure that it the right directory name ...)

Although the FreeBSD and OpenBSD versions of make(1) have some differences I learned a lot from PMake — A Tutorial by Adam de Boor. His counsel "Variables are your friend" helped me a very much to do what I wanted to achieve.

For your complicated "making" you also could use make or the shell to generate a customized Makefile and then have it run.

For your target files in one place you could use:

Path to the directory where targets are built. At startup, make searches for an alternate directory to place target files. make tries to chdir(2) into MAKEOBJDIR (or obj if MAKEOBJDIR is not defined), and sets .OBJDIR accordingly. Should that fail, .OBJDIR is set to .CURDIR.
as described in make(1)
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote