Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6795555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:21:36+00:00 2026-05-26T18:21:36+00:00

I have a bit of file processing to do in Automake and can’t figure

  • 0

I have a bit of file processing to do in Automake and can’t figure out how to do it correctly (using either automake rules of gnu make extensions). For example, I have a file called refName.in and wish to produce the output refName.out. I have two relevant command-lines:

produce-out refName.in refName.out
produce-deps refName.in

The first simply takes the input file and produces the output. The second provides a list of dependencies for the file.

What am I supposed to do in Automake to get this setup working? I wish to have full dependency tracking, such that if any file in the list produced by produce-deps will trigger produce-out to be called.

(NOTE: I have no problem changing how these commands work. One command can produce the output and dependencies if needed. Different command-line switches, etc. can also be modified.)

(PS: If need be a GNU make extension is totally okay. I already use patterned rules in the Makefile.am and other extensions.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:21:37+00:00Added an answer on May 26, 2026 at 6:21 pm

    The only automake specific thing you need for this is to add the built file to BUILT_SOURCES:

    BUILT_SOURCES := refName.out
    
    # You might well want refName.in in EXTRA_DIST
    EXTRA_DIST := refName.in
    
    # then any standard Make rules will do:
    refName.out: refName.in $(shell produce-deps refName.in)
            produce-out refName.in refName.out
    

    If you want a more sophisticated way of doing the dependencies you can use these rules with GNU make’s include, which will only cause produce-deps to be run when refName.deps is missing or refName.in changes:

    refName.deps: refName.in
            echo 'ref-deps := "' $(shell produce-deps refName.in) '"' > refName.deps
    
    include refName.deps
    
    refName.out: refName.in $(ref-deps)
            produce-out refName.in refName.out
    

    You can make these rules generic with the usual GNU make % rules.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bit of xml file named Sample.xml which is shown below <?xml
ok i got this problem. i have this routes: (code bit change) File:/home/dotcloud/current/config/routes.js exports.routes
I have a text file that looks a bit like: random text random text,
I have a file called bbUI.js which contains this bit of JavaScript. Outside of
I have to read/write an XML file that stores its data as bit masked
gcc 4.4.2 c89 I have a wave file: 8000 Hz 16 bit I am
I have a huge line-separated text file and I want to make some calculations
I'm trying to copy a string using 16-bit assembly. I have (among other things)
I have a large set of strings that I'm using for natural language processing
I have an application where a bit of parallel processing would be of benefit.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.