Hi list.
I just built GNU make 3.99.93 using MingW. I tried long and
hard to get the load feature to give me anything useful. But no
success so far with a very simple mk_test.dll.
In my Makefile, I have this:
VERSION = 3.99.93
ifeq ($(MAKE_VERSION),$(VERSION))
-load ./mk_test.dll
endif
The
Eli Zaretskii e...@gnu.org wrote:
What about setting:
ent-fptr.func_ptr = func;
too?
They are one and the same, since they are members of a union:
struct function_table_entry
{
union {
char *(*func_ptr) (char *output, char **argv, const char *fname);
char *(*alloc_func_ptr)
I've compiled the lastest Git-repo with MSVC using the make_msvc_net2003.vcproj
project. This is a bit outdated (was converted to make_msvc_net2003.vcxproj by
my Visual Studio 2010. I also had to insert guile.c in again).
This project file doesn't specify any runtime lib to link with. Hence the
I'm trying to understand if my use of the $(file..) function is correct or
not. Based on tests/scripts/function/file, I cooked up this little file.mak:
all: file_test
cat file.out
.PHONY: file_test
file_test:
rm file.out
$(file file.out, Hello)
$(file file.out, world)
@echo 'abspath
Paul Smith psm...@gnu.org wrote:
Then make invokes the shell with the results of the expansion, which are
the rm and echo commands (and some empty strings which are ignored).
So, the rm is running AFTER the file is created, and deleting it.
Thanks. That makes sense when I think about it.
According to:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682653(v=vs.85).aspx
the total size of the environment is 32kByte. This has hit me several
times in GNU-make when CreateProcess() triggers the mysterious error
87 (ERROR_INVALID_PARAMETER). Like in a very simple rule that
Eli Zaretskii e...@gnu.org wrote:
Wouldn't it be better to display the error only if CreateProcess fails
with e=87 _and_ the environment is larger than 32KB? That would allow
us to avoid calling GetVersionEx, which MS wants to deprecate (see
Would you like to write a modified patch along these lines?
Okay, will do.
Done. Output in this case is now something like:
process_begin: CreateProcess(g:\MingW32\msys\bin\echo.exe, echo Generating
.., ...) failed.
CreateProcess probably failed due to a too large environment. Env-size
Gisle Vanem gva...@yahoo.no wrote:
My revised patch doesn't use GetVersionEx(). Attached.
I forgot the patch for proc.h:
diff --git a/w32/subproc/proc.h b/w32/subproc/proc.h
index 62ebf65..ed8d3d4 100644
--- a/w32/subproc/proc.h
+++ b/w32/subproc/proc.h
@@ -24,6 +24,6 @@ typedef int bool_t
I'm a happy user of the $(file) function and multiline macros/variables
likes this:
..
define FOO_PACKAGE
exec_prefix=$(FOO_ROOT)
libdir=$${exec_prefix}/lib
includedir=$${exec_prefix}/inc
Version: $(FOO_VERSION)
Libs: $${libdir}/$(FOO_LIB)
endef
write_pkg:
$(file ./foo.pc, $(strip
Martin Dorey martin.do...@hds.com wrote:
this also removes the newlines.
...
IMHO make 4.x has a too strict definition of white-space.
http://pubs.opengroup.org/onlinepubs/95399/basedefs/xbd_chap07.html sayeth:
In the POSIX locale, at a minimum, the space, form-feed, newline,
The commit
http://git.savannah.gnu.org/cgit/make.git/commit/?id=562344122f3a3327ca4e285f203355857c4a25ff
breaks MSVC v16 build because of the C99 feature of 'declaration after code'.
Can you please apply this diff?
---Git-Latest/loadapi.c 2014-09-21 16:21:17 +
+++ loadapi.c
Eli Zaretskii e...@gnu.org wrote:
Looks good on MS-Windows (I fixed a few minor issues, most of them
specific to the MS-Windows build).
I have only one issue with OpenWatcom. It builds fine except for
a missing 'ftruncate()':
--- Git-Latest/makeint.h 2014-09-21 16:21:17 +
+++
Some lines in this file seems a bit strange.
Line 755:
if (arr2envblk(envp, , _needed) == FALSE) {
pproc->last_err = 0; << !!
pproc->lerrno = E_NO_MEM;
free( command_line );
if (pproc->last_err == ERROR_INVALID_PARAMETER
&&
Eli Zaretskii wrote:
Out of curiosity, which parts of the Make build process produce *.lib and
*.sbr files? (I don't use MSVC.)
'cl -FR' creates .sbr files (Source Browser File). Which IMHO is completely
useless when using .bat-files to build gnumake.
'link' creates a 'gnumake.lib' because
I have a question regarding a GNU-make macro like this
(which I use to link a MSVC .dll):
define do_link_DLL
link $(LDFLAGS) -dll -out:$(1) -implib:$(2) \
-pdb:$(1:.dll=.pdb) -map:$(1:.dll=.map) $(3) > link.tmp
cat link.tmp >> $(1:.dll=.map)
rm -f $(2:.lib=.exp) link.tmp
Eli Zaretskii wrote:
> The Windows shell understands || and && between 2 commands. I think
> you already know that, so I'm quite sure I'm missing something here,
> because that's the first thing I'd try.
There is no Windows shell (cmd nor 4nt) involved here. I don't
have any 'SHELL' in the
David Boyce wrote:
> First, I think there’s some missing context as you seem to have an
> unusual environment. You’re mixing Unix (cat, rm) and Windows (link)
> invocations; is it Cygwin, GNUWin32, MKS, ???
Thanks for replying.
I'm on Windows 10 using CygWin32 tools together with MSVC tools.
Eli Zaretskii wrote:
I'm not sure Make can distinguish between the two kinds. E.g., the
rules for generating the "phony" target could be given later. Paul
will know for sure.
And anyway, wouldn't it be confusing if case-sensitivity changed
depending on whether a file exists or doesn't?
Paul Smith wrote:
Then there's the question of case-preserving or not. To be case-
preserving, make would have to be doing all string searches and
comparisons using case-insensitive implementations which would be a lot
of code churn. And we would have to care a lot more about
Hello list.
In a discussion with the LuaList, I got involved with
how GNU-make on Windows handles all targets in a case-
insensitive manner. Like in this 'case-insensitive-win.mak':
-
default: program_name
PROGRAM_NAME Program_Name program_name:
@echo 'Do something for $@.'
-
Paul Smith wrote:
Or, you can enable secondary expansion which will allow you to write:
.SECONDEXPANSION:
bin/%.exe: $$($$(@F)_OBJ) $(LIBS)
$(call link_EXE, $@, $^)
Very compact and nice. But trying it, it wont work.
For 'bin/animation.exe', it expands to:
Hello list.
I need help with compacting a series of rules like (from a
Qwt makefile):
animation_OBJ = examples/animation/main.obj \
examples/animation/plot.obj
barchart_OBJ = examples/barchart/barchart.obj \
examples/barchart/main.obj \
Paul Smith wrote:
All the .obj files are missing!?
Oh. $@ is "bin/animation.exe" so $(@F) is "animation.exe" and
$($(@F)_OBJ) would be "animation.exe_OBJ" but that's not the name of
your variable, so it expands to the empty string.
Sorry I didn't catch this problem in your original
Paul Smith wrote:
What I'm considering is enhancing the EINTRLOOP etc. macros that I have
added across the code to check all system calls for EINTR and restart them,
so that this macro also checks to see if a signal has been received and if
so, calls a handler function. For almost all signals
Eli Zaretskii wrote:
gnss_libf2c.lib:
cd libf2c ; nmake.exe -nologo -f Makefile.VC all
cp libf2c/vcfc2.lib $@
but Nmake errors with:
Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal
Hello list.
Now I have the need to use an already quite large
Makefile written for Microsoft's 'NMake', from within
GNU-make 4.390. Like:
gnss_libf2c.lib:
cd libf2c ; nmake.exe -nologo -f Makefile.VC all
cp libf2c/vcfc2.lib $@
but Nmake errors with:
Microsoft (R) Program Maintenance
Hello list.
The Windows port of Gnu-make has some issues:
dep.h(60): error C2059: syntax error: ';'
dep.h(61): error C2059: syntax error: '}'
dep.h(69): error C2059: syntax error: ';'
dep.h(70): error C2365: 'error': redefinition; previous definition was
'function'
MSVC does not handle
I wrote:
dir.c(528,24): error: use of undeclared identifier 'p'
memcpy (tem, name, p - name + 1);
^
dir.c(532,24): error: use of undeclared identifier 'p'
for (tend = tem + (p - name - 1);
^
I fixed this by:
---
Hello list.
Since some time the cool '.SECONDEXPANSION' feature has
stopped working for me. In a Makefile, I have many rules
to link module .DLLs:
mod_airspy_source_OBJ = $(OBJ_DIR)/airspy_source_main.obj
mod_airspyhf_source_OBJ = $(OBJ_DIR)/airspyhf_source_main.obj
Dmitry Goncharov wrote:
On Sun, Dec 12, 2021 at 2:15 PM Paul Smith wrote:
Did something happen when it stopped working, like you updated to a
different version of GNU make?
i bet this make is built from the current git.
Correct.
Thanks for your report.
If you need make from git you
Hello list!
I have this really large makefile and
discovered the '$(eval..)' function was handy
to use for this. Like:
define add_c_src
VPATH += $(1)
C_SRC += $(addprefix $(1)/, $(2))
$(info Number of 'C_SRC': $(words $(C_SRC)))
endef
$(eval $(call add_c_src, frmts/ceos,
Paul Smith wrote:
You probably want to escape the non-argument references, so that call
will not run them and instead they will be passed to eval:
define add_c_src
VPATH += $(1)
C_SRC += $$(addprefix $(1)/, $(2))
$$(info Number of 'C_SRC': $$(words $$(C_SRC)))
endef
Paul Smith wrote:
I'm OK with adding some short text about this into the man page. As
David mentions it may be important enough to do that since command
being run by make even when the user gives "-n" could give unexpected
or even unpleasant consequences.
The most unpleasant consequences of
Follow-up Comment #2, bug #62575 (project make):
> sh -c 'clang -fansi-escape-codes -fcolor-diagnostics'
Why this when `clang` is giving nice colours w/o any problems
on Windows anyway?
Please do not add this patch without checking that the
`ENABLE_VIRTUAL_TERMINAL_PROCESSING` works. And it
Hello list.
Some resent (?) change has caused a crash in
'find_and_set_default_shell()' with this minimal
Makefile:
export PATH := $(PATH):node_modules/.bin
SHELL := env "PATH=$(PATH)" /bin/bash
all:
@echo "Hello"
---
Without the 'SHELL ..' line, all is good.
Or even a
Paul Smith wrote:
... else (b) make has to parse this string
and break it up into words that it can use to call exec() without going
through a shell
The crash and wild call-stack seems to be caused
by an overflow to 'sprintf(sh_path, ..)'. But replacing
with 'snprintf()' works w/o any crash:
Hello folks.
I have a question regarding parenthesis
in GNU-make macros. Like in:
msg = @echo "$(1)"
ptest_1:
$(call msg, foo (arg1, arg2, arg3))
ptest_2:
$(call msg, foo, arg1, arg2, arg3)
A 'make ptest_1' shows:
foo (arg1, arg2, arg3)
and
Hello list.
I'm using the very latest GNU-make built on Win-10 by myself.
Except I've disabled the call to 'SetUnhandledExceptionFilter()'.
In one particular Wine Makefile I get a crash in 'hash_free_items()':
gnumake!hash_free_items+0x22
gnumake!hash_free+0x30
Paul Smith wrote:
... facilities that you don't specify (Cygwin? MinGW? WSL?)
I'm using Cygwin as my POSIX toolbox.
But, note that touch writes timestamps in the current timezone by
default. It could be that your timezone (which you also didn't
specify) makes a difference, when you are
I have an issue with things like
touch --date="1970-01-01"
(or 'touch -t time') that I sometime use in makefiles.
E.g. in this makefile:
-
all: test-file-1 test-file-2
test-file-1:
echo 'whatever' > $@
touch -t 197001010100 $@ # Jan 1. 1970,
Edward Welbourne wrote:
Indeed, on Unix, time_t is signed and modern GLibc / Linux functions
using it are perfectly happy with values across the whole range of the
type (which extends to well before the big bang).
Thanks for the detailed explanation. Yes, it's rather confusing
with such
Dan Jacobson wrote:
(info "(make) Text Functions") says
'$(subst FROM,TO,TEXT)'
Performs a textual replacement on the text TEXT: each occurrence of
FROM is replaced by TO. The result is substituted for the function
call. For example,
$(subst ee,EE,feet on the
Hello list.
I sometimes have issues when a 'VPATH' doesn't
do what I'd like. E.g. in this 'vpath-test.mak'
file:
#
# there is a 'apps/lib' directory here:
#
VPATH = apps
GEN_DIRS = ./lib
default all: $(GEN_DIRS)
$(GEN_DIRS):
mkdir --verbose $@
---
So I want to
Paul Smith wrote:
If you use "-d" you'll get the info you want:
No implicit rule found for 'default'.
Considering target file 'lib'.
Finished prerequisites of target file 'lib'.
No need to remake target 'lib'; using VPATH name 'apps/lib'.
Finished prerequisites of target
Martin Dorey wrote:
This seems to work:
martind@sirius:~/tmp/vanem-2023-04-14$ cat Makefile
g_trace.h: Makefile; $(file > $@,$(trace_h))
\ = \
define trace_h
#define G_TRACE(level, fmt, ...) $\\
do { $\\
if
Dmitry Goncharov wrote:
There are various techniques.
example 1, define the variable
\:=
This was simple and elegant. Worked w/o any warnings.
Thanks!
In a makefile I have the need to generate a
multi-line C-macro (for use in Glib):
g_trace.h: Makefile
$(file > $@,$(trace_h))
define trace_h
#define G_TRACE(level, fmt, ...) $\\
do { $\\
if (_g_trace_level() >=
Since the commit:
https://git.savannah.gnu.org/cgit/make.git/commit/src/variable.c?id=ec348f51d0240ebc64d11c77c461e89c4a8dfed7
src/variable.c doesn't compile:
variable.c(1642): error C2065: 'specificity': undeclared identifier
variable.c(1658): error C2065: 'specificity': undeclared
Tim Murphy wrote:
HOW TO GET IT:
===
in the feature/jprint branch on this fork:
https://github.com/tnmurphy/gmake-experimental
Got it and tried to build it. With clang-cl there is
this warning:
jprint.c(483,40): warning: omitting the parameter name in a function
definition is a
50 matches
Mail list logo