Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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)


Comment on Re: Simple Regex Question / Code Review
Select or Download Code
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998486]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-12-27 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls