Wednesday 3 June 2015

GNU make variables

$@ - target's filename
$< - name of the first prerequisite
$? - list of all prerequisites newer than target
$^ - list of all unique prerequisites
$+ - list of all prerequisites, including duplicates (useful for linking)
$| - list of all order-only prerequisites
$* - stem; the part of the filename that matched the ‘%’ in the target pattern

$(@D) - directory part of the target (if no '/' appears, it is '.')
$(@F) - filename patr of the target (equivalent to $(notdir $@))

$(<D) - directory part of the first prerequisite
$(<F) - filename part of the first prerequisite

$(?D) - directory parts of the list of all prerequisites newer than target
$(?F) - filename parts of the list of all prerequisites newer than target

$(^D) - directory parts of the list of all unique prerequisites
$(^F) - filename parts of the list of all unique prerequisites

$(+D) - directory parts of the list of all prerequisites, including duplicates
$(+F) - filename parts of the list of all prerequisites, including duplicates

$(*D) - directory part of the stem
$(*F) - filename part of the stem


Tuesday 2 June 2015

CheckInstall

CheckInstall keeps track of all the files created when installing from source ($ make install), builds a standard binary package and installs it using the system package management software (apt / yum etc), allowing you to later uninstall it

 tar -zxvf source-app.tar.gz;
 cd source/ ;
 ./configure;
 make;
 sudo checkinstall make install;

https://wiki.debian.org/CheckInstall