Wietse Venema via Postfix-users:
> Ralf Hildebrandt via Postfix-users:
> > * Wietse Venema via Postfix-users <[email protected]>:
> > > Wietse Venema via Postfix-users:
> > > >     pcf_ldap_suffixes.h: ../global/dict_ldap.c 
> > > >             sh extract_cfg.sh -d ../global/dict_ldap.c > $@
> > > 
> > > Make sure that the m4 command is installed.
> > 
> > That solved it, thanks!
> 
> On my system, when m4 does not exist, 
> 
> $ make
> ...
> [src/postconf]
> ...
> sh extract_cfg.sh -d ../global/dict_ldap.c > pcf_ldap_suffixes.h
> extract_cfg.sh: line 42: m4: command not found
> make: *** [Makefile:136: pcf_ldap_suffixes.h] Error 1
> make: *** [Makefile:105: update] Error 1
> 
> And then that leaves behind a zero-length file.
> 
> I suppose that running 'make' six times would create all the necessary
> pcf_xxx_suffixes.h files and allow the build to proceed.
> 
> Perhaps that is what happened.

This patch will prevent that from happening: if the extract_cfg.sh
script fails, remove the output. There will be other instanecs of
similar problems, but the postconf build has the most benefit from
this pattern.

        Wietse

diff '--exclude=man' '--exclude=html' '--exclude=README_FILES' 
'--exclude=INSTALL' --no-dereference -r -ur 
/var/tmp/postfix-3.12-20260721/src/postconf/Makefile.in 
./src/postconf/Makefile.in
--- /var/tmp/postfix-3.12-20260721/src/postconf/Makefile.in     2026-01-27 
19:30:50.000000000 -0500
+++ ./src/postconf/Makefile.in  2026-07-21 15:51:18.528361841 -0400
@@ -77,22 +77,28 @@
 $(DB_MAKES): extract_cfg.sh Makefile.in 
 
 pcf_ldap_suffixes.h: ../global/dict_ldap.c 
-       sh extract_cfg.sh -d ../global/dict_ldap.c > $@
+       sh extract_cfg.sh -d ../global/dict_ldap.c > $@ \
+           || { rm -f $@; exit 1; }
 
 pcf_memcache_suffixes.h: ../global/dict_memcache.c 
-       sh extract_cfg.sh -d ../global/dict_memcache.c > $@
+       sh extract_cfg.sh -d ../global/dict_memcache.c > $@ \
+           || { rm -f $@; exit 1; }
 
 pcf_mongodb_suffixes.h: ../global/dict_mongodb.c 
-       sh extract_cfg.sh -d ../global/dict_mongodb.c > $@
+       sh extract_cfg.sh -d ../global/dict_mongodb.c > $@ \
+           || { rm -f $@; exit 1; }
 
 pcf_mysql_suffixes.h: ../global/dict_mysql.c 
-       sh extract_cfg.sh -d -s ../global/dict_mysql.c > $@
+       sh extract_cfg.sh -d -s ../global/dict_mysql.c > $@ \
+           || { rm -f $@; exit 1; }
 
 pcf_pgsql_suffixes.h: ../global/dict_pgsql.c 
-       sh extract_cfg.sh -d -s ../global/dict_pgsql.c > $@
+       sh extract_cfg.sh -d -s ../global/dict_pgsql.c > $@ \
+           || { rm -f $@; exit 1; }
 
 pcf_sqlite_suffixes.h: ../global/dict_sqlite.c
-       sh extract_cfg.sh -d -s ../global/dict_sqlite.c > $@
+       sh extract_cfg.sh -d -s ../global/dict_sqlite.c > $@ \
+           || { rm -f $@; exit 1; }
 
 # Define two parameters with smtpd_restriction_classes. One will be ignored.
 
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to