Correct syntax for CFLAGS to change a -DCONFIG_FILE_PATH=...

Nuno Teixeira ed.arrakis at gmail.com
Wed Dec 30 08:31:17 UTC 2020


Hello,

Recently upstream changed is example.c to have:

#ifndef CONFIG_FILE_PATH
#define CONFIG_FILE_PATH "./example.conf"
#endif

I found a way to change it in example port Makefile:

CFLAGS+= -DCONFIG_FILE_PATH=\\\"${LOCALBASE}/etc/example.conf\\\"

It works fine.

Am I doing the correct way and correct syntax? Those "\\\" ... "\\\" make
me some confusion.

Thanks,

Nuno Teixeira


More information about the freebsd-ports mailing list