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

  • SEARCH
  • Home
  • 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 8402977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:13:18+00:00 2026-06-09T22:13:18+00:00

I am writing a PHP extension. config.m4 generates the Makefile, but I want to

  • 0

I am writing a PHP extension. config.m4 generates the Makefile, but I want to include, at the begin of this Makefile another Makefile. (e.g.: "-include Makefile.local").

I don’t want to do it in the Makefile itself, since configure will recreate it and erase my changes when invoked.

How can I do it from config.m4?

  • 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-06-09T22:13:20+00:00Added an answer on June 9, 2026 at 10:13 pm

    Try this in config.m4:

    AC_CONFIG_COMMANDS_PRE([cat >Makefile.tmp <<EOF
    -include MyInclude1
    -include MyInclude2
    EOF
    cat Makefile >> Makefile.tmp
    mv -f Makefile.tmp Makefile])
    

    Your Makefile should now look like:

    -include MyInclude1
    -include MyInclude2
    srcdir = /path/to/source/dir
    ...
    

    …after running configure.

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

Sidebar

Related Questions

I am writing a Makefile by hand to create a PHP extension lib using
On writing an extension for php (5.3) i want to access the zend_class_entry pointer
Writing a PHP extension in C, I want to convert a userland object (
Often when writing PHP I'll have it output some HTML like this - echo
Im writing a php script to compare the similarity of 2 strings. This works
I am writing a PHP code that creates another PHP file with fopen and
I am thinking of writing a PHP extension library that will use the memcached
I have written a PHP extension library in C++. I am writing the extension
Okay, I've written my first functional PHP extension. It worked but it was a
I read it's possible to use C/C++ code in PHP by writing an extension.

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.