summaryrefslogtreecommitdiff
path: root/src/Makefile.in
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-02-08 14:42:56 -0700
committerTom Tromey <tromey@redhat.com>2011-02-08 14:42:56 -0700
commit00b3c7ac85c3811774305d8ccca6a17ec207b3f1 (patch)
tree808628395db74d42f5755e5898d04b3d9b69e1b7 /src/Makefile.in
parent6ca94a0b49f08f2e59aabc51545eb8a1f726ba8b (diff)
downloademacs-00b3c7ac85c3811774305d8ccca6a17ec207b3f1.tar.gz
Make globals.h a generated header
* configure: Rebuild. * configure.in (NS_OBJC_OBJ): New subst. lib-src * make-docfile.c: Unconditionally include stdlib.h. (generate_globals): New global. (xrealloc): New function. (main): Handle '-g'. Call start_globals, write_globals. (scan_file): Conditionally call put_filename. (start_globals): New function. (struct global): New. (num_globals, globals): New globals. (add_global, compare_globals, write_globals): New functions. (scan_c_file): Update for "-g". (scan_lisp_file): Fail if "-g". (enum global_type): New. src * Makefile.in (NS_OBJC_OBJ): New variable. (base_obj): Rename from 'obj'. (obj): New variable. (globals.h, gl-stamp, $(obj)): New targets. (GLOBAL_SOURCES): New variable. * globals.h: Remove. * nsselect.m (Vselection_alist): Define. Reverts part of 2011-01-19T22:11:33Z!jan.h.d@swipnet.se. * buffer.c: Don't use "no_cell" for name of kill-buffer-hook's variable. * xselect.c (Vselection_alist): Define. Reverts part of 2011-01-19T23:32:42Z!eggert@cs.ucla.edu.
Diffstat (limited to 'src/Makefile.in')
-rw-r--r--src/Makefile.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 98b4c981482..e1c663dfbb7 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -247,6 +247,7 @@ ns_appdir=@ns_appdir@
ns_appbindir=@ns_appbindir@
ns_appsrc=@ns_appsrc@
NS_OBJ=@NS_OBJ@
+NS_OBJC_OBJ=@NS_OBJC_OBJ@
NS_SUPPORT=@NS_SUPPORT@
## Only set if NS_IMPL_GNUSTEP.
GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@
@@ -341,7 +342,7 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
## lastfile must follow all files whose initialized data areas should
## be dumped as pure by dump-emacs.
-obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
+base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \
cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
emacs.o keyboard.o macros.o keymap.o sysdep.o \
@@ -355,6 +356,7 @@ obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
region-cache.o sound.o atimer.o \
doprnt.o intervals.o textprop.o composite.o md5.o xml.o \
$(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ)
+obj = $(base_obj) $(NS_OBJC_OBJ)
## Object files used on some machine or other.
## These go in the DOC file on all machines in case they are needed.
@@ -645,6 +647,18 @@ $(libsrc)/make-docfile$(EXEEXT):
buildobj.h: Makefile
echo "#define BUILDOBJ \"$(obj) $(otherobj) " "\"" > buildobj.h
+globals.h: gl-stamp
+ cp gl-stamp globals.h
+
+GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m)
+
+gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
+ @rm -f gl-tmp
+ $(libsrc)/make-docfile -d $(srcdir) -g $(SOME_MACHINE_OBJECTS) $(obj) > gl-tmp
+ $(srcdir)/../move-if-change gl-tmp gl-stamp
+
+$(obj): globals.h
+
$(lib)/libgnu.a: $(config_h)
cd $(lib) && $(MAKE) libgnu.a