make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make-3.81rc1 mingw not failing on 'g++ -M' error


From: Matt England
Subject: make-3.81rc1 mingw not failing on 'g++ -M' error
Date: Tue, 07 Mar 2006 12:22:33 -0600

(My original post for this from last night was not showing up in the help-make or make-32 archive lists nor in my emailbox, so I'm trying to repost; I apologize for any convenience. -Matt)


Original email header, fyi:
Date: Mon, 06 Mar 2006 23:56:59 -0600
To: Eli Zaretskii <address@hidden>
From: Matt England <address@hidden>
Subject: Re: make3.81-beta4 mingw not failing on error?
Cc: "Paul D. Smith" <address@hidden>,address@hidden,
 address@hidden,address@hidden


At 3/4/2006 03:41 PM, Eli Zaretskii wrote:
Yes, please try the latest code, and if that doesn't fix the problem,
please post the shortest Makefile that can be used to reproduce it.

Ok, so I built make-3.81rc1 and still experience make not stopping upon errors.

Details are below.  The main excerpt:

$ make main.exe
-- generating makefile: main.d
main.cpp:1:21: sys/msg.h: No such file or directory
g++ -c  main.cpp -o main.o
main.cpp:1:21: sys/msg.h: No such file or directory
make: *** [main.o] Error 1

Note that the first error should stop the make, but it doesn't.

Notice that it works as I prefer it to via cygwin (details below). Also note that cygwin has sys/msg.h, and mingw does not (and that's how I caught the problem in mingw, and noticed I was getting errors in the make output but the process was not stopping).

Do the make developers/assisters/moderators have enough info with this post to try and further analyze the problem?

-Matt


-----------------------------------------------------------------------
session exhibiting the problem
-----------------------------------------------------------------------

address@hidden ~/make-test
$ make --version
GNU Make 3.81rc1
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-mingw32

address@hidden ~/make-test
$ make clean
rm -f main.o alt1.o main.d alt1.d main.exe alt1.exe

address@hidden ~/make-test
$ date
Mon Mar  6 23:45:05 CST 2006

address@hidden ~/make-test
$ uname -a
MINGW32_NT-5.1 MATTS-LAPTOP 1.0.11(0.46/3/2) 2004-04-30 18:55 i686 unknown

address@hidden ~/make-test
$ make main.exe
-- generating makefile: main.d
main.cpp:1:21: sys/msg.h: No such file or directory
g++ -c  main.cpp -o main.o
main.cpp:1:21: sys/msg.h: No such file or directory
make: *** [main.o] Error 1

address@hidden ~/make-test
$ make alt1.exe
-- generating makefile: alt1.d
alt1.cpp:1:22: sys/msg1.h: No such file or directory
g++ -c  alt1.cpp -o alt1.o
alt1.cpp:1:22: sys/msg1.h: No such file or directory
make: *** [alt1.o] Error 1

address@hidden ~/make-test
$ echo $?
0

address@hidden ~/make-test
$ g++ -M  main.cpp
main.cpp:1:21: sys/msg.h: No such file or directory

address@hidden ~/make-test
$ echo $?
1

address@hidden ~/make-test
$ echo $?
0

address@hidden ~/make-test
$


-----------------------------------------------------------------------
corresponding session via cygwin
-----------------------------------------------------------------------


address@hidden 11:44pm [...mengland/make-test] 122> date
Mon Mar  6 23:44:05 CST 2006
address@hidden 11:44pm [...mengland/make-test] 123> uname -a
CYGWIN_NT-5.1 matts-laptop 1.5.16(0.128/4/2) 2005-04-25 20:26 i686 unknown unknown Cygwin
address@hidden 11:44pm [...mengland/make-test] 124> make main.exe
-- generating makefile: main.d
g++ -c  main.cpp -o main.o
g++  main.o -o main.exe
address@hidden 11:44pm [...mengland/make-test] 125> make alt1.exe
-- generating makefile: alt1.d
alt1.cpp:1:22: sys/msg1.h: No such file or directory
make: *** [alt1.d] Error 1
address@hidden 11:44pm [...mengland/make-test] 126>

address@hidden 11:51pm [...mengland/make-test] 131> make --version
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
address@hidden 11:53pm [...mengland/make-test] 132>

-----------------------------------------------------------------------
the files used
-----------------------------------------------------------------------

-------------------------------------------------------------------------
-------------------------------Makefile----------------------------------
-------------------------------------------------------------------------

CXX      := g++
LDFLAGS  :=
CXXFLAGS :=
PID      := $(shell echo $$$$)

CPP_FILES := main.cpp alt1.cpp
OBJ_FILES := $(CPP_FILES:%.cpp=%.o)
DDD_FILES := $(CPP_FILES:%.cpp=%.d)
EXE_FILES := $(CPP_FILES:%.cpp=%.exe)

all:           main.exe alt1.exe
main.exe:      main.o
alt1.exe:      alt1.o
main.o main.d: main.cpp
alt1.o alt1.d: alt1.cpp

$(EXE_FILES):
        $(CXX) $(LDFLAGS) $^ -o $@

$(OBJ_FILES):
        $(CXX) -c $(CXXFLAGS) $< -o $@

DFILE_HDR := \
\# DO NOT CHANGE THIS FILE; it was auto-generated by a make process.

# Generate header prerequisites automatically.
# Taken and modified from:
# http://www.gnu.org/software/make/manual/html_chapter/make_4.html#SEC51
$(DDD_FILES):
        @echo -- generating makefile: $@
        @set -e; rm -f $@;                                          \
        echo "$(DFILE_HDR)" > $@;                                   \
        $(CXX) -M $(CXXFLAGS) $< > address@hidden(PID);                      \
        sed 's,^.*\.o[ :]*,$(@:%.d=%.o) $@: ,g' < address@hidden(PID) >> $@;  \
        rm -f address@hidden(PID)

ifeq ($(MAKECMDGOALS),all)
-include $(DDD_FILES)
endif
ifeq ($(MAKECMDGOALS),main.exe)
-include main.d
endif
ifeq ($(MAKECMDGOALS),alt1.exe)
-include alt1.d
endif

clean:
        rm -f $(OBJ_FILES) $(DDD_FILES) $(EXE_FILES)

-------------------------------------------------------------------------
-------------------------------main.cpp----------------------------------
-------------------------------------------------------------------------

#include <sys/msg.h>

int
main()
{
}

-------------------------------------------------------------------------
-------------------------------alt1.cpp----------------------------------
-------------------------------------------------------------------------

#include <sys/msg1.h>

int
main()
{
}







reply via email to

[Prev in Thread] Current Thread [Next in Thread]