Category ‘GNU Make’
- TECHPULP |
How to build in silent mode using GNU make
Use the following command for absolutely silent build make -s Use the following command for absolutely silent build except printing directory before and after processing. make -s -w ... - TECHPULP |
Why GNU make compiles even if there are no modified files
Some times GNU Make continue to compile some files even if there are no modifications. Typically it happens if you have transferred the files from some other system whose time is set to future. As while transferring files using tarball... - TECHPULP |
Why GNU Make always says `target’ is up to date
The GNU make expects the rule target to be files by default. That’s why it first checks the presense of a file/directory with the name specified in the rule. For example GNU make attempts to find if a file with... - TECHPULP |
GNU Make - How to compile all c files in present directory
The “shell” built-in function supported by GNU Make can be used to get the list of C source files in a directory. Then a list of corresponding object files can be created by replacing the file extension in the file... - TECHPULP |
How to hide rule commands from display in Makefile
Generally GNU make prints all the commands provided in the rules section. At times the output printed by the make may not be appealing if the makefile contains lots of rules with all complex jargon. For example consider the following... - TECHPULP |
How to clean multiple sub-directories in Makefile
The following example assumes that all sub-directories are listed in $(SUBDIRS) variable. All the entries in $(SUBDIRS) can be iterated using a “for” loop as shown below and “make clean” can be run in each directory. SUBDIRS = dir1 dir2...