curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Makefile.am portability issue

From: Christian Weisgerber via curl-library <curl-library_at_lists.haxx.se>
Date: Sat, 14 May 2022 21:55:07 +0200

Commit a04f0b961333e1a19848d073d8c7db9c20b2a371 made me notice that
there is a portability issue in curl's top-level Makefile.am.

$< can only be used in rules that deal with .SUFFIXES. Its use
for general prerequisites is a GNU make extension.

$< could be replaced by $?, but I think in an autotools context,
something like this is better:

--- Makefile.am.orig
+++ Makefile.am
_at__at_ -278,13 +278,13 _at__at_ uninstall-hook:
         (cd docs && $(MAKE) uninstall)
         (cd docs/libcurl && $(MAKE) uninstall)
 
-ca-bundle: scripts/mk-ca-bundle.pl
+ca-bundle: $(srcdir)/scripts/mk-ca-bundle.pl
         _at_echo "generating a fresh ca-bundle.crt"
- _at_perl $< -b -l -u lib/ca-bundle.crt
+ _at_perl $(srcdir)/scripts/mk-ca-bundle.pl -b -l -u lib/ca-bundle.crt
 
-ca-firefox: scripts/firefox-db2pem.sh
+ca-firefox: $(srcdir)/scripts/firefox-db2pem.sh
         _at_echo "generating a fresh ca-bundle.crt"
- $< lib/ca-bundle.crt
+ $(srcdir)/scripts/firefox-db2pem.sh lib/ca-bundle.crt
 
 checksrc:
         (cd lib && $(MAKE) checksrc)
-- 
Christian "naddy" Weisgerber                          naddy_at_mips.inka.de
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-05-14