|
|
1.1 root 1: # Makerules.mig: how to do some MIG-related things.
2:
3: # Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
4:
5: # This program is free software; you can redistribute it and/or modify it
6: # under the terms of the GNU General Public License as published by the
7: # Free Software Foundation; either version 2, or (at your option) any later
8: # version.
9: #
10: # This program is distributed in the hope that it will be useful, but
11: # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12: # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: # for more details.
14: #
15: # You should have received a copy of the GNU General Public License along
16: # with this program; if not, write to the Free Software Foundation, Inc.,
17: # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18: #
19: # Written by Thomas Schwinge.
20:
21: # serial 0
22:
23: # TODO. This file should probably be distributed with GNU MIG and then there
24: # should be some mechanism so that every package using it is automagically
25: # using the latest available (or best-matching) version of it. Which is not
26: # trivial, as the file is already needed to build the build system. But then,
27: # this file does not really depend on GNU Automake. Hmm...
28:
29: # USAGE.
30:
31: # Before `include'ing this file, `noinst_LIBRARIES' and `MOSTLYCLEANFILES' have
32: # to be initialized.
33:
34: # For using these rules, `AM_CPPFLAGS', `MIGCOM', `MIGCOMFLAGS', `MIGCOMSFLAGS'
35: # and `MIGCOMUFLAGS' have to be defined as desired.
36:
37: # Then you can (read: currently ``have to''; see below for comments) use
38: # constructs like:
39: #
40: # # User stubs.
41: # nodist_lib_dep_tr_for_defs_a_SOURCES += \
42: # vm/memory_object_user.user.defs.c
43: # nodist_libkernel_a_SOURCES += \
44: # vm/memory_object_user.user.h \
45: # vm/memory_object_user.user.c \
46: # vm/memory_object_user.user.msgids
47: #
48: # # Server stubs.
49: # nodist_lib_dep_tr_for_defs_a_SOURCES += \
50: # device/device.server.defs.c
51: # nodist_libkernel_a_SOURCES += \
52: # device/device.server.h \
53: # device/device.server.c \
54: # device/device.server.msgids
55:
56: #
57: # Building RPC stubs.
58: #
59:
60: # TODO. Get rid of that stuff, lib_dep_tr_for_defs.a and the four following
61: # rules. See the thread at
62: # <http://lists.gnu.org/archive/html/automake/2006-10/msg00039.html> about what
63: # we really want to do. This requires work on GNU Automake.
64:
65: noinst_LIBRARIES += \
66: lib_dep_tr_for_defs.a
67: nodist_lib_dep_tr_for_defs_a_SOURCES =
68: MOSTLYCLEANFILES += \
69: $(nodist_lib_dep_tr_for_defs_a_SOURCES)
70: # Preprocess only.
71: lib_dep_tr_for_defs_a_CPPFLAGS = $(AM_CPPFLAGS) \
72: -E
73:
74: %.server.defs.c: %.srv
75: $(AM_V_at) rm -f $@
76: $(AM_V_GEN) cp -p $< $@
77: %.server.h %.server.c %.server.msgids: lib_dep_tr_for_defs_a-%.server.defs.$(OBJEXT)
78: $(MIGCOM_V) $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) \
79: -sheader $*.server.h -server $*.server.c \
80: -list $*.server.msgids \
81: < $<
1.1.1.2 ! root 82: %.user.defs.c: %.cli
! 83: $(AM_V_at) rm -f $@
! 84: $(AM_V_GEN) cp -p $< $@
1.1 root 85: %.user.h %.user.c %.user.msgids: lib_dep_tr_for_defs_a-%.user.defs.$(OBJEXT)
86: $(MIGCOM_V) $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) \
87: -user $*.user.c -header $*.user.h \
88: -list $*.user.msgids \
89: < $<
1.1.1.2 ! root 90: # Stand-alone rule to generate the list of message ids when neither
! 91: # the client nor the server stubs are required.
! 92: %.none.defs.c: %.defs
! 93: $(AM_V_at) rm -f $@
! 94: $(AM_V_GEN) cp -p $< $@
! 95: %.none.msgids: lib_dep_tr_for_defs_a-%.none.defs.$(OBJEXT)
! 96: $(MIGCOM_V) $(MIGCOM) $(MIGCOMFLAGS) \
! 97: -list $*.none.msgids \
! 98: < $<
1.1 root 99:
100: # This is how it should be done, but this is not integrated into GNU Automake
101: # and is missing automatic inter-file dependency management because of that.
102:
103: # These chained rules could be (and used to be) single rules using pipes or
104: # could even --- if you dare to --- use the `mig' shell script, but it's
105: # convenient to be able to explicitly make the intermediate files when you want
106: # to deal with a problem in the MIG stub generator.
107:
108: # TODO. Get rid of the .srv files and rather use .defs files and MIG*SFLAGS?
109: #%.server.defs: %.srv
110: # $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $<
111: #%.server.defs: %.defs
112: # $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) $(MIGSFLAGS) -o $@ $<
113: #%.server.h %.server.c %.server.msgids: %.server.defs
114: # $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) \
115: # -sheader $*.server.h -server $*.server.c \
116: # -list $*.server.msgids \
117: # < $<
118: # TODO. Get rid of the .cli files and rather use .defs files and MIG*UFLAGS?
119: #%.user.defs: %.cli
120: # $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $<
121: #%.user.defs: %.defs
122: # $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) $(MIGUFLAGS) -o $@ $<
123: #%.user.h %.user.c %.user.msgids: %.user.defs
124: # $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) \
125: # -user $*.user.c -header $*.user.h \
126: # -list $*.user.msgids \
127: # < $<
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.