Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Simple Regex Question / Code Review

by Anonymous Monk
on Oct 11, 2012 at 15:54 UTC ( #998486=note: print w/replies, xml ) Need Help??

in reply to Simple Regex Question / Code Review

Why not use make(1)? Here's a trivial makefile (save as Makefile):

foo: foo.o bar: bar.o baz: baz.o

After that, say make foo bar baz to compile all three binaries, if they are out of date.

You can even programmatically generate those lines with gcc -MM *.c

(The makefile I gave is not really complete, but might be enough. For further information, I recommend the document titled PMake -- a tutorial)

Replies are listed 'Best First'.
Re^2: Simple Regex Question / Code Review
by marquezc329 (Scribe) on Oct 12, 2012 at 00:29 UTC
    Thanks! While I do understand that there is always going to be more than one or two ways of accomplishing a task in Perl, as well as in *nix systems in general, I was attempting to accomplish this particular task primarily as an exercise in my Perl scripting. Thank you for the reference though. Google'd + Bookmarked; I've never quite understood makefiles, and now you've inspired me to investigate.

      Make felt pretty impenetrable to me, too, as every example makefile I saw was usually a minimum of 20-30 lines.

      The tutorial I linked you to is quite heavy. I would read up to chapter 3.1 (skip 2.7) -- that covers the essentials.

      Anyway, I must warn you that PMake ("BSD Make") is not GNU Make. The latter can be found on pretty much every Linux system, and the most noticeable difference between them is the variable names. I find PMake's variables to be named much nicer ($(.TARGET)vs$@ or $(.IMPSRC)vs$<)

      Anyway, you can manage without touching those variables, and I recommended that tutorial because it does a good job in explaining the basics.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998486]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2018-03-25 03:52 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (300 votes). Check out past polls.