configure: new option --enable-gcc-warnings
[bpt/emacs.git] / src / Makefile.in
index 035ea27..19f5863 100644 (file)
@@ -49,6 +49,7 @@ lispsource = $(srcdir)/../lisp
 lib = ../lib
 libsrc = ../lib-src
 etc = ../etc
+leimdir = ../leim
 oldXMenudir = ../oldXMenu
 lwlibdir = ../lwlib
 lispdir = ../lisp
@@ -67,7 +68,8 @@ OTHER_FILES = @OTHER_FILES@
 PROFILING_CFLAGS = @PROFILING_CFLAGS@
 
 ## Flags to pass to the compiler to enable build warnings
-C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
+WARN_CFLAGS = @WARN_CFLAGS@
+WERROR_CFLAGS = @WERROR_CFLAGS@
 
 ## Machine-specific CFLAGS.
 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
@@ -313,7 +315,7 @@ ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I$(srcdir) \
   $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
   $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) $(PROFILING_CFLAGS) \
   $(LIBGNUTLS_CFLAGS) \
-  $(C_WARNINGS_SWITCH) $(CFLAGS)
+  $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
 ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
 
 .SUFFIXES: .m
@@ -393,13 +395,16 @@ LIBES = $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \
 
 all: emacs$(EXEEXT) $(OTHER_FILES)
 
+$(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT)
+       cd $(leimdir) && $(MAKE) $(MFLAGS) leim-list.el BUILT_EMACS=$(bootstrap_exe)
+
 ## Does anyone ever pay attention to the load-path-shadows output here?
 ## The dumped Emacs is as functional and more efficient than
 ## bootstrap-emacs, so we replace the latter with the former.
 ## Strictly speaking, emacs does not depend directly on all of $lisp,
 ## since not all pieces are used on all platforms.  But DOC depends
 ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here.
-emacs$(EXEEXT): temacs$(EXEEXT) $(etc)/DOC $(lisp)
+emacs$(EXEEXT): temacs$(EXEEXT) $(etc)/DOC $(lisp) $(leimdir)/leim-list.el
        if test "$(CANNOT_DUMP)" = "yes"; then \
          ln -f temacs$(EXEEXT) emacs$(EXEEXT); \
          EMACSLOADPATH=$(lispsource) ./emacs -batch \