help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I need help about make


From: Oleksandr Gavenko
Subject: Re: I need help about make
Date: Thu, 29 Nov 2012 21:25:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

On 2012-11-29, Philip Guenther wrote:

> On Wed, Apr 25, 2012 at 9:02 PM, address@hidden <address@hidden> wrote:
>>         hi,I have a question that when I use a command "make -p",it will 
>> print
>> a lot of default configuration,but I can't find the configuration file(I
>> want to change it for some reasons).So I would appreciate it if you tell
>> me where I can find the file or what's the file name.
>
> The default variables and rules are compiled into the make binary, so
> there is no file that you can edit to change them in the installed
> package.
>
> Changing the default rules locally would almost certainly be a Bad
> Idea.  If you don't want the default rules, invoke make with the -R
> option.  If you just want to alter them, then you should override them
> in your Makefile(s). If you change the GNU make package that's
> installed, then you've created an unexpected dependency on local
> modification, and the make installed on the system can no longer be
> simply upgraded with the OS as time passes.
>
To override GNU Make defaults (with additional configs) I use such code in
each of my top-level Makefile"s:

  SHELL = /bin/sh -eu

  # Disable built in pattern rules.
  MAKEFLAGS += -r
  # Disable built in variables.
  MAKEFLAGS += -R
  # Disable built in suffix rules.
  .SUFFIXES:
  # Delete target file if command fails.
  .DELETE_ON_ERROR:
  # Default target.
  .DEFAULT_GOAL = help

-- 
Best regards!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]