On Sun, Apr 18, 2021 at 10:34 PM John Darrington <j...@darrington.wattle.id.au> wrote: > > 41;344;0cOn Sun, Apr 18, 2021 at 01:45:58PM -0700, Ben Pfaff wrote: > There are some new warnings from Automake in the latest master branch: > > checking whether the C compiler works... Windows/automake.mk:26: > warning: shell echo $(LDFLAGS) | sed -e 's/^-L//' -e 's|/lib$$||': > non-POSIX variable name > Windows/automake.mk:26: (probably a GNU make extension) > Makefile.am:91: 'Windows/automake.mk' included from here > Windows/automake.mk:27: warning: dir ${shell $(CC) > -print-libgcc-file-name: non-POSIX variable name > Windows/automake.mk:27: (probably a GNU make extension) > Makefile.am:91: 'Windows/automake.mk' included from here > > Yes. These are a result of my most recent commits which provides targets > to create windows installers similar to those which Harry had been publishing. > These targets are not built by default. > > Like the warning implies, anyone trying to build these targets will need to be > using GNU Make. Other Makes will probably not work. > > Maybe some other method should be used to collect this information. > > I can think of a few other ways, but none of them are particularly elegent.
But why use Make instead of just using shell? I think that something like this would work, although I have not tested it. diff --git a/Windows/automake.mk b/Windows/automake.mk index 918c0b179f..d544f672c6 100644 --- a/Windows/automake.mk +++ b/Windows/automake.mk @@ -23,8 +23,8 @@ nsis_installer_deps=$(DESTDIR)$(prefix)/share/doc/pspp/pspp.html \ $(DESTDIR)$(prefix)/share/doc/pspp/pspp.pdf \ Windows/AdvUninstLog.nsh Windows/MUI_EXTRAPAGES.nsh -environment_dir=${shell echo $(LDFLAGS) | sed -e 's/^-L//' -e 's|/lib$$||'} -libgcc_dir=${dir ${shell $(CC) -print-libgcc-file-name}} +environment_dir = $$(echo $(LDFLAGS) | sed -e 's/^-L//' -e 's|/lib$$||') +libgcc_dir = $$(dirname $$($(CC) -print-libgcc-file-name)) # Note that install is a PHONY target. Therefore this rule is always executed. Windows/nsis-bin: install