summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-07-24 16:30:25 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:38 +0200
commit93e37a911f657e6e0b1f9b47a0761bb5fbf4ac35 (patch)
tree7f56142ca68fd4eb28d80afd2f602da5209b7f5c
parentaea8ac0d99eef1e71127b6b397ce67f394feb649 (diff)
2006-07-24 Thomas Schwinge <tschwinge@gnu.org>
* Makerules.in (%.h %_user.c): Add `%.cli.d' to the target list. Create these files by specifying `-MD' as a flag for mig and rename the resulting files as needed. Include these `*.cli.d' files instead of `*.migu.d' files. (%_interface.h %_server.c): Likewise for `%.srv.d' / `*.migs.d'. (%.migs.d, %.migu.d): Remove targets. * Makefile.in (clean): Adapt to the above. * i386/Makefile.in (clean): Likewise.
-rw-r--r--ChangeLog11
-rw-r--r--Makefile.in2
-rw-r--r--Makerules.in28
-rw-r--r--i386/Makefile.in2
4 files changed, 25 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index e08dff8..bef4524 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-07-24 Thomas Schwinge <tschwinge@gnu.org>
+
+ * Makerules.in (%.h %_user.c): Add `%.cli.d' to the target list.
+ Create these files by specifying `-MD' as a flag for mig and rename the
+ resulting files as needed.
+ Include these `*.cli.d' files instead of `*.migu.d' files.
+ (%_interface.h %_server.c): Likewise for `%.srv.d' / `*.migs.d'.
+ (%.migs.d, %.migu.d): Remove targets.
+ * Makefile.in (clean): Adapt to the above.
+ * i386/Makefile.in (clean): Likewise.
+
2006-06-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
* i386/i386at/kd_mouse.c (mouse_char_in, mouse_char) Remove variables.
diff --git a/Makefile.in b/Makefile.in
index 575305a..1217b28 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -248,7 +248,7 @@ clean:
rm -f clib-routines.o kernel.o kernel-undef kernel-undef-bad
rm -f kernel kernel.gz kernel.stripped kernel.stripped.gz
rm -f $(objfiles) $(subst .o,.d,$(objfiles))
- rm -f *.symc *.symc.o *_user.c *_server.c *.h *.migs.d *.migu.d
+ rm -f *.symc *.symc.o *_user.c *_server.c *.h *.cli.d *.srv.d
distclean: clean
$(MAKE) -C $(systype) $@
diff --git a/Makerules.in b/Makerules.in
index 271cf7c..7538834 100644
--- a/Makerules.in
+++ b/Makerules.in
@@ -94,14 +94,18 @@ ASFLAGS += -DASSEMBLER
# Building from foo.cli
.PRECIOUS: %_user.c
-%.h %_user.c: %.cli
- $(MIG) $(MIGFLAGS) -header $*.h -user $*_user.c -server /dev/null $<
+%.h %_user.c %.cli.d: %.cli
+ $(MIG) $(MIGFLAGS) -MD \
+ -header $*.h -user $*_user.c -server /dev/null $<
+ mv $*-mig.d $*.cli.d
# Building from foo.srv
.PRECIOUS: %_server.c
-%_interface.h %_server.c: %.srv
- $(MIG) $(MIGFLAGS) -sheader $*_interface.h -server $*_server.c \
- -header /dev/null -user /dev/null $<
+%_interface.h %_server.c %.srv.d: %.srv
+ $(MIG) $(MIGFLAGS) -MD \
+ -sheader $*_interface.h -server $*_server.c \
+ -header /dev/null -user /dev/null $<
+ mv $*-mig.d $*.srv.d
# gzip files
%.gz: %
@@ -123,23 +127,15 @@ endif
# Include dependency files
ifneq ($(no_deps),t)
-# For each file generated by MiG we need a .d file.
--include $(subst _server.o,.migs.d,$(servers)) /dev/null
--include $(subst _user.o,.migu.d,$(users)) /dev/null
+# The MIG stubs depend on their definition files.
+-include $(subst _server.o,.srv.d,$(servers)) /dev/null
+-include $(subst _user.o,.cli.d,$(users)) /dev/null
# For each .o file we need a .d file.
-include $(subst .o,.d,$(filter %.o,$(objfiles))) /dev/null
endif
-# Here is how to make those dependency files
-%.migs.d: %.srv
- (set -e; $(CPP) $(MIGFLAGS) -M -MG -x c $< | \
- sed -e 's/[^:]*:/$*_server.c $*_interface.h $@:/' > $@)
-%.migu.d: %.cli
- (set -e; $(CPP) $(MIGFLAGS) -M -MG -x c $< | \
- sed -e 's/[^:]*:/$*_user.c $*.h $@:/' > $@)
-
# Generic rule for $(CC) based compilation for making dependencies
define make-deps
set -e; $(CC) $(CFLAGS) $(CPPFLAGS) -M -MG $< | \
diff --git a/i386/Makefile.in b/i386/Makefile.in
index 1a6f6e7..6fcd5c3 100644
--- a/i386/Makefile.in
+++ b/i386/Makefile.in
@@ -148,7 +148,7 @@ clean:
$(MAKE) -C linux $@
rm -f sysdep.a
rm -f $(objfiles) $(subst .o,.d,$(objfiles))
- rm -f *.symc *.symc.o *_user.c *_server.c *.h *.migs.d *.migu.d
+ rm -f *.symc *.symc.o *_user.c *_server.c *.h *.cli.d *.srv.d
distclean: clean
$(MAKE) -C linux $@