• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

The MinGW.org Installation Manager Tool


Commit MetaInfo

Révision9309a0763261b39e703b2e184dc742a29f882541 (tree)
l'heure2013-04-11 03:55:47
AuteurKeith Marshall <keithmarshall@user...>
CommiterKeith Marshall

Message de Log

Fix MinGW-Bug #1601 (on new issues tracker).

Change Summary

Modification

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
1+2013-04-10 Keith Marshall <keithmarshall@users.sourceforge.net>
2+
3+ Fix MinGW-Bug #1601 (on new issues tracker).
4+
5+ * aclocal.m4 (makeopts.m4): New build-aux module; include it.
6+ (MINGW_AC_PROG_LEX): New macro; implement it.
7+
8+ * configure.ac (AC_INIT): Make version number tripartite.
9+ (MINGW_AC_MAKE_NO_PRINT_DIRECTORY): Use this new makeopts.m4 macro.
10+ (MINGW_AC_PROG_LEX): Use it, in place of...
11+ (AC_PROG_LEX): ...this.
12+
13+ * Makefile.in (MAKE): New macro; assign using autoconf's SET_MAKE.
14+ (QUIET_MAKE): New macro; derive it from $(MAKE) --no-print-directory.
15+ (LEX_COMMAND, LEX_COMMAND_ABORT): New macros; define them.
16+ (LEX_MISSING, LEX_MISSING_MESSAGE, LEX_OUTPUT): Likewise.
17+ (FORMAT_MESSAGE, MESSAGE_FOLD_WIDTH): Likewise; implemented from...
18+ (AWK_CLEAR_LINE_BUFFER, AWK_FLUSH_BUFFER, AWK_PRINT_AND_CLEAR_BUFFER):
19+ (AWK_COLLECT_MESSAGE, AWK_COLLECT_BLANK_LINE, AWK_PRINT_LINE_BUFFER):
20+ ...this collection of internal helper macros; define them.
21+ (%.c: %.l): Replacement for built-in rule; it handles "missing lex" in
22+ a manner consistent with expectations of autoconf's AC_PROG_LEX.
23+ (execute-command): New phoney build goal; it is used with...
24+ (WITH_REQUEST): ...this new macro, to invoke commands recursively.
25+
126 2013-03-25 Keith Marshall <keithmarshall@users.sourceforge.net>
227
328 Adapt DMH for use in setup tool.
--- a/Makefile.in
+++ b/Makefile.in
@@ -33,12 +33,23 @@ GUI_RELEASE_CLASS = @GUI_RELEASE_CLASS@
3333 BUILD_TAG = `>> build.tag; cat build.tag`
3434 DEBUGLEVEL = @DEBUGLEVEL@
3535
36+# Establish the appropriate mechanism for invoking 'make' recursively,
37+# WITHOUT incurring the noise of its "Entering directory..." messages.
38+#
39+@SET_MAKE@
40+QUIET_MAKE = $(MAKE)@NO_PRINT_DIRECTORY@
41+
42+# Establish source code directory organisation, and set reference
43+# paths for access to source files.
44+#
3645 srcdir = @srcdir@
3746 abs_top_srcdir = @abs_top_srcdir@
3847
3948 vpath %.ico @srcdir@/icons
4049 VPATH = @top_srcdir@/src:@top_srcdir@/src/pkginfo:@top_srcdir@/tinyxml
4150
51+# Identify common build tools, and set their default options.
52+#
4253 CC = @CC@
4354 CFLAGS = @CFLAGS@
4455 CPPFLAGS = @CPPFLAGS@ -D DEBUGLEVEL=$(DEBUGLEVEL) $(INCLUDES)
@@ -48,11 +59,65 @@ CXXFLAGS = $(CFLAGS)
4859
4960 INCLUDES = -I ${srcdir}/src -I ${srcdir}/src/pkginfo -I ${srcdir}/tinyxml
5061
51-LEX = @LEX@
52-
5362 AR = @AR@
5463 ARFLAGS = @ARFLAGS@
5564
65+# A 'lex' compatible LALR(1) scanner is required for SCM sourced builds,
66+# or if the user modifies any 'lex' source. This AC_PROG_LEX compatible
67+# macro set facilitates the handling of any situation where 'lex' is not
68+# available, but is required to complete the build.
69+#
70+LEX = @LEX@
71+LEX_COMMAND = $(LEX) $(LFLAGS) -t $< > $(LEX_OUTPUT)
72+LEX_COMMAND_ABORT = { $(LEX_MISSING); rm -f $(LEX_OUTPUT); exit 2; }
73+LEX_MISSING = (echo; echo $(LEX_MISSING_MESSAGE); echo) | $(FORMAT_MESSAGE)
74+LEX_MISSING_MESSAGE = "I cannot find the program 'lex' on your system; \
75+it is required because you either do not have the file '$@', or you appear \
76+to have modified the file '$<'. If neither of these is the case, then you \
77+may wish to update the time stamp of '$@', so that it appears to be newer \
78+than '$<', before you run make again."
79+LEX_OUTPUT = @LEX_OUTPUT_ROOT@.c
80+
81+# The following macro uses 'awk' to emulate a rudimentary 'nroff' filter,
82+# for formatting notification messages, such as those which are emitted to
83+# report the above "missing 'lex'" condition.
84+#
85+FORMAT_MESSAGE = awk '\
86+ BEGIN { $(AWK_CLEAR_LINE_BUFFER) }\
87+ /^\. *br$$/ { $(AWK_PRINT_AND_CLEAR_BUFFER) }\
88+ NF == 0 { $(AWK_COLLECT_BLANK_LINE) }\
89+ /^[^.]/ { $(AWK_COLLECT_MESSAGE) }\
90+ END { $(AWK_FLUSH_LINE_BUFFER) }'
91+
92+# Establish a default line length for formatting messages.
93+#
94+MESSAGE_FOLD_WIDTH = 68
95+
96+# The following macros implement the internals of the message formatter.
97+#
98+AWK_CLEAR_LINE_BUFFER = linebuf = "";
99+AWK_FLUSH_LINE_BUFFER = if( linebuf != "" ){ $(AWK_PRINT_AND_CLEAR_BUFFER) }
100+AWK_PRINT_AND_CLEAR_BUFFER = $(AWK_PRINT_LINE_BUFFER) $(AWK_CLEAR_LINE_BUFFER)
101+AWK_COLLECT_MESSAGE = \
102+ for( i = 0; i < NF; ) \
103+ { if( linebuf == "" ) newbuf = $$++i; else \
104+ { newbuf = linebuf; \
105+ if( match( linebuf, "[.!?]$$" ) ) newbuf = newbuf " "; \
106+ newbuf = newbuf " " $$++i; \
107+ } \
108+ if( length( newbuf ) > $(MESSAGE_FOLD_WIDTH) ) \
109+ { print linebuf; \
110+ linebuf = $$i; \
111+ } \
112+ else linebuf = newbuf; \
113+ }
114+AWK_COLLECT_BLANK_LINE = $(AWK_FLUSH_LINE_BUFFER) $(AWK_PRINT_LINE_BUFFER)
115+AWK_PRINT_LINE_BUFFER = print linebuf;
116+
117+# Identify an appropriate resource compiler, for GUI builds,
118+# and define a set of script macros to propagate the build-time
119+# specific package meta-data into the compile resource modules.
120+#
56121 RC = @RC@
57122 RC_SCRIPT = tag=$(BUILD_TAG); \
58123 test "x$$tag" != x && tag="-$(GUI_RELEASE_CLASS)-$$tag"; \
@@ -70,6 +135,9 @@ TAG_SCRIPT = sed \
70135
71136 RC_INCLUDES = -I ${srcdir}/src -I ${srcdir}/icons
72137
138+# Specify extensions, and link-time requirements, for binary
139+# package deliverables.
140+#
73141 OBJEXT = @OBJEXT@
74142 EXEEXT = @EXEEXT@
75143
@@ -77,6 +145,8 @@ LDFLAGS = @LDFLAGS@
77145 GUI_LDFLAGS = -mwindows $(LDFLAGS)
78146 LIBS = -Wl,-Bstatic -llua -lz -lbz2 -llzma -Wl,-Bdynamic -lwininet
79147
148+# Define the content of package deliverables.
149+#
80150 CORE_DLL_OBJECTS = climain.$(OBJEXT) pkgshow.$(OBJEXT) dmhcore.$(OBJEXT) \
81151 pkgbind.$(OBJEXT) pkginet.$(OBJEXT) pkgstrm.$(OBJEXT) pkgname.$(OBJEXT) \
82152 pkgexec.$(OBJEXT) pkgfind.$(OBJEXT) pkginfo.$(OBJEXT) pkgspec.$(OBJEXT) \
@@ -126,11 +196,33 @@ lastrites$(EXEEXT): rites.$(OBJEXT)
126196 mingw-get-0.dll: $(CORE_DLL_OBJECTS)
127197 $(CXX) -shared -o $@ $(CXXFLAGS) $(LDFLAGS) $+ $(LIBS)
128198
199+# The following recursive invocation hook provides a mechanism for
200+# accessing make's facility for reporting what it is doing, even when
201+# the command to be invoked is encapsulated within a more complex block,
202+# which has been marked for explicit silent execution; usage is:
203+#
204+# $(WITH_REQUEST)='command to be executed' execute-command
205+#
206+# (with no intervening white space around the assignment operator, and
207+# ensuring that the command to be executed is appropriately quoted).
208+#
209+WITH_REQUEST = $(QUIET_MAKE) COMMAND
210+execute-command:
211+ $(COMMAND)
212+
129213 # Compilation and dependency tracking...
130214 #
131215 DEPFLAGS = -MM -MP -MD
132216 sinclude *.d
133217
218+%.c: %.l
219+ @test x$(LEX) = x: \
220+ && { $(QUIET_MAKE) LEX=lex $(@F) || $(LEX_COMMAND_ABORT); } \
221+ || $(WITH_REQUEST)='$(LEX_COMMAND)' execute-command
222+ @test -f $(LEX_OUTPUT) && test -n "`cat $(LEX_OUTPUT)`" \
223+ && $(WITH_REQUEST)='mv $(LEX_OUTPUT) $(@F)' execute-command \
224+ || $(WITH_REQUEST)='rm -f $(LEX_OUTPUT)' execute-command
225+
134226 %.$(OBJEXT): %.c
135227 $(CC) $(DEPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
136228 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -23,6 +23,7 @@
2323 # arising from the use of this software.
2424 #
2525 m4_include([build-aux/m4/missing.m4])
26+m4_include([build-aux/m4/makeopts.m4])
2627
2728 # MINGW_AC_OUTPUT
2829 # ---------------
@@ -33,5 +34,22 @@ AC_DEFUN([MINGW_AC_OUTPUT],
3334 [AC_REQUIRE([_MINGW_AC_ABORT_IF_MISSING_PREREQ])dnl
3435 AC_OUTPUT($@)dnl
3536 ])# MINGW_AC_OUTPUT
37+
38+# MINGW_AC_PROG_LEX
39+# -----------------
40+# A wrapper for AC_PROG_LEX; it causes configure to abort, issuing a
41+# missing lex diagnostic, when building from SCM sources, (as indicated
42+# by absence of ${srcdir}/src/pkginfo/pkginfo.c), when no lex processor
43+# appears to be available. Furthermore, if AC_PROG_LEX fails to assign
44+# a sane value to LEX_OUTPUT_ROOT, this provides lex.yy as default.
45+#
46+AC_DEFUN([MINGW_AC_PROG_LEX],
47+[AC_REQUIRE([AC_PROG_LEX])dnl
48+ AS_IF([test x${LEX_OUTPUT_ROOT} = x],[LEX_OUTPUT_ROOT=lex.yy])
49+ AS_IF([test x${LEX} != x:],,[test -f ${srcdir}/src/pkginfo/pkginfo.c],,
50+ [MINGW_AC_ASSERT_MISSING([lex (or for preference, flex)],
51+ [flex-2.5.35-2-msys-1.0.13-bin.tar.lzma (or equivalent)])dnl
52+ ])dnl
53+])# MINGW_AC_PROG_LEX
3654 #
3755 # $RCSfile$: end of file
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
2222 # MinGW.org Project, accept liability for any damages, however caused,
2323 # arising from the use of this software.
2424 #
25- AC_INIT([mingw-get],[0.6],[http://mingw.org/Reporting_Bugs])
25+ AC_INIT([mingw-get],[0.6.0],[http://mingw.org/Reporting_Bugs])
2626
2727 AC_SUBST([COPYRIGHT_HOLDER],["MinGW.org Project"])
2828 AC_SUBST([YEARS_OF_ISSUE],["2009-2013"])
@@ -58,6 +58,11 @@
5858 build_alias=`${srcdir}/build-aux/config.guess`
5959 AC_CANONICAL_HOST
6060
61+# Establish the appropriate mechanism for invoking 'make' recursively,
62+# WITHOUT incurring the noise of its "Entering directory..." messages.
63+#
64+ MINGW_AC_MAKE_NO_PRINT_DIRECTORY
65+
6166 # We need both C and C++ compilers; check how to invoke them
6267 #
6368 AC_PROG_CC
@@ -67,7 +72,7 @@
6772 # and a lexical analyser generator
6873 #
6974 AC_CHECK_TOOL([RC],[windres],[windres])
70- AC_PROG_LEX
75+ MINGW_AC_PROG_LEX
7176
7277 # Ensure that (at least the headers for) prerequisite libraries,
7378 # zlib, libbz2, liblzma, liblua, and libwtklite are available