summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Makefrag.am14
-rw-r--r--Makerules.am50
-rw-r--r--Makerules.mig.am118
-rw-r--r--i386/Makefrag.am3
5 files changed, 129 insertions, 61 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c05a0b..6567159 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2007-06-02 Thomas Schwinge <tschwinge@gnu.org>
+ * Makerules.mig.am: New file, factored out of code of...
+ * Makefrag.am: ... this file and...
+ * Makerules.am: ... this file.
+ * i386/Makefrag.am: Update comment.
+
* Makefile.am (MIGFLAGS): Remove.
(MIGCOM): Add ``-n''.
* Makerules.am: Adapt to that.
diff --git a/Makefrag.am b/Makefrag.am
index b6bdc57..c33a378 100644
--- a/Makefrag.am
+++ b/Makefrag.am
@@ -411,18 +411,8 @@ EXTRA_DIST += \
#
# Automatically generated source files.
#
-
-# TODO. Get rid of that stuff and lib_dep_tr_for_defs.a. See the thread at
-# <http://lists.gnu.org/archive/html/automake/2006-10/msg00039.html> about what
-# we really want to do.
-noinst_LIBRARIES += \
- lib_dep_tr_for_defs.a
-nodist_lib_dep_tr_for_defs_a_SOURCES =
-MOSTLYCLEANFILES += \
- $(nodist_lib_dep_tr_for_defs_a_SOURCES)
-# Preprocess only.
-lib_dep_tr_for_defs_a_CPPFLAGS = $(AM_CPPFLAGS) \
- -E
+# See Makerules.mig.am.
+#
# User stubs.
nodist_lib_dep_tr_for_defs_a_SOURCES += \
diff --git a/Makerules.am b/Makerules.am
index 2f209c3..37d383a 100644
--- a/Makerules.am
+++ b/Makerules.am
@@ -29,54 +29,8 @@ EXTRA_DIST += \
-e 's/^[*]/#define/' \
-e 's/mAgIc[^-0-9]*//'
-#
-# Building RPC stubs.
-#
-
-# These chained rules could be (and used to be) single rules using pipes or
-# could even --- if you dare to --- use the `mig' shell script, but it's
-# convenient to be able to explicitly make the intermediate files when you want
-# to deal with a problem in the MIG stub generator.
-
-# TODO. Get rid of the following four rules and the lib_dep_tr_for_defs.a
-# machinery (see Makefrag.am and i386/Makefrag.am).
-%.server.defs.c: %.srv
- rm -f $@
- cp -p $< $@
-%.user.defs.c: %.cli
- rm -f $@
- cp -p $< $@
-%.server.h %.server.c %.server.msgids: lib_dep_tr_for_defs_a-%.server.defs.$(OBJEXT)
- $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) \
- -sheader $*.server.h -server $*.server.c \
- -list $*.server.msgids \
- < $<
-%.user.h %.user.c %.user.msgids: lib_dep_tr_for_defs_a-%.user.defs.$(OBJEXT)
- $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) \
- -user $*.user.c -header $*.user.h \
- -list $*.user.msgids \
- < $<
-
-# TODO. Get rid of the .srv files and rather use .defs files and MIG*SFLAGS?
-#%.server.defs: %.srv
-# $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $<
-#%.server.defs: %.defs
-# $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) $(MIGSFLAGS) -o $@ $<
-#%.server.h %.server.c %.server.msgids: %.server.defs
-# $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) \
-# -sheader $*.server.h -server $*.server.c \
-# -list $*.server.msgids \
-# < $<
-# TODO. Get rid of the .cli files and rather use .defs files and MIG*UFLAGS?
-#%.user.defs: %.cli
-# $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $<
-#%.user.defs: %.defs
-# $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) $(MIGUFLAGS) -o $@ $<
-#%.user.h %.user.c %.user.msgids: %.user.defs
-# $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) \
-# -user $*.user.c -header $*.user.h \
-# -list $*.user.msgids \
-# < $<
+# Makerules.mig: how to do some MIG-related things.
+include Makerules.mig.am
#
# gzip files.
diff --git a/Makerules.mig.am b/Makerules.mig.am
new file mode 100644
index 0000000..b3f76da
--- /dev/null
+++ b/Makerules.mig.am
@@ -0,0 +1,118 @@
+# Makerules.mig: how to do some MIG-related things.
+
+# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Written by Thomas Schwinge.
+
+# serial 0
+
+# TODO. This file should probably be distributed with GNU MIG and then there
+# should be some mechanism so that every package using it is automagically
+# using the latest available (or best-matching) version of it. Which is not
+# trivial, as the file is already needed to build the build system. But then,
+# this file does not really depend on GNU Automake. Hmm...
+
+# USAGE.
+
+# Before `include'ing this file, `noinst_LIBRARIES' and `MOSTLYCLEANFILES' have
+# to be initialized.
+
+# For using these rules, `AM_CPPFLAGS', `MIGCOM', `MIGCOMFLAGS', `MIGCOMSFLAGS'
+# and `MIGCOMUFLAGS' have to be defined as desired.
+
+# Then you can (read: currently ``have to''; see below for comments) use
+# constructs like:
+#
+# # User stubs.
+# nodist_lib_dep_tr_for_defs_a_SOURCES += \
+# vm/memory_object_user.user.defs.c
+# nodist_libkernel_a_SOURCES += \
+# vm/memory_object_user.user.h \
+# vm/memory_object_user.user.c \
+# vm/memory_object_user.user.msgids
+#
+# # Server stubs.
+# nodist_lib_dep_tr_for_defs_a_SOURCES += \
+# device/device.server.defs.c
+# nodist_libkernel_a_SOURCES += \
+# device/device.server.h \
+# device/device.server.c \
+# device/device.server.msgids
+
+#
+# Building RPC stubs.
+#
+
+# TODO. Get rid of that stuff, lib_dep_tr_for_defs.a and the four following
+# rules. See the thread at
+# <http://lists.gnu.org/archive/html/automake/2006-10/msg00039.html> about what
+# we really want to do. This requires work on GNU Automake.
+
+noinst_LIBRARIES += \
+ lib_dep_tr_for_defs.a
+nodist_lib_dep_tr_for_defs_a_SOURCES =
+MOSTLYCLEANFILES += \
+ $(nodist_lib_dep_tr_for_defs_a_SOURCES)
+# Preprocess only.
+lib_dep_tr_for_defs_a_CPPFLAGS = $(AM_CPPFLAGS) \
+ -E
+
+%.server.defs.c: %.srv
+ rm -f $@
+ cp -p $< $@
+%.user.defs.c: %.cli
+ rm -f $@
+ cp -p $< $@
+%.server.h %.server.c %.server.msgids: lib_dep_tr_for_defs_a-%.server.defs.$(OBJEXT)
+ $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) \
+ -sheader $*.server.h -server $*.server.c \
+ -list $*.server.msgids \
+ < $<
+%.user.h %.user.c %.user.msgids: lib_dep_tr_for_defs_a-%.user.defs.$(OBJEXT)
+ $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) \
+ -user $*.user.c -header $*.user.h \
+ -list $*.user.msgids \
+ < $<
+
+# This is how it should be done, but this is not integrated into GNU Automake
+# and is missing automatic inter-file dependency management because of that.
+
+# These chained rules could be (and used to be) single rules using pipes or
+# could even --- if you dare to --- use the `mig' shell script, but it's
+# convenient to be able to explicitly make the intermediate files when you want
+# to deal with a problem in the MIG stub generator.
+
+# TODO. Get rid of the .srv files and rather use .defs files and MIG*SFLAGS?
+#%.server.defs: %.srv
+# $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $<
+#%.server.defs: %.defs
+# $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) $(MIGSFLAGS) -o $@ $<
+#%.server.h %.server.c %.server.msgids: %.server.defs
+# $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) \
+# -sheader $*.server.h -server $*.server.c \
+# -list $*.server.msgids \
+# < $<
+# TODO. Get rid of the .cli files and rather use .defs files and MIG*UFLAGS?
+#%.user.defs: %.cli
+# $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $<
+#%.user.defs: %.defs
+# $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) $(MIGUFLAGS) -o $@ $<
+#%.user.h %.user.c %.user.msgids: %.user.defs
+# $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) \
+# -user $*.user.c -header $*.user.h \
+# -list $*.user.msgids \
+# < $<
diff --git a/i386/Makefrag.am b/i386/Makefrag.am
index 3e17bb4..2b74bda 100644
--- a/i386/Makefrag.am
+++ b/i386/Makefrag.am
@@ -162,8 +162,9 @@ libkernel_a_SOURCES += \
#
# Automatically generated source files.
#
+# See Makerules.mig.am.
+#
-# See Makefrag.am about lib_dep_tr_for_defs.a.
nodist_lib_dep_tr_for_defs_a_SOURCES += \
i386/i386/mach_i386.server.defs.c
nodist_libkernel_a_SOURCES += \