diff options
author | Glenn Morris <rgm@gnu.org> | 2014-06-28 15:57:23 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2014-06-28 15:57:23 -0700 |
commit | 93160ec3928b5efd654824dfc727d1bbec3c0aec (patch) | |
tree | dbca945901d1ff3d2d21e5b20f18ae76d6b134f7 /lwlib/Makefile.in | |
parent | e0d9c3c9a26ba2982595ec2ec4a1167ee7e39ddb (diff) | |
download | emacs-93160ec3928b5efd654824dfc727d1bbec3c0aec.tar.gz |
Use gcc auto-dependency information for lwlib and oldXMenu
* configure.ac (lwlib_deps_frag, oldxmenu_deps_frag): New output files.
* make-dist (lwlib, oldXMenu): Distribute *.mk.
* lwlib/Makefile.in: Move old dependency information to new file deps.mk.
(MKDIR_P, DEPFLAGS, MKDEPDIR, lwlib_deps_frag):
New, set by configure.
(DEPDIR): New variable.
(ALL_CFLAGS): Add DEPFLAGS.
(.c.o): Add MKDEPDIR.
(clean, mostlyclean): Delete DEPDIR.
* lwlib/deps.mk, lwlib/autodeps.mk: New files.
* oldXMenu/Makefile.in: Move old dependency information to new file deps.mk.
(MKDIR_P, DEPFLAGS, MKDEPDIR, oldxmenu_deps_frag):
New, set by configure.
(DEPDIR): New variable.
(ALL_CFLAGS): Add DEPFLAGS.
(.c.o): Add MKDEPDIR.
(clean, mostlyclean): Delete DEPDIR.
* oldXMenu/deps.mk, oldXMenu/autodeps.mk: New files.
* src/deps.mk: Comment update.
* .bzrignore: Ignore lwlib/deps, oldXMenu/deps.
Diffstat (limited to 'lwlib/Makefile.in')
-rw-r--r-- | lwlib/Makefile.in | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index 7185aa60727..516b3286951 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in @@ -41,6 +41,7 @@ RANLIB=@RANLIB@ AR = @AR@ ARFLAGS = @ARFLAGS@ +MKDIR_P = @MKDIR_P@ LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o MOTIF_OBJS = lwlib-Xm.o @@ -50,13 +51,19 @@ TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS) OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o +DEPDIR = deps +## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. +DEPFLAGS = @DEPFLAGS@ +## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. +MKDEPDIR = @MKDEPDIR@ + ## ../src is where the generated file (config.h, globals.h) are. ## $(srcdir)/../src is where the non-generated files (lisp.h) are. ## (In an out-of-tree build, these two are not the same.) ## $(srcdir) is where the lwlib sources are. ## There are no generated lwlib files, hence no need for -I. ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ - $(C_SWITCH_MACHINE) \ + $(C_SWITCH_MACHINE) $(DEPFLAGS) \ $(WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \ -Demacs -I../src \ -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib @@ -65,6 +72,7 @@ all: liblw.a .PHONY: all .c.o: + @$(MKDEPDIR) $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< liblw.a: $(OBJS) @@ -72,30 +80,18 @@ liblw.a: $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ -## Generated files in ../src, non-generated in $(srcdir)/../src. -config_h = ../src/config.h $(srcdir)/../src/conf_post.h -lisp_h = $(srcdir)/../src/lisp.h -## lisp.h includes this. globals_h = ../src/globals.h -src_h = $(config_h) $(lisp_h) $(globals_h) - $(globals_h): $(MAKE) -C ../src globals.h -lwlib-utils.o: $(src_h) lwlib-utils.c lwlib-utils.h lwlib.h -lwlib.o: $(src_h) lwlib.c lwlib.h lwlib-int.h lwlib-utils.h \ - lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h -lwlib-Xlw.o: $(src_h) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h xlwmenu.h -lwlib-Xaw.o: $(src_h) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h -lwlib-Xm.o: $(src_h) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h -xlwmenu.o: $(src_h) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h \ - $(srcdir)/../src/xterm.h - +## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. +@lwlib_deps_frag@ .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean clean mostlyclean: rm -f *.o liblw.a \#* + -rm -rf ${DEPDIR} distclean: clean rm -f Makefile |