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 4108628
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:41:06+00:00 2026-05-20T21:41:06+00:00

Problem: I have a project which I’m porting from Solaris/Lex/Yacc to Linux/Flex/Bison + Autotools.

  • 0

Problem:

I have a project which I’m porting from Solaris/Lex/Yacc to Linux/Flex/Bison + Autotools.
I’m running into the following issue, and I wonder if anyone out there knows how to get around it. Given a target like so (only necessary details included):

bin_PROGRAMS=my_prog

my_prog_YFLAGS=-d
my_prog_SOURCES=\
   main.cpp \
   parser.ypp \
   scanner.lpp

Automake is generating the following source files from the lpp and ypp:

  • scanner.lpp -> scanner.cpp (as per Automake manual)
  • parser.ypp -> my_prog-parser.cpp and my_prog-parser.h (why?)

Attempted Solutions:

Using bison’s -b and -o options to alter output file names. The problem with this is that automake appears to assume default output names (parser.tab.c) and move the files with a script. If I alter the output file names with bison, the build fails when automake attempts to rename the files that aren’t there.

Is there some option or something I am missing?

  • 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-20T21:41:07+00:00Added an answer on May 20, 2026 at 9:41 pm

    Solution:

    So it took me actually reading through the automake source itself (for the curious, look at the handle_single_transform function). If there are per-target options specified for a given source-type, automake automatically prepends the project name to any generated files.

    Therefore, changing:

    my_prog_YFLAGS=-d
    

    to

    AM_YFLAGS=-d
    

    Causes automake to properly generate rules causing parser.ypp to generate:

    • parser.cpp
    • parser.h
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem in my project with the .designer which as everyone know
Problem: I have an address field from an Access database which has been converted
I’m having a little Architecture problem. In my project I have a Business Logic
Problem I have timestamped data, which I need to search based on the timestamp
Problem: We have a web app that calls some web services asynchronously (from the
I have a django project, and a problem - it eats a lot of
I have a Class Library project which houses some shared code between other projects
I am doing a project which searches a specific member from my database searching
I have a strange problem with VS2008. My solution has 8 projects (all c#)
I have just started learning Erlang and am trying out some Project Euler problems

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.