Just like the CFLAGS variable, the LDLIBS variable should be
extensible with environment variables.
This is for example required because Debian packages (should be)
built with special hardening flags:
https://wiki.debian.org/Hardening
For various enviroment it is very valuable to have externally
overwriteable versions (such as distribution packaging, where
a maintainer wants to set a specfic version).
Also, not all build enviroments have git available (e.g. Debian),
therefore the expression `$(shell git describe)` would be evaluated
to ''. This patches makes the version variable used in the Makefile
overwriteable with an environment variable.
Add `gdk-pixbuf2` as a dependency (introduced by 407992b)
and list the AUR packages maintained by @geommer.
Reformat dependencies for Fedora and Debian/Ubuntu as a list
(better readability)
The Makefile builds object files in src/ and src/intern_blks/,
however the clean target only deleted object files inside src/
Now the clean target deletes object files in src/, src/intern_blks/
and the program itself
Previously, when compiling with default settings for Debian pkgs,
building was impossible:
cc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -std=c99 -Iinclude -pedantic -Wall -Os `pkg-config --cflags pango pangocairo libconfig` -Wdate-time -D_FORTIFY_SOURCE=2
-DVERSION=\"0.4.0-1-g44211c1\" -D_POSIX_C_SOURCE=199309L -DYA_INTERNAL -DYA_DYN_COL -DYA_ENV_VARS -DYA_INTERNAL_EWMH -c -o src/ya_parse.o src/ya_parse.c
src/ya_parse.c: In function ‘ya_inherit_blk’:
src/ya_parse.c:116:3: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf(stderr, per);
^
src/ya_parse.c:126:3: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf(stderr, per);
^
cc1: some warnings being treated as errors
<builtin>: recipe for target 'src/ya_parse.o' failed
DRY -- don't repeat yourself. Much code was repeated,
mostly error control. Also used ferror instead of checking
return code from fscanf. Resulting code is cleaner and shorter.