|
|
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: %.user.defs.c: %.cli ! 78: $(AM_V_at) rm -f $@ ! 79: $(AM_V_GEN) cp -p $< $@ ! 80: %.server.h %.server.c %.server.msgids: lib_dep_tr_for_defs_a-%.server.defs.$(OBJEXT) ! 81: $(MIGCOM_V) $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) \ ! 82: -sheader $*.server.h -server $*.server.c \ ! 83: -list $*.server.msgids \ ! 84: < $< ! 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: < $< ! 90: ! 91: # This is how it should be done, but this is not integrated into GNU Automake ! 92: # and is missing automatic inter-file dependency management because of that. ! 93: ! 94: # These chained rules could be (and used to be) single rules using pipes or ! 95: # could even --- if you dare to --- use the `mig' shell script, but it's ! 96: # convenient to be able to explicitly make the intermediate files when you want ! 97: # to deal with a problem in the MIG stub generator. ! 98: ! 99: # TODO. Get rid of the .srv files and rather use .defs files and MIG*SFLAGS? ! 100: #%.server.defs: %.srv ! 101: # $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $< ! 102: #%.server.defs: %.defs ! 103: # $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) $(MIGSFLAGS) -o $@ $< ! 104: #%.server.h %.server.c %.server.msgids: %.server.defs ! 105: # $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMSFLAGS) \ ! 106: # -sheader $*.server.h -server $*.server.c \ ! 107: # -list $*.server.msgids \ ! 108: # < $< ! 109: # TODO. Get rid of the .cli files and rather use .defs files and MIG*UFLAGS? ! 110: #%.user.defs: %.cli ! 111: # $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $< ! 112: #%.user.defs: %.defs ! 113: # $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) $(MIGUFLAGS) -o $@ $< ! 114: #%.user.h %.user.c %.user.msgids: %.user.defs ! 115: # $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) \ ! 116: # -user $*.user.c -header $*.user.h \ ! 117: # -list $*.user.msgids \ ! 118: # < $<
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.