Opened 2 years ago

Closed 2 years ago

#922 closed enhancement (fixed)

Autoconf warns about non-POSIX extensions in makefiles

Reported by: vliaukevich Owned by: vliaukevich
Priority: minor Milestone:
Component: build system Version: development
Keywords: Cc: dmisev
Complexity: Medium

Description

Autoreconf warns about non-POSIX variable names:

$ autoreconf -fi
applications/RRasdaman/Makefile.am:48: warning: wildcard R/*.R: non-POSIX variable name
applications/RRasdaman/Makefile.am:48: (probably a GNU make extension)
applications/RRasdaman/Makefile.am:49: warning: wildcard man/*.Rd: non-POSIX variable name
applications/RRasdaman/Makefile.am:49: (probably a GNU make extension)
applications/RRasdaman/Makefile.am:50: warning: wildcard tests/*.R: non-POSIX variable name
applications/RRasdaman/Makefile.am:50: (probably a GNU make extension)
applications/RRasdaman/Makefile.am:50: warning: wildcard tests/testthat/*.R: non-POSIX variable name
applications/RRasdaman/Makefile.am:50: (probably a GNU make extension)
...

It complains about functions wildcard, subst and addprefix, which are part of GNU make extension, not POSIX make, and may not be portable to systems like Windows.

It would be nice to disable these warnings.

Change History (4)

comment:1 Changed 2 years ago by pbaumann

but you say yourself that this may affect portability.
Can we localize this, ie: disable only for RRasdaman?

comment:2 Changed 2 years ago by dmisev

They appear in some other places too, like the systemtest makefile.
We don't support Windows in any case, I think it's ok :)

comment:3 Changed 2 years ago by vliaukevich

As far as I know, Autoconf does not give much granularity and it is not possible to disable such warnings for a particular Makefile.am.

From my point of view, using GNU-specific extensions like %-style suffix rules gives way more control over what Make does. Let's compare java-related section of ./applications/RRasdaman/Makefile.am and ./java/Makefile.am. The latter recompiles all .class files when a single .java file was modified, while the former uses suffix rules and recompiles only affected byte code files.

We don't support Windows anyway, so I think the pros of using GNU extensions are outweighing its cons.

comment:4 Changed 2 years ago by pbaumann

  • Resolution set to fixed
  • Status changed from new to closed

ok, convinced!

Note: See TracTickets for help on using tickets.