On Mon, Apr 23, 2018 at 3:54 PM, Bruno Haible <br...@clisp.org> wrote: > A few hints regarding the gnulib coding style: > > * As you already noticed, we need to avoid build failures and runtime > failures > on platforms where this is not supported. >
I see "#ifdef __linux__" already in use in gnulibs, I assume this is the preferred way. > * In the module description, section 'Include', you should not list all > include > files but only those that the user is supposed to include. In this case, > I think, the af_alg business is invisible to the caller of the 4 modules. > How to conditionally add files to lib_SOURCES depending on the system? I guess that such code snippet is pasted somewhere in the Makefile, so something like should work: lib_SOURCES += sha1.c UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) lib_SOURCES += af_alg.c endif or do you have a better solution? -- Matteo Croce per aspera ad upstream