netobj/src/netobj.tmpl


% Copyright (C) 1993, Digital Equipment Corporation
% All rights reserved.
% See the file COPYRIGHT for a full description.
%
% Last modified on Fri Feb 10 08:28:26 PST 1995 by kalsow
%      modified on Thu Mar  3 15:41:57 PST 1994 by wobber
%      modified on Fri Aug 13 10:01:08 PDT 1993 by harrison
%      modified on Wed May 19 12:35:20 PDT 1993 by mjordan

if defined ("STUBGEN")
  % take the version specified by the user
  _NETOBJ_STUBGEN = STUBGEN
else
  _NETOBJ_STUBGEN = format ("%s%s%s", BIN_USE, SL, "stubgen")  %% - full path
  %% _NETOBJ_STUBGEN = "stubgen"
end
/* _NETOBJ_STUBGEN = format("/udir/wobber/m3/stubgen/%s/stubgen", BUILD_DIR) */

readonly proc _v_netobj (intf, type, v, useintf, version) is
  local base_name = format ("%s_%s_v%s", intf, type, version)
  local intf_pn = path_of(intf & ".i3")
  local netobjuse = ""
  local v_arg = "-v" & version

  if useintf
    netobjuse = "-i"
  end

  % The generated sources are in the build directory of THIS_PACKAGE
  %
  derived_interface (base_name, v)
  derived_implementation (base_name)

  if defined("_all") % then we're building, not cleaning or shipping
    if stale(base_name & ".i3", intf_pn)
      generate_tfile()
      exec(_NETOBJ_STUBGEN, v_arg, "-sno", intf & "." & type, netobjuse, useintf,
            M3SEARCH_TABLES)
    end
  end
end % _v_netobj

readonly proc netobjv1(intf, type) is
  _v_netobj(intf, type, HIDDEN, "", "1")
end

readonly proc Netobjv1(intf, type) is
  _v_netobj(intf, type, VISIBLE, "", "1")
end

readonly proc netobjv2(intf, type) is
  _v_netobj(intf, type, HIDDEN, "", "2")
end

readonly proc Netobjv2(intf, type) is
  _v_netobj(intf, type, VISIBLE, "", "2")
end

readonly proc Netobj(intf, type) is
  Netobjv1(intf, type)
end

readonly proc netobj(intf, type) is
  netobjv1(intf, type)
end

readonly proc netobjrv1(intf, type, useintf) is
  _v_netobj(intf, type, HIDDEN, useintf, "1")
end

readonly proc Netobjrv1(intf, type, useintf) is
  _v_netobj(intf, type, VISIBLE, useintf, "1")
end

readonly proc netobjrv2(intf, type, useintf) is
  _v_netobj(intf, type, HIDDEN, useintf, "2")
end

readonly proc Netobjrv2(intf, type, useintf) is
  _v_netobj(intf, type, VISIBLE, useintf, "2")
end

readonly proc Netobjr(intf, type, useintf) is
  Netobjrv1(intf, type, useintf)
end

readonly proc netobjr(intf, type, useintf) is
  netobjrv1(intf, type, useintf)
end