How to tell make to never re-make prerequsities

Questions : How to tell make to never re-make prerequsities

448

I have a Makefile where a: b and b: c. programming When I run make a while b exists, I Learning expect Make to leave b alone even if c Earhost does not exist. But it seems like GNU most effective Make goes all the way up the tree, and wrong idea remakes everything down from the most use of case upstream parent that has an issue.

There is a flag --always-make that cause United Make to always remake all prerequisites, Modern even if not needed. Unfortunately, there ecudated does not appear to be a --never-make some how flag that never remakes any anything else prerequisites, even if needed. Is there not at all a general way I can get this behavior?

Some possible solutions that don't seem very usefull suitable:

  • touching every file one by one is tedious, and in the case of missing files, results in empty "fake" files which I find far too hacky
  • Commenting out the prereq as in a: #b breaks Make variables like touch $<.
  • Commenting out the rule for b: works, but often there are quite a few b scattered throughout the file, so this is a lot of commenting and also tedious
Total Answers 1
31

Answers 1 : of How to tell make to never re-make prerequsities

If you're sure that doesn't need localhost recreate c maybe:

a:  b
    echo a

b:  c
    echo b

c:
  _OFFSET);    [ -e b ] || ( generate c... )

In target c we check existence of b ([ love of them -e b]) and if yes we do nothing (else localtext generate c...).

The c target is run when c doesn't exist basic but if b too doesn't generate c (I think one of the it takes many time in your case).

Top rated topics

From tweepy.streaming import StreamListener why get error

Files uploaded to ftp server, corrupted why?

Compare numbers in shell

Setting up Chrome DevTools (Selenium 4) Using Remote WebDriver in Python

Place radio and text inline

How to add country name field based on mobile number using Mobile_Number using logstash

Couldn't load the Pytorch optimised model in android

Unable to set up handlebars due to : TypeError: handlebars is not a function

Event subscription of type WEBHOOK with static Header using ARM template

Where does docker stores my MongoDB data?

How to create Teradata trigger (after insert update)?

What is the correct way add a protocol to the macOS info.plist using electron-builder?

PhpStorm becomes very slow and takes a lot of resources with Contao CMS project

Left Justifications in Graphviz Nodes via HTML Formatting in Python

How to onPress and other Color in barChart on react-native-svg-charts

Component not showing data on pressing back

2 Way Databind components within Components

PHP social contribution Yearly

Looking for an example of a OBD-II complete data frame

How to load old Keras model in Tensorflow 2.0 with custom lambda layers?

Confusion between two rewrite urls rules

Can't start flutter project on android emulator

How to export a custom model from TensorflowJS to Tensorflow Python

Color theme doesnt apply

Python3 pick value from yaml

Why can't ESLint check syntax against Node.js version?

Com.hazelcast.cp.exception.NotLeaderException no leader election on 3 nodes

In standard RDP security, where the modulus coming from?

How to check microphone is already been use or not flutter?

Zeppelin - Flink problem running basic tutorial

How to handle "A potentially dangerous Request.Form value was detected from the client"?

How can I split a string if a separator is repeated twice?

Modify code to take textContent from li instead of thumbnail img src?

Error in python script using python-vlc and pafy

IOS app is showing crash on firebase crashlytics

What does MongoDB "ping" command actually do?

Internet Explorer 11 PFX File Certificate Export Encryption

How can I upload local files to a folder of the remote server in fabric2.6.0?

RuntimeError: main thread is not in main loop when setting y coordinate on Timer

When allowCredentials is true, allowedOrigins cannot contain the special value "*"

UIImagePickerController Camera's Green dot turns on when application get backs from background swiftUI

Handlebars and Sendgrid (UX) Campaigns for Dummies needed

.Net 5 SDK and .Net 6 SDK Side by Side Support

Jupyter notebook launch results in Exit code 1

Complete list of dictionaries with date and zero values for the missing months in a range

Laravel Array:Key Validation

What is &lt;any&gt; doing in the following TypeScript code?

IronPDF fails on subsequent attempts

Reference &amp; Pointers questions

Why does ggplot2 continue working but not output anything?

Top