> On 25 Feb 2023, at 2:41 am, Wietse Venema <wie...@porcupine.org> wrote: > > Wietse Venema: >> James Brown: >>>> On 24 Feb 2023, at 11:57 pm, Wietse Venema <wie...@porcupine.org> wrote: >>>> >>>> James Brown: >>>>> Sorry if this is a bit of a basic question, but I?m trying to compile >>>>> from source on macOS 13.21.1 but the makefile has lines commented out. >>>>> >>>>> I'm trying: >>>>> >>>>> make -f Makefile.init makefiles \ >>>>> CCARGS='-DUSE_TLS -DUSE_SASL_AUTH \ >>>> ... >>>>> -DHAS_MYSQL -I/opt/homebrew/Cellar/mysql/8.0.32/include/' \ >>>> ... >>>> >>>> Try using " instead of ' >>>> >>>> Someone has "improved"(*) the shell and broke command examples that >>>> I wrote 20+ years ago. >>>> >>>> Wietse >>>> >>>> (*) Or worse, some standard committee "improved" the spec. >>>> >>> >>> Thanks for your help Wietse. (The shell is zsh) >>> >>> % make -f Makefile.init makefiles CCARGS="-DUSE_TLS -DUSE_SASL_AUTH \ >>> -DDEF_SERVER_SASL_TYPE=\"dovecot\" \ >> >> Try: >> >> make -f Makefile.init makefiles CCARGS="-DUSE_TLS -DUSE_SASL_AUTH \ >> -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\" \ >> ... >> >> That's three backslashes where there was one. > > I have to retract my comment aobut changes to shells. The behavior > of backslash-newline inside 'string' (single quotes) is to preserve > the backslash and the newline i.e. the backslash is mot special and > that has not changed in the past 10+ years. > > Thus, the form > > make -f Makefile.init makefiles CCARGS="ccargs stuff \ > more ccargs stuff" \ > other stuff \ > more other stuff > > Is the form to use when CCARGS spans multiple lines, and you need > \\\ to protect " quotes inside CCARGS. > > Wietse
Thanks Wietse, Viktor and Norton. Looks like three backslashes instead of one was the answer: % make -f Makefile.init makefiles CCARGS="-DUSE_TLS -DUSE_SASL_AUTH \ -DDEF_SERVER_SASL_TYPE=\\\\"dovecot\\\\" \ -DDEF_COMMAND_DIR=\\\"/usr/local/sbin\\\" \ -DDEF_CONFIG_DIR=\\\"/usr/local/etc/postfix\\\" \ -DDEF_DAEMON_DIR=\\\"/usr/local/libexec/postfix\\\" \ -DHAS_PCRE -I/opt/homebrew/include \ -DHAS_SSL -I/opt/homebrew/Cellar/openssl@3/3.0.8/include/ \ -DHAS_MYSQL -I/opt/homebrew/Cellar/mysql/8.0.32/include/" \ AUXLIBS_MYSQL='-I/opt/homebrew/Cellar/mysql/8.0.32/include/mysql -lmysqlclient -lz -lm' \ AUXLIBS='-L/usr/local/lib -lpcre -L/opt/homebrew/opt/openssl@3/lib -lssl -lcrypto' sendmail_path=/usr/local/sbin/sendmail newaliases_path=/usr/local/bin/newaliases mailq_path=/usr/local/bin/mailq And start of makefile: # Do not edit -- this file documents how Postfix was built for your machine. #---------------------------------------------------------------- # Start of summary of user-configurable 'make makefiles' options. # CCARGS=-DUSE_TLS -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\dovecot\ -DDEF_COMMAND_DIR=\"/usr/local/sbin\" -DDEF_CONFIG_DIR=\"/usr/local/etc/postfix\" -DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\" -DHAS_PCRE -I/opt/homebrew/include -DHAS_SSL -I/opt/homebrew/Cellar/openssl@3/3.0.8/include/ -DHAS_MYSQL -I/opt/homebrew/Cellar/mysql/8.0.32/include/ # AUXLIBS=-L/usr/local/lib -lpcre -L/opt/homebrew/opt/openssl@3/lib -lssl -lcrypto # AUXLIBS_MYSQL=-I/opt/homebrew/Cellar/mysql/8.0.32/include/mysql -lmysqlclient -lz -lm # shared= # dynamicmaps= # pie= # mailq_path=/usr/local/bin/mailq # newaliases_path=/usr/local/bin/newaliases # sendmail_path=/usr/local/sbin/sendmail # End of summary of user-configurable 'make makefiles' options. #-------------------------------------------------------------- # System-dependent settings and compiler/linker overrides. Now it just has one error: dict_mysql.c:171:10: fatal error: 'mysql.h' file not found #include <mysql.h> ^~~~~~~~~ 1 error generated. make: *** [dict_mysql.o] Error 1 make: *** [update] Error 1 % locate mysql.h /opt/homebrew/Cellar/mysql/8.0.32/include/mysql/mysql.h Thanks so much for your help again. James.