-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = system_cmds
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Aggregate
+Project = system_cmds
Embedded=$(shell tconf --test TARGET_OS_EMBEDDED)
-TOOLS = dynamic_pager.tproj ac.tproj accton.tproj arch.tproj\
+SubProjects = dynamic_pager.tproj ac.tproj accton.tproj arch.tproj\
bootlog.tproj\
- dirhelper.tproj dmesg.tproj\
+ dmesg.tproj\
getconf.tproj getty.tproj hostinfo.tproj iostat.tproj\
login.tproj makekey.tproj\
mkfile.tproj newgrp.tproj nvram.tproj passwd.tproj pwd_mkdb.tproj\
reboot.tproj sync.tproj sysctl.tproj\
update.tproj vipw.tproj vifs.tproj zic.tproj zdump.tproj vm_stat.tproj\
zprint.tproj latency.tproj sc_usage.tproj fs_usage.tproj\
- sadc.tproj sar.tproj sa.tproj
+ sadc.tproj sar.tproj sa.tproj \
+ dp_notify_lib nologin.tproj pagesize.tproj
ifeq "$(Embedded)" "NO"
-TOOLS += at.tproj atrun.tproj\
+SubProjects += at.tproj atrun.tproj\
auditd.tproj audit.tproj\
chkpasswd.tproj chpass.tproj\
+ dirhelper.tproj\
shutdown.tproj
endif
-LIBRARIES = dp_notify_lib
-
-LEGACIES = nologin.tproj pagesize.tproj
-
-OTHERSRCS = Makefile.preamble Makefile README.rtf APPLE_LICENSE
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = aggregate.make
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--- /dev/null
+##
+## Temporary flags for static Teflon builds
+##
+
+CHFLAGS = true # until we really have chflags on our system
+++ /dev/null
-CLEAN_ALL_SUBPROJECTS = YES
-SUBPROJECTS =
-OTHER_CFLAGS = -mdynamic-no-pic
-ifeq "$(shell tconf --test TARGET_OS_EMBEDDED)" "YES"
-OTHER_LDFLAGS = -dead_strip
-endif
+++ /dev/null
-{
- "English_RESOURCES" = {};
- FILESTABLE = {
- CLASSES = ("zprint.c");
- "C_FILES" = ();
- FRAMEWORKS = ();
- HEADERSEARCH = ();
- "H_FILES" = ();
- "M_FILES" = ();
- "OTHER_LINKED" = ();
- "OTHER_SOURCES" = ("Makefile.preamble", Makefile, "README.rtf", "APPLE_LICENSE");
- "PRECOMPILED_HEADERS" = ();
- "PROJECT_HEADERS" = ();
- "PUBLIC_HEADERS" = ();
- SUBPROJECTS = (
- "dynamic_pager.tproj",
- "dp_notify_lib",
- "ac.tproj",
- "accton.tproj",
- "arch.tproj",
- "at.tproj",
- "atrun.tproj",
- "audit.tproj",
- "auditd.tproj",
- "chkpasswd.tproj",
- "chpass.tproj",
- "dirhelper.tproj",
- "dmesg.tproj",
- "getconf.tproj",
- "getty.tproj",
- "hostinfo.tproj",
- "iostat.tproj",
- "kgmon.tproj",
- "login.tproj",
- "makekey.tproj",
- "mkfile.tproj",
- "newgrp.tproj",
- "nologin.tproj",
- "nvram.tproj",
- "pagesize.tproj",
- "passwd.tproj",
- "pwd_mkdb.tproj",
- "reboot.tproj",
- "shutdown.tproj",
- "sync.tproj",
- "sysctl.tproj",
- "update.tproj",
- "vipw.tproj",
- "zic.tproj",
- "zdump.tproj",
- "vm_stat.tproj",
- "zprint.tproj",
- "latency.tproj",
- "sc_usage.tproj",
- "fs_usage.tproj",
- "sadc.tproj",
- "sar.tproj"
- );
- };
- LANGUAGE = English;
- "LOCALIZABLE_FILES" = {};
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- "NEXTSTEP_BUILDTOOL" = "/bin/gnumake";
- "NEXTSTEP_JAVA_COMPILER" = "/usr/bin/javac";
- "NEXTSTEP_OBJCPLUS_COMPILER" = "/usr/bin/cc";
- "PDO_UNIX_JAVA_COMPILER" = "$(NEXTDEV_BIN)/javac";
- "PDO_UNIX_OBJCPLUS_COMPILER" = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = "system_cmds";
- PROJECTTYPE = Aggregate;
- PROJECTVERSION = "2.8";
- TARGETS = ();
- "WINDOWS_JAVA_COMPILER" = "$(JDKBINDIR)/javac.exe";
- "WINDOWS_OBJCPLUS_COMPILER" = "$(DEVDIR)/gcc";
-}
vmstat\
\f2\i <vm/vm.h> not found\
-}
\ No newline at end of file
+}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = ac
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = ac
+Install_Dir = /usr/sbin
CFILES = ac.c
+MANPAGES = ac.8
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble ac.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /usr/sbin
-PDO_UNIX_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of top-level app-wrapper (e.g., Webster.app)
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# ENGLISH - boolean flag set iff $(LANGUAGE) = "English"
-# JAPANESE - boolean flag set iff $(LANGUAGE) = "Japanese"
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder that output Makefile
-# APPICON - application icon file
-# DOCICONS - dock icon files
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-
-
-# Change defaults assumed by the standard app makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Add Makefile.preamble, Makefile.postamble, and Makefile.dependencies here if
-# you would like changes to them to invalidate previous builds. The project
-# depends on $(MAKEFILES) so that changes to Makefiles will trigger a re-build.
-#MAKEFILES = Makefile
-
-# Optimization flag passed to compiler:
-#OPTIMIZATION_CFLAG = -O
-
-# Flags always passed to compiler:
-#COMMON_CFLAGS = $(PROJECT_SPECIFIC_CFLAGS) -g -Wall
-
-# Flags passed to compiler in normal 'app' compiles:
-#NORMAL_CFLAGS = $(COMMON_CFLAGS) $(OPTIMIZATION_CFLAG)
-
-# Flags passed to compiler in 'debug' compiles:
-#DEBUG_CFLAGS = $(COMMON_CFLAGS) -DDEBUG
-
-# Flags passed to compiler in 'profile' compiles
-#PROFILE_CFLAGS = $(COMMON_CFLAGS) -pg $(OPTIMIZATION_CFLAG) -DPROFILE
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root # User to chown app to
-#INSTALL_AS_GROUP = wheel # Group to chgrp app to
-#INSTALL_PERMISSIONS = # If set, 'install' chmod's executable to this
-
-# Options to strip for bundles, apps with bundles, and apps without bundles,
-# respectively.
-#RELOCATABLE_STRIP_OPTS = -x -u
-#DYLD_APP_STRIP_OPTS = -A -n
-#APP_STRIP_OPTS =
-#TOOL_STRIP_OPTS =
-#LIBRARY_STRIP_OPTS = -x -S # Note: -S strips debugging symbols
-# (Note: APP_STRIP_OPTS and TOOL_STRIP_OPTS default to empty, but
-# developers doing their own dynamic loading should set this to
-# $(DYLD_APP_STRIP_OPTS)).
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Typical
-# user-defined rules are before_install and after_install (please don't
-# redefine things like install or app, as they are owned by the top-level
-# Makefile API), which are rules that get invoked before and after the install
-# target runs. Such rules should be specified with the '::' syntax rather than
-# a single colon.
-
-after_install:
- mkdir -p "$(DSTROOT)/usr/share/man/man8"
- install -c -m 644 ac.8 "$(DSTROOT)/usr/share/man/man8/ac.8"
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags here. To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-
-BUNDLELDFLAGS = # use iff project is a bundle
-PALETTELDFLAGS = # use iff project is a palette
-
-## Specify which headers in this project should be published to the outside
-## world in a flat header directory given in PUBLIC_HEADER_DIR (which will be
-## prepended by DSTROOT, below. Any subset of these public headers can be
-## precompiled automatically after installation, with extra user-defined flags.
-PUBLIC_HEADER_DIR =
-PUBLIC_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-## Configure what is linked in at each level here. Libraries are only used in
-## the final 'app' linking step. Final 'app' linking is only done via the
-## 'app', 'debug', and 'profile' targets when they are invoked for
-## the top-level app.
-
-# Additional relocatables to be linked in at this level
-#OTHER_OFILES =
-# Additional libs to link apps against ('app' target)
-#OTHER_LIBS =
-
-# Additional libs to link apps against ('debug' target)
-OTHER_DEBUG_LIBS =
-
-# More 'app' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_LIBS =
-# More 'debug' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_DEBUG_LIBS =
-# More 'profile' libs when $(JAPANESE) = "YES"
-OTHER_JAPANESE_PROF_LIBS =
-
-# If this is a bundle, and you *know* the enclosing application will not
-# be linking with a library which you require in your bundle code, then
-# mention it here so that it gets linked into the bundle. Note that this
-# is wasteful but sometimes necessary.
-BUNDLE_LIBS =
-
-## Configure how things get built here. Additional dependencies, sourcefiles,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-# Precompiled headers to be built before any compilation occurs (e.g., draw.p)
-PRECOMPS =
-
-# Targets to be built before installation
-OTHER_INSTALL_DEPENDS =
-
-# A virtual root directory (other than /) to be prepended to the $(INSTALLDIR)
-# passed from ProjectBuilder.
-DSTROOT =
-
-# Set the following to "YES" if you want the old behavior of recursively
-# cleaning all nested subprojects during 'make clean'.
-CLEAN_ALL_SUBPROJECTS =
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-AFTER_INSTALL = after_install
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- C_FILES = ();
- H_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (ac.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, ac.8);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- GENERATEMAIN = YES;
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "/tmp/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = ac;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = accton
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = accton
+Install_Dir = /usr/sbin
CFILES = accton.c
+MANPAGES = accton.8
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble accton.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /usr/sbin
-PDO_UNIX_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.dependencies
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of top-level app-wrapper (e.g., Webster.app)
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# ENGLISH - boolean flag set iff $(LANGUAGE) = "English"
-# JAPANESE - boolean flag set iff $(LANGUAGE) = "Japanese"
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder that output Makefile
-# APPICON - application icon file
-# DOCICONS - dock icon files
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-
-
-# Change defaults assumed by the standard app makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Add Makefile.preamble, Makefile.postamble, and Makefile.dependencies here if
-# you would like changes to them to invalidate previous builds. The project
-# depends on $(MAKEFILES) so that changes to Makefiles will trigger a re-build.
-#MAKEFILES = Makefile
-
-# Optimization flag passed to compiler:
-#OPTIMIZATION_CFLAG = -O
-
-# Flags always passed to compiler:
-#COMMON_CFLAGS = $(PROJECT_SPECIFIC_CFLAGS) -g -Wall
-
-# Flags passed to compiler in normal 'app' compiles:
-#NORMAL_CFLAGS = $(COMMON_CFLAGS) $(OPTIMIZATION_CFLAG)
-
-# Flags passed to compiler in 'debug' compiles:
-#DEBUG_CFLAGS = $(COMMON_CFLAGS) -DDEBUG
-
-# Flags passed to compiler in 'profile' compiles
-#PROFILE_CFLAGS = $(COMMON_CFLAGS) -pg $(OPTIMIZATION_CFLAG) -DPROFILE
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root # User to chown app to
-#INSTALL_AS_GROUP = wheel # Group to chgrp app to
-#INSTALL_PERMISSIONS = # If set, 'install' chmod's executable to this
-
-# Options to strip for bundles, apps with bundles, and apps without bundles,
-# respectively.
-#RELOCATABLE_STRIP_OPTS = -x -u
-#DYLD_APP_STRIP_OPTS = -A -n
-#APP_STRIP_OPTS =
-#TOOL_STRIP_OPTS =
-#LIBRARY_STRIP_OPTS = -x -S # Note: -S strips debugging symbols
-# (Note: APP_STRIP_OPTS and TOOL_STRIP_OPTS default to empty, but
-# developers doing their own dynamic loading should set this to
-# $(DYLD_APP_STRIP_OPTS)).
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Typical
-# user-defined rules are before_install and after_install (please don't
-# redefine things like install or app, as they are owned by the top-level
-# Makefile API), which are rules that get invoked before and after the install
-# target runs. Such rules should be specified with the '::' syntax rather than
-# a single colon.
-
-after_install:
- install -d $(DSTROOT)/usr/share/man/man8
- install -m 0444 accton.8 $(DSTROOT)/usr/share/man/man8/accton.8
-
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags here. To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-#OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-
-BUNDLELDFLAGS = # use iff project is a bundle
-PALETTELDFLAGS = # use iff project is a palette
-
-## Specify which headers in this project should be published to the outside
-## world in a flat header directory given in PUBLIC_HEADER_DIR (which will be
-## prepended by DSTROOT, below. Any subset of these public headers can be
-## precompiled automatically after installation, with extra user-defined flags.
-PUBLIC_HEADER_DIR =
-PUBLIC_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-## Configure what is linked in at each level here. Libraries are only used in
-## the final 'app' linking step. Final 'app' linking is only done via the
-## 'app', 'debug', and 'profile' targets when they are invoked for
-## the top-level app.
-
-# Additional relocatables to be linked in at this level
-OTHER_OFILES =
-# Additional libs to link apps against ('app' target)
-#OTHER_LIBS =
-# Additional libs to link apps against ('debug' target)
-OTHER_DEBUG_LIBS =
-# Additional libs to link apps against ('profile' target)
-OTHER_PROF_LIBS =
-
-# More 'app' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_LIBS =
-# More 'debug' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_DEBUG_LIBS =
-# More 'profile' libs when $(JAPANESE) = "YES"
-OTHER_JAPANESE_PROF_LIBS =
-
-# If this is a bundle, and you *know* the enclosing application will not
-# be linking with a library which you require in your bundle code, then
-# mention it here so that it gets linked into the bundle. Note that this
-# is wasteful but sometimes necessary.
-BUNDLE_LIBS =
-
-## Configure how things get built here. Additional dependencies, sourcefiles,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-# Precompiled headers to be built before any compilation occurs (e.g., draw.p)
-PRECOMPS =
-
-# Targets to be built before installation
-OTHER_INSTALL_DEPENDS =
-
-# A virtual root directory (other than /) to be prepended to the $(INSTALLDIR)
-# passed from ProjectBuilder.
-DSTROOT =
-
-# Set the following to "YES" if you want the old behavior of recursively
-# cleaning all nested subprojects during 'make clean'.
-CLEAN_ALL_SUBPROJECTS =
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- C_FILES = ();
- H_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (accton.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- GENERATEMAIN = YES;
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = accton;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = arch
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = arch
+Install_Dir = /usr/bin
MFILES = arch.m
-FRAMEWORKS = -framework Foundation
-
-OTHERSRCS = Makefile PB.project Makefile.postamble arch.1 machine.1 arch_helper.pl
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /usr/bin
-PDO_UNIX_INSTALLDIR = /usr/bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-NEXTSTEP_PB_CFLAGS = -DARCH_PROG=\"arch\" -DMACHINE_PROG=\"machine\"
-WINDOWS_PB_CFLAGS = -DARCH_PROG=\"arch\" -DMACHINE_PROG=\"machine\"
-PDO_UNIX_PB_CFLAGS = -DARCH_PROG=\"arch\" -DMACHINE_PROG=\"machine\"
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
+Extra_Frameworks = -framework Foundation
--include Makefile.preamble
+MANPAGES = arch.1 machine.1
-include $(MAKEFILEDIR)/$(MAKEFILE)
+Extra_CC_Flags = -DARCH_PROG=\"arch\" -DMACHINE_PROG=\"machine\"
--include Makefile.postamble
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.dependencies
+HELPERDIR = /AppleInternal/Developer/Tools
+after_install:
+ @-$(RM) -f $(DSTROOT)$(INSTALLDIR)/machine
+ $(LN) -h $(DSTROOT)$(Install_Dir)/arch $(DSTROOT)$(Install_Dir)/machine
+ $(INSTALL_DIRECTORY) -d $(DSTROOT)$(HELPERDIR)
+ $(INSTALL_SCRIPT) arch_helper.pl $(DSTROOT)$(HELPERDIR)
+++ /dev/null
-HELPERDIR = /AppleInternal/Developer/Tools
-after_install::
- install -d $(DSTROOT)/usr/share/man/man1
- install -c -m 444 arch.1 $(DSTROOT)/usr/share/man/man1
- install -c -m 444 machine.1 $(DSTROOT)/usr/share/man/man1
- @-$(RM) -f $(DSTROOT)$(INSTALLDIR)/machine
- ln $(DSTROOT)$(INSTALLDIR)/arch $(DSTROOT)$(INSTALLDIR)/machine
- install -d $(DSTROOT)$(HELPERDIR)
- install -c -m 755 arch_helper.pl $(DSTROOT)$(HELPERDIR)
+++ /dev/null
-{
- FILESTABLE = {
- C_FILES = ();
- H_FILES = ();
- M_FILES = ();
- OTHER_LINKED = (arch.c);
- OTHER_SOURCES = (Makefile, PB.project, Makefile.postamble);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "/tmp/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_COMPILEROPTIONS = "-DARCH_PROG=\\\"arch\\\" -DMACHINE_PROG=\\\"machine\\\"";
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "-DARCH_PROG=\\\"arch\\\" -DMACHINE_PROG=\\\"machine\\\"";
- PDO_UNIX_INSTALLDIR = /usr/bin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = arch;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "-DARCH_PROG=\\\"arch\\\" -DMACHINE_PROG=\\\"machine\\\"";
- WINDOWS_INSTALLDIR = /usr/bin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
--- /dev/null
+-----BEGIN PGP SIGNED MESSAGE-----
+
+Sorry for the long wait, but there still were a few things to
+be ironed out in at, which I've finally done :-)
+
+The FreeBSD team does have my permission to use at, version 2.9,
+under the BSD license.
+
+You'll find it on sunsite.unc.edu's Incoming, hopefully; the
+md5 checksum is
+
+3ba2ca3c0e87e1a04feae2c6c1376b0d at-2.9.tgz
+
+Best regards
+ Thomas
+- --
+Thomas Koenig, Thomas.Koenig@ciw.uni-karlsruhe.de, ig25@dkauni2.bitnet.
+The joy of engineering is to find a straight line on a double
+logarithmic diagram.
+
+-----BEGIN PGP SIGNATURE-----
+Version: 2.6.2i
+
+iQCVAwUBMCjVrPBu+cbJcKCVAQFNiQP/dpWP57s/E8plVGUD3zfgOXDmKUvg8U7a
+VwRzJrIMuSgnSJs0wkpvcomc3NLicipfX7hhWLh/xatPM2YbF7O5HZoNdvWvexD2
+1Y67zJ+0HFb1mPnSBOrS5RFiQAe3KqmGec6E14Rih/qNoFQZBVRFXZ4xxuwP+0Rs
+e2U+TVTUz6A=
+=TvyW
+-----END PGP SIGNATURE-----
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = at
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = at
+Install_Dir = /usr/bin
HFILES = at.h panic.h parsetime.h pathnames.h privs.h perm.h
-
CFILES = at.c panic.c parsetime.c perm.c
-
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble at.man
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /usr/bin
-PDO_UNIX_INSTALLDIR = /usr/bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
+MANPAGES = at.1
PROJECT_HEADERS = privs.h pathnames.h
-NEXTSTEP_PB_CFLAGS += -D__FBSDID=__RCSID -DDAEMON_UID=1 -DDAEMON_GID=1 \
- -DDEFAULT_AT_QUEUE=\'a\' -DDEFAULT_BATCH_QUEUE=\'b\' \
+Extra_CC_Flags = -D__FBSDID=__RCSID -DDAEMON_UID=1 -DDAEMON_GID=1 \
+ -DDEFAULT_AT_QUEUE=\"a\" -DDEFAULT_BATCH_QUEUE=\"b\" \
-DPERM_PATH=\"/usr/lib/cron/\" \
-I/System/Library/Frameworks/System.framework/PrivateHeaders
-NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/$(NAME)/Build
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+
+Install_Program_Mode = 04555
+
+after_install:
+ $(LN) -f $(DSTROOT)/$(Install_Dir)/at $(DSTROOT)$(Install_Dir)/atq
+ $(LN) -f $(DSTROOT)/$(Install_Dir)/at $(DSTROOT)$(Install_Dir)/atrm
+ $(LN) -f $(DSTROOT)/$(Install_Dir)/at $(DSTROOT)$(Install_Dir)/batch
+ install -o daemon -d "$(DSTROOT)/private/var/at/spool"
+ touch "$(DSTROOT)/private/var/at/at.deny"
+ $(MKDIR) "$(DSTROOT)/usr/lib"
+ $(LN) -sf ../../var/at "$(DSTROOT)/usr/lib/cron"
+ $(LN) -sf at.1 "$(DSTROOT)/usr/share/man/man1/atrm.1"
+ $(LN) -sf at.1 "$(DSTROOT)/usr/share/man/man1/atq.1"
+ $(LN) -sf at.1 "$(DSTROOT)/usr/share/man/man1/batch.1"
+++ /dev/null
-INSTALL_PERMISSIONS = 4555
-
-after_install::
- $(LN) -f $(INSTALLED_PRODUCTS) $(DSTROOT)$(INSTALLDIR)/atq
- $(LN) -f $(INSTALLED_PRODUCTS) $(DSTROOT)$(INSTALLDIR)/atrm
- $(LN) -f $(INSTALLED_PRODUCTS) $(DSTROOT)$(INSTALLDIR)/batch
- install -o daemon -d "$(DSTROOT)/private/var/at/spool"
- touch "$(DSTROOT)/private/var/at/at.deny"
- mkdir -p "$(DSTROOT)/usr/lib"
- ln -sf ../../var/at "$(DSTROOT)/usr/lib/cron"
- mkdir -p "$(DSTROOT)/usr/share/man/man1"
- install -c -m 644 at.man "$(DSTROOT)/usr/share/man/man1/at.1"
- ln -f "$(DSTROOT)/usr/share/man/man1/at.1" "$(DSTROOT)/usr/share/man/man1/atrm.1"
- ln -f "$(DSTROOT)/usr/share/man/man1/at.1" "$(DSTROOT)/usr/share/man/man1/atq.1"
- ln -f "$(DSTROOT)/usr/share/man/man1/at.1" "$(DSTROOT)/usr/share/man/man1/batch.1"
+++ /dev/null
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
+++ /dev/null
-{
- FILESTABLE = {
- FRAMEWORKS = ();
- H_FILES = (at.h, panic.h, parsetime.h, pathnames.h, privs.h, perm.h);
- OTHER_LINKED = (at.c, panic.c, parsetime.c, perm.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, Makefile.dist, at.1);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = (privs.h, pathnames.h);
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/bin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = at;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/bin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
--- /dev/null
+.\" $FreeBSD: src/usr.bin/at/at.man,v 1.34 2003/03/26 02:38:18 keramida Exp $
+.Dd January 13, 2002
+.Dt "AT" 1
+.Os
+.Sh NAME
+.Nm at ,
+.Nm batch ,
+.Nm atq ,
+.Nm atrm
+.Nd queue, examine, or delete jobs for later execution
+.Sh SYNOPSIS
+.Nm at
+.Op Fl q Ar queue
+.Op Fl f Ar file
+.Op Fl mldbv
+.Ar time
+.Nm at
+.Op Fl q Ar queue
+.Op Fl f Ar file
+.Op Fl mldbv
+.Fl t
+.Sm off
+.Op Oo Ar CC Oc Ar YY
+.Ar MM DD hh mm Op . Ar SS
+.Sm on
+.Nm at
+.Fl c Ar job Op Ar job ...
+.Nm at
+.Fl l Op Ar job ...
+.Nm at
+.Fl l
+.Fl q Ar queue
+.Nm at
+.Fl r Ar job Op Ar job ...
+.Pp
+.Nm atq
+.Op Fl q Ar queue
+.Op Fl v
+.Pp
+.Nm atrm
+.Ar job
+.Op Ar job ...
+.Pp
+.Nm batch
+.Op Fl q Ar queue
+.Op Fl f Ar file
+.Op Fl mv
+.Op Ar time
+.Sh DESCRIPTION
+The
+.Nm at
+and
+.Nm batch
+utilities
+read commands from standard input or a specified file.
+The commands are executed at a later time, using
+.Xr sh 1 .
+.Bl -tag -width indent
+.It Nm at
+executes commands at a specified time;
+.It Nm atq
+lists the user's pending jobs, unless the user is the superuser; in that
+case, everybody's jobs are listed;
+.It Nm atrm
+deletes jobs;
+.It Nm batch
+executes commands when system load levels permit; in other words, when the load average
+drops below _LOADAVG_MX, or the value specified in the invocation of
+.Nm atrun .
+.El
+.Pp
+The
+.Nm at
+utility allows some moderately complex
+.Ar time
+specifications.
+It accepts times of the form
+.Ar HHMM
+or
+.Ar HH:MM
+to run a job at a specific time of day.
+(If that time is already past, the next day is assumed.)
+As an alternative, the following keywords may be specified:
+.Em midnight ,
+.Em noon ,
+or
+.Em teatime
+(4pm)
+and time-of-day may be suffixed with
+.Em AM
+or
+.Em PM
+for running in the morning or the evening.
+The day on which the job is to be run may also be specified
+by giving a date in the form
+.Ar \%month-name day
+with an optional
+.Ar year ,
+or giving a date of the forms
+.Ar DD.MM.YYYY ,
+.Ar DD.MM.YY ,
+.Ar MM/DD/YYYY ,
+.Ar MM/DD/YY ,
+.Ar MMDDYYYY , or
+.Ar MMDDYY .
+The specification of a date must follow the specification of
+the time of day.
+Time can also be specified as:
+.Op Em now
+.Em + Ar count \%time-units ,
+where the time-units can be
+.Em minutes ,
+.Em hours ,
+.Em days ,
+.Em weeks ,
+.Em months
+or
+.Em years
+and
+.Nm at
+may be told to run the job today by suffixing the time with
+.Em today
+and to run the job tomorrow by suffixing the time with
+.Em tomorrow .
+.Pp
+For example, to run a job at 4pm three days from now, use
+.Nm at Ar 4pm + 3 days ,
+to run a job at 10:00am on July 31, use
+.Nm at Ar 10am Jul 31
+and to run a job at 1am tomorrow, use
+.Nm at Ar 1am tomorrow .
+.Pp
+The
+.Nm at
+utility also supports the
+.Tn POSIX
+time format (see
+.Fl t
+option).
+.Pp
+For both
+.Nm at
+and
+.Nm batch ,
+commands are read from standard input or the file specified
+with the
+.Fl f
+option.
+The working directory, the environment (except for the variables
+.Ev TERM ,
+.Ev TERMCAP ,
+.Ev DISPLAY
+and
+.Em _ ) ,
+and the
+.Ar umask
+are retained from the time of invocation.
+An
+.Nm at
+or
+.Nm batch
+command invoked from a
+.Xr su 1
+shell will retain the current userid.
+The user will be mailed standard error and standard output from his
+commands, if any.
+Mail will be sent using the command
+.Xr sendmail 8 .
+If
+.Nm at
+is executed from a
+.Xr su 1
+shell, the owner of the login shell will receive the mail.
+.Pp
+The superuser may use these commands in any case.
+For other users, permission to use
+.Nm at
+is determined by the files
+.Pa _PERM_PATH/at.allow
+and
+.Pa _PERM_PATH/at.deny .
+.Pp
+If the file
+.Pa _PERM_PATH/at.allow
+exists, only usernames mentioned in it are allowed to use
+.Nm at .
+In these two files,
+a user is considered to be listed
+only if the user name has no blank or other characters
+before it on its line and a newline character immediately after the name,
+even at the end of the file.
+Other lines are ignored and may be used for comments.
+.Pp
+If
+.Pa _PERM_PATH/at.allow
+does not exist,
+.Pa _PERM_PATH/at.deny
+is checked, every username not mentioned in it is then allowed
+to use
+.Nm at .
+.Pp
+If neither exists, only the superuser is allowed use of
+.Nm at .
+This is the default configuration.
+.Sh IMPLEMENTATION NOTES
+Note that
+.Nm at
+is implemented through the
+.Xr cron 8
+daemon by calling
+.Xr atrun 8
+every five minutes.
+This implies that the granularity of
+.Nm at
+might not be optimal for every deployment.
+If a finer granularity is needed, the system crontab at
+.Pa /etc/crontab
+needs to be changed.
+.Sh OPTIONS
+.Bl -tag -width indent
+.\" ==========
+.It Fl b
+Is an alias for
+.Nm batch .
+.\" ==========
+.It Fl c
+Cat the jobs listed on the command line to standard output.
+.\" ==========
+.It Fl d
+Is an alias for
+.Nm atrm
+(this option is deprecated; use
+.Fl r
+instead).
+.\" ==========
+.It Fl f Ar file
+Read the job from
+.Ar file
+rather than standard input.
+.\" ==========
+.It Fl l
+With no arguments, list all jobs for the invoking user.
+If one or more
+job numbers are given, list only those jobs.
+.\" ==========
+.It Fl m
+Send mail to the user when the job has completed even if there was no
+output.
+.\" ==========
+.It Fl q Ar queue
+Use the specified queue.
+A queue designation consists of a single letter; valid queue designations
+range from
+.Ar a
+to
+.Ar z
+and
+.Ar A
+to
+.Ar Z .
+The
+.Ar _DEFAULT_AT_QUEUE
+queue (a) is the default for
+.Nm at
+and the
+.Ar _DEFAULT_BATCH_QUEUE
+queue (b) is the default for
+.Nm batch .
+Queues with higher letters run with increased niceness.
+If a job is submitted to a queue designated with an uppercase letter, it
+is treated as if it had been submitted to batch at that time.
+If
+.Nm atq
+is given a specific queue, it will only show jobs pending in that queue.
+.\" ==========
+.It Fl r
+Remove the specified jobs.
+.\" ==========
+.It Fl t
+Specify the job time using the \*[Px] time format.
+The argument should be in the form
+.Sm off
+.Op Oo Ar CC Oc Ar YY
+.Ar MM DD hh mm Op . Ar SS
+.Sm on
+where each pair of letters represents the following:
+.Pp
+.Bl -tag -width indent -compact -offset indent
+.\" ==========
+.It Ar CC
+The first two digits of the year (the century).
+.\" ==========
+.It Ar YY
+The second two digits of the year.
+.\" ==========
+.It Ar MM
+The month of the year, from 1 to 12.
+.\" ==========
+.It Ar DD
+the day of the month, from 1 to 31.
+.\" ==========
+.It Ar hh
+The hour of the day, from 0 to 23.
+.\" ==========
+.It Ar mm
+The minute of the hour, from 0 to 59.
+.\" ==========
+.It Ar SS
+The second of the minute, from 0 to 61.
+.El
+.Pp
+If the
+.Ar CC
+and
+.Ar YY
+letter pairs are not specified, the values default to the current
+year.
+If the
+.Ar SS
+letter pair is not specified, the value defaults to 0.
+.\" ==========
+.It Fl v
+For
+.Nm atq ,
+shows completed but not yet deleted jobs in the queue; otherwise
+shows the time the job will be executed.
+.El
+.Sh FILES
+.Bl -tag -width _ATJOB_DIR/_LOCKFILE -compact
+.\" ==========
+.It Pa _ATJOB_DIR
+directory containing job files
+(/usr/lib/cron/jobs/)
+.\" ==========
+.It Pa _ATJOB_DIR/_LOCKFILE
+job-creation lock file
+(/usr/lib/cron/jobs/...)
+.\" ==========
+.It Pa _ATSPOOL_DIR
+directory containing output spool files
+(/usr/lib/cron/spool/)
+.\" ==========
+.It Pa _PERM_PATH/at.allow
+allow permission control
+(/usr/lib/cron/at.allow)
+.\" ==========
+.It Pa _PERM_PATH/at.deny
+deny permission control
+(/usr/lib/cron/at.deny)
+.It Pa /var/run/utmpx
+login records
+.El
+.Sh SEE ALSO
+.Xr nice 1 ,
+.Xr sh 1 ,
+.Xr umask 2 ,
+.Xr compat 5 ,
+.Xr atrun 8 ,
+.Xr cron 8 ,
+.Xr sendmail 8
+.Sh BUGS
+If the file
+.Pa /var/run/utmpx
+is not available or corrupted,
+or if the user is not logged on at the time
+.Nm at
+is invoked, the mail is sent to the userid found
+in the environment variable
+.Ev LOGNAME .
+If that is undefined or empty, the current userid is assumed.
+.Pp
+The
+.Nm at
+and
+.Nm batch
+utilities
+as presently implemented are not suitable when users are competing for
+resources.
+If this is the case, another batch system such as
+.Em nqs
+may be more suitable.
+.Pp
+Specifying a date past 2038 may not work on some systems.
+.Sh AUTHORS
+At was mostly written by
+.An Thomas Koenig Aq ig25@rz.uni-karlsruhe.de .
+The time parsing routines are by
+.An David Parsons Aq orc@pell.chi.il.us ,
+with minor enhancements by
+.An Joe Halpin Aq joe.halpin@attbi.com .
+++ /dev/null
-.\" $FreeBSD: src/usr.bin/at/at.man,v 1.34 2003/03/26 02:38:18 keramida Exp $
-.Dd January 13, 2002
-.Dt "AT" 1
-.Os
-.Sh NAME
-.Nm at ,
-.Nm batch ,
-.Nm atq ,
-.Nm atrm
-.Nd queue, examine, or delete jobs for later execution
-.Sh SYNOPSIS
-.Nm at
-.Op Fl q Ar queue
-.Op Fl f Ar file
-.Op Fl mldbv
-.Ar time
-.Nm at
-.Op Fl q Ar queue
-.Op Fl f Ar file
-.Op Fl mldbv
-.Fl t
-.Sm off
-.Op Oo Ar CC Oc Ar YY
-.Ar MM DD hh mm Op . Ar SS
-.Sm on
-.Nm at
-.Fl c Ar job Op Ar job ...
-.Nm at
-.Fl l Op Ar job ...
-.Nm at
-.Fl l
-.Fl q Ar queue
-.Nm at
-.Fl r Ar job Op Ar job ...
-.Pp
-.Nm atq
-.Op Fl q Ar queue
-.Op Fl v
-.Pp
-.Nm atrm
-.Ar job
-.Op Ar job ...
-.Pp
-.Nm batch
-.Op Fl q Ar queue
-.Op Fl f Ar file
-.Op Fl mv
-.Op Ar time
-.Sh DESCRIPTION
-The
-.Nm at
-and
-.Nm batch
-utilities
-read commands from standard input or a specified file.
-The commands are executed at a later time, using
-.Xr sh 1 .
-.Bl -tag -width indent
-.It Nm at
-executes commands at a specified time;
-.It Nm atq
-lists the user's pending jobs, unless the user is the superuser; in that
-case, everybody's jobs are listed;
-.It Nm atrm
-deletes jobs;
-.It Nm batch
-executes commands when system load levels permit; in other words, when the load average
-drops below _LOADAVG_MX, or the value specified in the invocation of
-.Nm atrun .
-.El
-.Pp
-The
-.Nm at
-utility allows some moderately complex
-.Ar time
-specifications.
-It accepts times of the form
-.Ar HHMM
-or
-.Ar HH:MM
-to run a job at a specific time of day.
-(If that time is already past, the next day is assumed.)
-As an alternative, the following keywords may be specified:
-.Em midnight ,
-.Em noon ,
-or
-.Em teatime
-(4pm)
-and time-of-day may be suffixed with
-.Em AM
-or
-.Em PM
-for running in the morning or the evening.
-The day on which the job is to be run may also be specified
-by giving a date in the form
-.Ar \%month-name day
-with an optional
-.Ar year ,
-or giving a date of the forms
-.Ar DD.MM.YYYY ,
-.Ar DD.MM.YY ,
-.Ar MM/DD/YYYY ,
-.Ar MM/DD/YY ,
-.Ar MMDDYYYY , or
-.Ar MMDDYY .
-The specification of a date must follow the specification of
-the time of day.
-Time can also be specified as:
-.Op Em now
-.Em + Ar count \%time-units ,
-where the time-units can be
-.Em minutes ,
-.Em hours ,
-.Em days ,
-.Em weeks ,
-.Em months
-or
-.Em years
-and
-.Nm at
-may be told to run the job today by suffixing the time with
-.Em today
-and to run the job tomorrow by suffixing the time with
-.Em tomorrow .
-.Pp
-For example, to run a job at 4pm three days from now, use
-.Nm at Ar 4pm + 3 days ,
-to run a job at 10:00am on July 31, use
-.Nm at Ar 10am Jul 31
-and to run a job at 1am tomorrow, use
-.Nm at Ar 1am tomorrow .
-.Pp
-The
-.Nm at
-utility also supports the
-.Tn POSIX
-time format (see
-.Fl t
-option).
-.Pp
-For both
-.Nm at
-and
-.Nm batch ,
-commands are read from standard input or the file specified
-with the
-.Fl f
-option.
-The working directory, the environment (except for the variables
-.Ev TERM ,
-.Ev TERMCAP ,
-.Ev DISPLAY
-and
-.Em _ ) ,
-and the
-.Ar umask
-are retained from the time of invocation.
-An
-.Nm at
-or
-.Nm batch
-command invoked from a
-.Xr su 1
-shell will retain the current userid.
-The user will be mailed standard error and standard output from his
-commands, if any.
-Mail will be sent using the command
-.Xr sendmail 8 .
-If
-.Nm at
-is executed from a
-.Xr su 1
-shell, the owner of the login shell will receive the mail.
-.Pp
-The superuser may use these commands in any case.
-For other users, permission to use
-.Nm at
-is determined by the files
-.Pa _PERM_PATH/at.allow
-and
-.Pa _PERM_PATH/at.deny .
-.Pp
-If the file
-.Pa _PERM_PATH/at.allow
-exists, only usernames mentioned in it are allowed to use
-.Nm at .
-In these two files,
-a user is considered to be listed
-only if the user name has no blank or other characters
-before it on its line and a newline character immediately after the name,
-even at the end of the file.
-Other lines are ignored and may be used for comments.
-.Pp
-If
-.Pa _PERM_PATH/at.allow
-does not exist,
-.Pa _PERM_PATH/at.deny
-is checked, every username not mentioned in it is then allowed
-to use
-.Nm at .
-.Pp
-If neither exists, only the superuser is allowed use of
-.Nm at .
-This is the default configuration.
-.Sh IMPLEMENTATION NOTES
-Note that
-.Nm at
-is implemented through the
-.Xr cron 8
-daemon by calling
-.Xr atrun 8
-every five minutes.
-This implies that the granularity of
-.Nm at
-might not be optimal for every deployment.
-If a finer granularity is needed, the system crontab at
-.Pa /etc/crontab
-needs to be changed.
-.Sh OPTIONS
-.Bl -tag -width indent
-.\" ==========
-.It Fl b
-Is an alias for
-.Nm batch .
-.\" ==========
-.It Fl c
-Cat the jobs listed on the command line to standard output.
-.\" ==========
-.It Fl d
-Is an alias for
-.Nm atrm
-(this option is deprecated; use
-.Fl r
-instead).
-.\" ==========
-.It Fl f Ar file
-Read the job from
-.Ar file
-rather than standard input.
-.\" ==========
-.It Fl l
-With no arguments, list all jobs for the invoking user.
-If one or more
-job numbers are given, list only those jobs.
-.\" ==========
-.It Fl m
-Send mail to the user when the job has completed even if there was no
-output.
-.\" ==========
-.It Fl q Ar queue
-Use the specified queue.
-A queue designation consists of a single letter; valid queue designations
-range from
-.Ar a
-to
-.Ar z
-and
-.Ar A
-to
-.Ar Z .
-The
-.Ar _DEFAULT_AT_QUEUE
-queue (a) is the default for
-.Nm at
-and the
-.Ar _DEFAULT_BATCH_QUEUE
-queue (b) is the default for
-.Nm batch .
-Queues with higher letters run with increased niceness.
-If a job is submitted to a queue designated with an uppercase letter, it
-is treated as if it had been submitted to batch at that time.
-If
-.Nm atq
-is given a specific queue, it will only show jobs pending in that queue.
-.\" ==========
-.It Fl r
-Remove the specified jobs.
-.\" ==========
-.It Fl t
-Specify the job time using the \*[Px] time format.
-The argument should be in the form
-.Sm off
-.Op Oo Ar CC Oc Ar YY
-.Ar MM DD hh mm Op . Ar SS
-.Sm on
-where each pair of letters represents the following:
-.Pp
-.Bl -tag -width indent -compact -offset indent
-.\" ==========
-.It Ar CC
-The first two digits of the year (the century).
-.\" ==========
-.It Ar YY
-The second two digits of the year.
-.\" ==========
-.It Ar MM
-The month of the year, from 1 to 12.
-.\" ==========
-.It Ar DD
-the day of the month, from 1 to 31.
-.\" ==========
-.It Ar hh
-The hour of the day, from 0 to 23.
-.\" ==========
-.It Ar mm
-The minute of the hour, from 0 to 59.
-.\" ==========
-.It Ar SS
-The second of the minute, from 0 to 61.
-.El
-.Pp
-If the
-.Ar CC
-and
-.Ar YY
-letter pairs are not specified, the values default to the current
-year.
-If the
-.Ar SS
-letter pair is not specified, the value defaults to 0.
-.\" ==========
-.It Fl v
-For
-.Nm atq ,
-shows completed but not yet deleted jobs in the queue; otherwise
-shows the time the job will be executed.
-.El
-.Sh FILES
-.Bl -tag -width _ATJOB_DIR/_LOCKFILE -compact
-.\" ==========
-.It Pa _ATJOB_DIR
-directory containing job files
-(/usr/lib/cron/jobs/)
-.\" ==========
-.It Pa _ATJOB_DIR/_LOCKFILE
-job-creation lock file
-(/usr/lib/cron/jobs/...)
-.\" ==========
-.It Pa _ATSPOOL_DIR
-directory containing output spool files
-(/usr/lib/cron/spool/)
-.\" ==========
-.It Pa _PERM_PATH/at.allow
-allow permission control
-(/usr/lib/cron/at.allow)
-.\" ==========
-.It Pa _PERM_PATH/at.deny
-deny permission control
-(/usr/lib/cron/at.deny)
-.It Pa /var/run/utmpx
-login records
-.El
-.Sh SEE ALSO
-.Xr nice 1 ,
-.Xr sh 1 ,
-.Xr umask 2 ,
-.Xr compat 5 ,
-.Xr atrun 8 ,
-.Xr cron 8 ,
-.Xr sendmail 8
-.Sh BUGS
-If the file
-.Pa /var/run/utmpx
-is not available or corrupted,
-or if the user is not logged on at the time
-.Nm at
-is invoked, the mail is sent to the userid found
-in the environment variable
-.Ev LOGNAME .
-If that is undefined or empty, the current userid is assumed.
-.Pp
-The
-.Nm at
-and
-.Nm batch
-utilities
-as presently implemented are not suitable when users are competing for
-resources.
-If this is the case, another batch system such as
-.Em nqs
-may be more suitable.
-.Pp
-Specifying a date past 2038 may not work on some systems.
-.Sh AUTHORS
-At was mostly written by
-.An Thomas Koenig Aq ig25@rz.uni-karlsruhe.de .
-The time parsing routines are by
-.An David Parsons Aq orc@pell.chi.il.us ,
-with minor enhancements by
-.An Joe Halpin Aq joe.halpin@attbi.com .
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = atrun
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = atrun
+Install_Dir = /usr/libexec
HFILES = atrun.h
-
CFILES = atrun.c
+MANPAGES = atrun.8
+LAUNCHD_PLISTS = com.apple.atrun.plist
-OTHERSRCS = Makefile.preamble Makefile Makefile.dist atrun.8 Makefile.postamble com.apple.atrun.plist
-
-NEXTSTEP_PB_CFLAGS += -DDAEMON_UID=1 -DDAEMON_GID=1
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/libexec
-WINDOWS_INSTALLDIR = /usr/libexec
-PDO_UNIX_INSTALLDIR = /usr/libexec
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-HEADER_PATHS = -I../at.tproj
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
+Extra_CC_Flags = -DDAEMON_UID=1 -DDAEMON_GID=1 -I../at.tproj
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-# $Id: Makefile.dist,v 1.1 1999/05/02 04:21:19 wsanchez Exp $
-
-PROG= atrun
-BINDIR= /usr/libexec
-MAN8= atrun.0
-
-BINOWN= root
-
-CFLAGS+= -I${.CURDIR}/../../usr.bin/at
-
-.include <bsd.prog.mk>
+++ /dev/null
-after_install:
- mkdir -p $(DSTROOT)/usr/share/man/man8
- install -c -m 444 atrun.8 $(DSTROOT)/usr/share/man/man8
- mkdir -p $(DSTROOT)/System/Library/LaunchDaemons
- install -c -m 444 com.apple.atrun.plist $(DSTROOT)/System/Library/LaunchDaemons
+++ /dev/null
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
+++ /dev/null
-{
- FILESTABLE = {
- FRAMEWORKS = ();
- HEADERSEARCH = (../at);
- H_FILES = (atrun.h);
- OTHER_LINKED = (atrun.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.dist, atrun.8, com.apple.atrun.plist);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_INSTALLDIR = /usr/libexec;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/libexec;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = atrun;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/libexec;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
--- /dev/null
+.\" $FreeBSD: src/libexec/atrun/atrun.man,v 1.12 2004/07/02 19:07:31 ru Exp $
+.Dd April 12, 1995
+.Dt ATRUN 8
+.Os
+.Sh NAME
+.Nm atrun
+.Nd run jobs queued for later execution
+.Sh SYNOPSIS
+.Nm atrun
+.Op Fl l Ar load_avg
+.Op Fl d
+.Sh DESCRIPTION
+.Nm Atrun
+runs jobs queued by
+.Xr at 1 .
+.Pp
+Root's
+.Xr crontab 5
+file
+.Pa /etc/crontab
+has to contain the line
+.Bd -literal
+*/5 * * * * root /usr/libexec/atrun
+.Ed
+.Pp
+so that
+.Nm
+gets invoked every five minutes.
+.Pp
+At every invocation,
+.Nm
+will start all the jobs in the lowercase queues whose start
+time has elapsed.
+In addition, if the load average over the last minute was less than
+the specified limit then a maximum of one batch job (denoted by the
+uppercase queues) is started.
+.Sh OPTIONS
+.Bl -tag -width indent
+.It Fl l Ar load_avg
+Specify a limiting load factor, over which batch jobs should
+not be run, instead of the compiled in default of 1.5.
+.It Fl d
+Debug; print error messages to standard error instead of using
+.Xr syslog 3 .
+.El
+.Sh WARNINGS
+For
+.Nm
+to work, you have to start up a
+.Xr cron 8
+daemon.
+.Sh FILES
+.Bl -tag -width /var/at/spool -compact
+.It Pa /var/at/spool
+Directory containing output spool files
+.It Pa /var/at/jobs
+Directory containing job files
+.El
+.Sh SEE ALSO
+.Xr at 1 ,
+.Xr crontab 1 ,
+.Xr syslog 3 ,
+.Xr crontab 5 ,
+.Xr cron 8
+.Sh BUGS
+The functionality of
+.Nm
+should be merged into
+.Xr cron 8 .
--- /dev/null
+/*
+ * gloadavg.c - get load average for Linux
+ * Copyright (C) 1993 Thomas Koenig
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. The name of the author(s) may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lint
+static const char rcsid[] =
+ "$FreeBSD: src/libexec/atrun/gloadavg.c,v 1.5 1999/08/28 00:09:12 peter Exp $";
+#endif /* not lint */
+
+#ifndef __FreeBSD__
+#define _POSIX_SOURCE 1
+
+/* System Headers */
+
+#include <stdio.h>
+#else
+#include <stdlib.h>
+#endif
+
+/* Local headers */
+
+#include "gloadavg.h"
+
+/* Global functions */
+
+void perr(const char *a);
+
+double
+gloadavg(void)
+/* return the current load average as a floating point number, or <0 for
+ * error
+ */
+{
+ double result;
+#ifndef __FreeBSD__
+ FILE *fp;
+
+ if((fp=fopen(PROC_DIR "loadavg","r")) == NULL)
+ result = -1.0;
+ else
+ {
+ if(fscanf(fp,"%lf",&result) != 1)
+ result = -1.0;
+ fclose(fp);
+ }
+#else
+ if (getloadavg(&result, 1) != 1)
+ perr("error in getloadavg");
+#endif
+ return result;
+}
--- /dev/null
+/*
+ * gloadavg.h - header for atrun(8)
+ * Copyright (C) 1993 Thomas Koenig
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. The name of the author(s) may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+double gloadavg(void);
+#if 0
+static char atrun_h_rcsid[] = "$FreeBSD: src/libexec/atrun/gloadavg.h,v 1.4 1999/08/28 00:09:12 peter Exp $";
+#endif
-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = audit
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = audit
+Install_Dir = /usr/sbin
CFILES = audit.c
+MANPAGES = audit.1
+USERDEFS = auditd_control.defs
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble\
- auditd_control.defs audit.1
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /Library/Executables
-PDO_UNIX_INSTALLDIR = /bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-HEADER_PATHS = -I../auditd.tproj
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
+Extra_CC_Flags = -I../auditd.tproj
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 2004, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-MIGFLAGS =
-MIG = $(NEXT_ROOT)/usr/bin/mig
-
-auditd_control_user.c auditd_control.h: auditd_control.defs
- cp $(SRCROOT)/auditd.tproj/auditd_control.defs $(SYM_DIR);
- cd $(SYM_DIR) && \
- $(MIG) $(MIGFLAGS) -user auditd_control_user.c -header auditd_control.h \
- -server /dev/null -sheader /dev/null auditd_control.defs
-
- install-man-page:
- install -d $(DSTROOT)/usr/share/man/man1
- install -c -m 444 audit.1 $(DSTROOT)/usr/share/man/man1/audit.1
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 2004, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-BEFORE_BUILD = auditd_control.h auditd_control_user.c
-OTHER_OFILES = auditd_control_user.o
-AFTER_INSTALL += install-man-page
-
+++ /dev/null
-{
- "DYNAMIC_CODE_GEN" = YES;
- FILESTABLE = {
- FRAMEWORKS = ();
- HEADERSEARCH = ("../auditd.tproj");
- "OTHER_LINKED" = ("audit.c");
- "OTHER_SOURCES" = (
- "Makefile.preamble",
- Makefile,
- "Makefile.postamble",
- "auditd_control.defs",
- "audit.1"
- );
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- "NEXTSTEP_BUILDTOOL" = "/usr/bin/gnumake";
- "NEXTSTEP_INSTALLDIR" = "/usr/sbin";
- "NEXTSTEP_JAVA_COMPILER" = "/usr/bin/javac";
- "NEXTSTEP_OBJCPLUS_COMPILER" = "/usr/bin/cc";
- "PDO_UNIX_BUILDTOOL" = "$NEXT_ROOT/Developer/bin/make";
- "PDO_UNIX_INSTALLDIR" = "/bin";
- "PDO_UNIX_JAVA_COMPILER" = "$(JDKBINDIR)/javac";
- "PDO_UNIX_OBJCPLUS_COMPILER" = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = audit;
- PROJECTTYPE = Tool;
- PROJECTVERSION = "2.8";
- "WINDOWS_BUILDTOOL" = "$NEXT_ROOT/Developer/Executables/make";
- "WINDOWS_INSTALLDIR" = "/Library/Executables";
- "WINDOWS_JAVA_COMPILER" = "$(JDKBINDIR)/javac.exe";
- "WINDOWS_OBJCPLUS_COMPILER" = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = auditd
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = auditd
+Install_Dir = /usr/sbin
HFILES = auditd.h
-
CFILES = audit_warn.c auditd.c
+MANPAGES = auditd.8
+SERVERDEFS = auditd_control.defs audit_triggers.defs
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble\
- audit_triggers.defs auditd_control.defs auditd.8 rc.audit
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /Library/Executables
-PDO_UNIX_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-NEXTSTEP_PB_LDFLAGS = -lbsm
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
+Extra_CC_Flags = -I.
+Extra_LD_Flags = -lbsm
+Extra_MIG_Flags = -no-cpp-precomp -R -untyped -DNO_DIRECT_RPC
--include Makefile.postamble
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.dependencies
+after_install:
+ $(INSTALL_DIRECTORY) $(DSTROOT)/private/etc/security
+ install -c -m 400 rc.audit $(DSTROOT)/private/etc/security
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-ETCDIR = $(DSTROOT)/private/etc
-MIGFLAGS = -no-cpp-precomp -R -untyped -DNO_DIRECT_RPC
-MIG = $(NEXT_ROOT)/usr/bin/mig
-
-auditd_control_server.c : auditd_control.defs
- cp $(SRCROOT)/auditd.tproj/auditd_control.defs $(SYM_DIR);
- cd $(SYM_DIR) && \
- $(MIG) $(MIGFLAGS) -user /dev/null -server auditd_control_server.c -sheader auditd_control_server.h auditd_control.defs
-
-audit_triggers_server.c: audit_triggers.defs
- cp $(SRCROOT)/auditd.tproj/audit_triggers.defs $(SYM_DIR);
- cd $(SYM_DIR) && \
- $(MIG) $(MIGFLAGS) -user /dev/null -server audit_triggers_server.c -sheader audit_triggers_server.h audit_triggers.defs
-
-install-startup:
- install -d $(ETCDIR)/security
- install -c -m 400 rc.audit $(ETCDIR)/security/rc.audit
-
-install-man-page:
- install -d $(DSTROOT)/usr/share/man/man8
- install -c -m 444 auditd.8 $(DSTROOT)/usr/share/man/man8/auditd.8
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 2004, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-BEFORE_BUILD = auditd_control_server.c auditd_control_server.h \
- audit_triggers_server.c audit_triggers_server.h
-OTHER_OFILES = auditd_control_server.o audit_triggers_server.o
-AFTER_INSTALL += install-startup install-man-page
+++ /dev/null
-{
- "DYNAMIC_CODE_GEN" = YES;
- FILESTABLE = {
- FRAMEWORKS = ();
- "H_FILES" = ("auditd.h");
- "OTHER_LINKED" = ("audit_warn.c", "auditd.c");
- "OTHER_SOURCES" = (
- "Makefile.preamble",
- Makefile,
- "Makefile.postamble",
- "audit_triggers.defs",
- "auditd_control.defs",
- "auditd.8",
- "rc.audit"
- );
- "PRECOMPILED_HEADERS" = ();
- "PROJECT_HEADERS" = ();
- "PUBLIC_HEADERS" = ();
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- "NEXTSTEP_BUILDTOOL" = "/usr/bin/gnumake";
- "NEXTSTEP_INSTALLDIR" = "/usr/sbin";
- "NEXTSTEP_JAVA_COMPILER" = "/usr/bin/javac";
- "NEXTSTEP_LINKEROPTIONS" = "-lbsm";
- "NEXTSTEP_OBJCPLUS_COMPILER" = "/usr/bin/cc";
- "PDO_UNIX_BUILDTOOL" = "$NEXT_ROOT/Developer/bin/make";
- "PDO_UNIX_INSTALLDIR" = "/bin";
- "PDO_UNIX_JAVA_COMPILER" = "$(JDKBINDIR)/javac";
- "PDO_UNIX_OBJCPLUS_COMPILER" = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = auditd;
- PROJECTTYPE = Tool;
- PROJECTVERSION = "2.8";
- "WINDOWS_BUILDTOOL" = "$NEXT_ROOT/Developer/Executables/make";
- "WINDOWS_INSTALLDIR" = "/Library/Executables";
- "WINDOWS_JAVA_COMPILER" = "$(JDKBINDIR)/javac.exe";
- "WINDOWS_OBJCPLUS_COMPILER" = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = bootlog
-
-PROJECTVERSION = 1.0
-PROJECT_TYPE = Tool
+Project = bootlog
+Install_Dir = /usr/libexec
CFILES = bootlog.c
+MANPAGES = bootlog.8
+LAUNCHD_PLISTS = com.apple.bootlog.plist
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble\
- com.apple.bootlog.plist bootlog.8
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/libexec
-WINDOWS_INSTALLDIR = /usr/libexec
-PDO_UNIX_INSTALLDIR = /usr/libexec
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-after_install:
- mkdir -p $(DSTROOT)/usr/share/man/man8
- install -c -m 444 bootlog.8 $(DSTROOT)/usr/share/man/man8
- mkdir -p $(DSTROOT)/System/Library/LaunchDaemons
- install -c -m 444 com.apple.bootlog.plist $(DSTROOT)/System/Library/LaunchDaemons
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- CLASSES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (dummy.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /usr/bin;
- PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = usr-share-locale;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /usr/bin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = chkpasswd
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = chkpasswd
+Install_Dir = /usr/libexec
HFILES = stringops.h
-
CFILES = ds_passwd.c nis_passwd.c file_passwd.c passwd.c\
stringops.c
+MANPAGES = chkpasswd.8
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble chkpasswd.8
-
-
-MAKEFILEDIR = /System/Developer/Makefiles/project
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/libexec
-WINDOWS_INSTALLDIR = /usr/bin
-PDO_UNIX_INSTALLDIR = /usr/bin
-LIBS = /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
+Extra_Frameworks = -framework DirectoryService
--include Makefile.postamble
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.dependencies
+Install_Program_Mode = 04555
+++ /dev/null
-
-INSTALL_AS_USER = root
-INSTALL_PERMISSIONS = 4555
-#CHFLAGS = /usr/bin/chflags
-#after_install::
-# $(CHFLAGS) schg $(DSTROOT)$(INSTALLDIR)/$(NAME)
-
-after_install:
- mkdir -p $(DSTROOT)/usr/share/man/man8
- install -c -m 444 chkpasswd.8 $(DSTROOT)/usr/share/man/man8
+++ /dev/null
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-CLEAN_ALL_SUBPROJECTS = YES
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- CLASSES = ();
- C_FILES = ();
- H_FILES = (stringops.h);
- OTHER_LIBS = ();
- OTHER_LINKED = (nis_passwd.c, file_passwd.c, passwd.c, stringops.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- MAKEFILEDIR = /System/Developer/Makefiles/project;
- NEXTSTEP_BUILDDIR = "/tmp/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/libexec;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /usr/bin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = chkpasswd;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /usr/bin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-
\ No newline at end of file
+
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/ioctl.h>
+#include <errno.h>
+#include <pwd.h>
+#include <netdb.h>
+#include <ctype.h>
+#include <string.h>
+#include <netinfo/ni.h>
+
+extern void checkpasswd(char *, char *);
+
+#if 0
+static int
+sys_ismyaddress(unsigned long addr)
+{
+ struct ifconf ifc;
+ struct ifreq *ifr;
+ char buf[1024]; /* XXX */
+ int offset;
+ int sock;
+ struct sockaddr_in *sin;
+
+ if (addr == htonl(INADDR_LOOPBACK)) return 1;
+
+ sock = socket(AF_INET, SOCK_DGRAM, 0);
+
+ if (sock < 0) return 0;
+
+ ifc.ifc_len = sizeof(buf);
+ ifc.ifc_buf = buf;
+
+ if (ioctl(sock, SIOCGIFCONF, (char *)&ifc) < 0)
+ {
+ close(sock);
+ return 0;
+ }
+
+ offset = 0;
+
+ while (offset <= ifc.ifc_len)
+ {
+ ifr = (struct ifreq *)(ifc.ifc_buf + offset);
+ offset += IFNAMSIZ + ifr->ifr_addr.sa_len;
+
+ if (ifr->ifr_addr.sa_family != AF_INET) continue;
+ if (ioctl(sock, SIOCGIFFLAGS, ifr) < 0) continue;
+
+ sin = (struct sockaddr_in *)&ifr->ifr_addr;
+ if ((ifr->ifr_flags & IFF_UP) &&
+ (!(ifr->ifr_flags & IFF_LOOPBACK)) &&
+ (sin->sin_addr.s_addr == addr))
+ {
+ close(sock);
+ return 1;
+ }
+ }
+
+ close(sock);
+ return 0;
+}
+
+static int
+is_root_on_master(void *d)
+{
+ int uid;
+ char myhostname[MAXHOSTNAMELEN + 1];
+ char *p;
+ ni_index where;
+ ni_proplist pl;
+ int status;
+ ni_id dir;
+ struct sockaddr_in addr;
+ char *tag;
+
+ uid = getuid();
+ if (uid != 0) return 0;
+
+ gethostname(myhostname, MAXHOSTNAMELEN);
+ p = strchr(myhostname, '.');
+ if (p != NULL) *p = '\0';
+
+ status = ni_root(d, &dir);
+ if (status != NI_OK) return 0;
+
+ status = ni_read(d, &dir, &pl);
+ if (status != NI_OK) return 0;
+
+ where = ni_proplist_match(pl, "master", NULL);
+ if (where == NI_INDEX_NULL)
+ {
+ ni_proplist_free(&pl);
+ return 0;
+ }
+
+ if (pl.ni_proplist_val[where].nip_val.ni_namelist_len == 0)
+ {
+ ni_proplist_free(&pl);
+ fprintf(stderr, "No value for NetInfo master property\n");
+ return 0;
+ }
+
+ p = strchr(pl.ni_proplist_val[where].nip_val.ni_namelist_val[0], '/');
+ if (p != NULL) *p = '\0';
+
+ p = strchr(pl.ni_proplist_val[where].nip_val.ni_namelist_val[0], '.');
+ if (p != NULL) *p = '\0';
+
+ if (!strcmp(pl.ni_proplist_val[where].nip_val.ni_namelist_val[0], myhostname))
+ {
+ ni_proplist_free(&pl);
+ return 1;
+ }
+
+ if (!strcmp(pl.ni_proplist_val[where].nip_val.ni_namelist_val[0], "localhost"))
+ {
+ ni_proplist_free(&pl);
+ ni_addrtag(d, &addr, &tag);
+ if (sys_ismyaddress(addr.sin_addr.s_addr)) return 1;
+ }
+
+ ni_proplist_free(&pl);
+ return 0;
+}
+
+static int
+secure_passwords()
+{
+ void *d, *d1;
+ int status;
+ ni_index where;
+ ni_id dir;
+ ni_namelist nl;
+
+ status = ni_open(NULL, ".", &d);
+ while (status == NI_OK)
+ {
+ dir.nii_object = 0;
+ status = ni_lookupprop(d, &dir, "security_options", &nl);
+ if (status == NI_OK)
+ {
+ where = ni_namelist_match(nl, "secure_passwords");
+ if (where != NI_INDEX_NULL)
+ {
+ ni_free(d);
+ return 1;
+ }
+ }
+
+ d1 = d;
+ status = ni_open(d1, "..", &d);
+ ni_free(d1);
+ }
+
+ return 0;
+}
+#endif /* 0 */
+
+static void
+parse_server_tag(char *str, struct sockaddr_in *server, char **t)
+{
+ /* utility to parse a server/tag string */
+
+ int len, i;
+ char *host, *tag, *slash;
+ struct hostent *hent;
+
+ len = strlen(str);
+
+ /* find the "/" character */
+ slash = index(str, '/');
+
+ /* check to see if the "/" is missing */
+ if (slash == NULL)
+ {
+ fprintf(stderr, "incorrect format \"%s\" for domain name\n", str);
+ exit(1);
+ }
+
+ /* find the location of the '/' */
+ i = slash - str;
+
+ /* check if host string is empty */
+ if (i == 0)
+ {
+ fprintf(stderr, "incorrect format \"%s\" for domain name\n", str);
+ fprintf(stderr, "no server name specified\n");
+ exit(1);
+ }
+
+ /* check if tag string is empty */
+ if (i == (len - 1))
+ {
+ fprintf(stderr, "incorrect format \"%s\" for domain name\n", str);
+ fprintf(stderr, "no tag specified\n");
+ exit(1);
+ }
+
+ /* allocate some space for the host and tag */
+ host = (char *)malloc(i + 1);
+ *t = (char *)malloc(len - i);
+ tag = *t;
+
+ /* copy out the host */
+ strncpy(host, str, i);
+ host[i] = '\0';
+
+ /* copy out the tag */
+ strcpy(tag, slash + 1);
+
+ /* try interpreting the host portion as an address */
+ server->sin_addr.s_addr = inet_addr(host);
+
+ if (server->sin_addr.s_addr == -1)
+ {
+ /* This isn't a valid address. Is it a known hostname? */
+ hent = gethostbyname(host);
+ if (hent != NULL)
+ {
+ /* found a host with that name */
+ bcopy(hent->h_addr, &server->sin_addr, hent->h_length);
+ }
+ else
+ {
+ fprintf(stderr, "Can't find address for %s\n", host);
+ free(host);
+ free(tag);
+ exit(1);
+ }
+ }
+
+ free(host);
+}
+
+static void *
+domain_for_user(char *uname, char *locn, ni_id *dir)
+{
+ char *upath;
+ int status;
+ void *d, *d1;
+ struct sockaddr_in server;
+ char *tag;
+ int bytag;
+
+ /*
+ * Find the user in NetInfo.
+ */
+ upath = malloc(8 + strlen(uname));
+ sprintf(upath, "/users/%s", uname);
+
+ if (locn != NULL)
+ {
+ bytag = 1;
+
+ if (locn[0] == '/') bytag = 0;
+ else if (!strncmp(locn, "./", 2)) bytag = 0;
+ else if (!strncmp(locn, "../", 3)) bytag = 0;
+
+ if (bytag == 1)
+ {
+ parse_server_tag(locn, &server, &tag);
+ d = ni_connect(&server, tag);
+ if (d == (void *)NULL) return (void *)NULL;
+ }
+ else status = ni_open(NULL, locn, &d);
+ status = ni_pathsearch(d, dir, upath);
+ free(upath);
+
+ if (status == NI_OK) return d;
+
+ ni_free(d);
+ return (void *)NULL;
+ }
+
+ status = ni_open(NULL, ".", &d);
+ while (status == NI_OK)
+ {
+ status = ni_pathsearch(d, dir, upath);
+ if (status == NI_OK) break;
+ d1 = d;
+ status = ni_open(d1, "..", &d);
+ ni_free(d1);
+ }
+
+ free(upath);
+
+ if (status == NI_OK) return d;
+ return (void *)NULL;
+}
+
+int
+netinfo_check_passwd(char *uname, char *locn)
+{
+ char *oldpw;
+ void *d;
+ int status;
+ ni_id dir;
+ ni_namelist nl;
+
+ d = domain_for_user(uname, locn, &dir);
+ if (d == (void *)NULL)
+ {
+ fprintf(stderr, "user %s not found in NetInfo\n", uname);
+ exit(1);
+ }
+
+ /*
+ * Read the passwd and uid from NetInfo.
+ */
+ status = ni_lookupprop(d, &dir, "passwd", &nl);
+ if (status == NI_NOPROP) nl.ni_namelist_len = 0;
+ else if (status != NI_OK)
+ {
+ ni_free(d);
+ fprintf(stderr, "NetInfo read failed: %s\n", ni_error(status));
+ exit(1);
+ }
+
+ oldpw = NULL;
+ if (nl.ni_namelist_len > 0) oldpw = nl.ni_namelist_val[0];
+
+ checkpasswd(uname, oldpw);
+ ni_free(d);
+ return (0);
+}
--- /dev/null
+chpass.1 - FreeBSD file with references to yp items deleted
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = chpass
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = chpass
+Install_Dir = /usr/bin
+Extra_CC_Flags = -DOPEN_DIRECTORY -fconstant-cfstrings \
+ -I../pwd_mkdb.tproj -I../vipw.tproj \
+ -F/System/Library/PrivateFrameworks
HFILES = chpass.h open_directory.h pw_copy.h
-
CFILES = chpass.c edit.c field.c pw_copy.c table.c util.c \
open_directory.c
+MANPAGES = chpass.1
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble chpass.1
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /usr/bin
-PDO_UNIX_INSTALLDIR = /usr/bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-HEADER_PATHS = -I../pwd_mkdb.tproj -I../vipw.tproj
-FRAMEWORK_PATHS = -F/System/Library/PrivateFrameworks
-FRAMEWORKS = -framework OpenDirectory -framework CoreFoundation
-PROJECT_HEADERS = pw_copy.h
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
+Extra_Frameworks = -F/System/Library/PrivateFrameworks -framework OpenDirectory -framework CoreFoundation
-include $(MAKEFILEDIR)/$(MAKEFILE)
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.postamble
+Install_Program_Mode = 04555
--include Makefile.dependencies
+after_install:
+ $(LN) -sf chpass.1 $(DSTROOT)/usr/share/man/man1/chfn.1
+ $(LN) -sf chpass.1 $(DSTROOT)/usr/share/man/man1/chsh.1
+ $(LN) -f $(DSTROOT)$(Install_Dir)/chpass $(DSTROOT)$(Install_Dir)/chfn
+ $(LN) -f $(DSTROOT)$(Install_Dir)/chpass $(DSTROOT)$(Install_Dir)/chsh
+++ /dev/null
-#VPATH += :../pwd_mkdb.tproj:../vipw.tproj
-
-INSTALL_AS_USER = root
-INSTALL_AS_GROUP = wheel
-INSTALL_PERMISSIONS = 4555
-
-after_install::
- install -o $(INSTALL_AS_USER) -m 755 -d $(DSTROOT)/usr/share/man/man1
- install -o $(INSTALL_AS_USER) -m 644 -c chpass.1 \
- $(DSTROOT)/usr/share/man/man1
- $(LN) -sf chpass.1 $(DSTROOT)/usr/share/man/man1/chfn.1
- $(LN) -sf chpass.1 $(DSTROOT)/usr/share/man/man1/chsh.1
- chown $(INSTALL_AS_USER):$(INSTALL_AS_GROUP) \
- $(DSTROOT)/usr/share/man/man1/chfn.1
- chown $(INSTALL_AS_USER):$(INSTALL_AS_GROUP) \
- $(DSTROOT)/usr/share/man/man1/chsh.1
- $(LN) -f $(INSTALLED_PRODUCTS) $(DSTROOT)$(INSTALLDIR)/chfn
- $(LN) -f $(INSTALLED_PRODUCTS) $(DSTROOT)$(INSTALLDIR)/chsh
+++ /dev/null
-CLEAN_ALL_SUBPROJECTS = YES
-OTHER_CFLAGS = -DOPEN_DIRECTORY -fconstant-cfstrings
-OTHER_LDFLAGS =
-OTHER_OFILES =
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- CLASSES = ();
- C_FILES = ();
- HEADERSEARCH = ();
- H_FILES = (chpass.h, pw_copy.h, open_directory.h);
- OTHER_LIBS = ();
- OTHER_LINKED = (chpass.c, edit.c, field.c, pw_copy.c, table.c, util.c, open_directory.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, chpass.1);
- PROJECT_HEADERS = (pw_copy.h);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /usr/bin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = chpass;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /usr/bin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
+Project = dirhelper
+Install_Dir = /usr/libexec
-ifeq "$(SRCROOT)" ""
- SRCROOT=$(shell pwd)
-endif
-ifeq "$(OBJROOT)" ""
- OBJROOT=$(shell pwd)
-endif
-ifeq "$(SYMROOT)" ""
- SYMROOT=$(shell pwd)
-endif
-ifeq "$(DSTROOT)" ""
- DSTROOT=
-endif
+CFILES = dirhelper.c
+SERVERDEFS = /usr/local/include/dirhelper.defs
+MANPAGES = dirhelper.8
+LAUNCHD_PLISTS = com.apple.bsd.dirhelper.plist
-ifneq "$(shell basename $(SRCROOT))" "dirhelper.tproj"
-SRCDIR=$(SRCROOT)/dirhelper.tproj
-else
-SRCDIR=$(SRCROOT)
-endif
-OBJDIR=$(OBJROOT)/dirhelper.obj
+Extra_CC_Flags = -D__MigTypeCheck=1
+#CFLAGS = -g -mdynamic-no-pic -Os -Wall -Wextra -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror -D__MigTypeCheck=1 $(RC_CFLAGS) -I $(OBJDIR)
+Extra_LD_Flags = -lbsm
-CFLAGS = -g -mdynamic-no-pic -Os -Wall -Wextra -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror -D__MigTypeCheck=1 $(RC_CFLAGS) -I $(OBJDIR)
-
-LDFLAGS = -lbsm
-
-all: dirhelper
-
-dirhelper: mighdrs
- cc -c $(CFLAGS) -o $(OBJDIR)/dirhelperServer.o $(OBJDIR)/dirhelperServer.c
- cc -c $(CFLAGS) -o $(OBJDIR)/dirhelperUser.o $(OBJDIR)/dirhelperUser.c
- cc -c $(CFLAGS) -o $(OBJDIR)/dirhelper.o $(SRCDIR)/dirhelper.c
- cc $(CFLAGS) $(LDFLAGS) -o $(SYMROOT)/dirhelper $(OBJDIR)/dirhelperServer.o $(OBJDIR)/dirhelperUser.o $(OBJDIR)/dirhelper.o
-
-client: mighdrs
- cc $(CFLAGS) $(LDFLAGS) -o $(SYMROOT)/client $(SRCDIR)/client.c $(OBJDIR)/dirhelperUser.c
-
-install: dirhelper
- install -m 0644 -o root -g wheel -d $(DSTROOT)/System/Library/LaunchDaemons
- install -m 0644 -o root -g wheel com.apple.bsd.dirhelper.plist $(DSTROOT)/System/Library/LaunchDaemons/
- install -m 0755 -o root -g wheel -d $(DSTROOT)/usr/libexec
- install -m 0755 -o root -g wheel $(SYMROOT)/dirhelper $(DSTROOT)/usr/libexec/
- strip -S $(DSTROOT)/usr/libexec/dirhelper
- mkdir -p "$(DSTROOT)/usr/share/man/man8"
- gzip -c "$(SRCDIR)/dirhelper.8" > "$(DSTROOT)/usr/share/man/man8/dirhelper.8.gz"
-
-installsrc:
- mkdir "$(SRCDIR)"
- tar cf - . | tar xf - -C "$(SRCDIR)"
-
-mighdrs:
- mkdir -p $(OBJDIR)
- cd $(OBJDIR) && mig -sheader dirhelperServer.h /usr/local/include/dirhelper.defs
-
-installhdrs:
- @echo nothing to install
-
-#installhdrs: mighdrs
-# install -m 0755 -o root -g wheel -d $(DSTROOT)/usr/local/include
-# install -m 0644 -o root -g wheel $(OBJDIR)/dirhelper.h $(DSTROOT)/usr/local/include/
-
-clean:
- -rm -f *.o client dirhelper
- -rm -rf dirhelper.obj
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
#include <launch.h>
#include <dirhelper_priv.h>
-#include "dirhelper.h"
-#include "dirhelperServer.h"
+#include "dirhelper_server.h"
// globals for idle exit
struct idle_globals {
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = dmesg
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = dmesg
+Install_Dir = /sbin
CFILES = dmesg.c
-
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble Makefile.dist\
- dmesg.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
+MANPAGES = dmesg.8
MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /sbin
-WINDOWS_INSTALLDIR = /sbin
-PDO_UNIX_INSTALLDIR = /sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
--include Makefile.postamble
+Extra_LD_Flags = -lproc
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-# @(#)Makefile 8.1 (Berkeley) 6/5/93
-
-PROG= dmesg
-MAN8= dmesg.0
-
-CFLAGS += -I/System/Library/Frameworks/System.framework/PrivateHeaders/
-LDADD= -lproc
-
-.include <bsd.prog.mk>
+++ /dev/null
-after_install:
- mkdir -p $(DSTROOT)/usr/share/man/man8
- install -c -m 444 dmesg.8 $(DSTROOT)/usr/share/man/man8
+++ /dev/null
-OTHER_CFLAGS = -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
-OTHER_LIBS = -lproc
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
+++ /dev/null
-{
- APPCLASS = NSApplication;
- FILESTABLE = {
- FRAMEWORKS = ();
- H_FILES = ();
- M_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (dmesg.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, Makefile.dist, dmesg.8);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_MAINNIB = dmesg;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_MAINNIB = dmesg;
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = dmesg;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_MAINNIB = dmesg;
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
+Project = dp_notify_lib
+ProductType = staticlib
+Install_Dir = /usr/local/lib
-NAME = dp_notify_lib
+SERVERDEFS = ../dynamic_pager.tproj/backing_store_alerts.defs
+USERDEFS = ../dynamic_pager.tproj/backing_store_triggers.defs
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Library
+Extra_MIG_Flags = -no-cpp-precomp -R -untyped -DNO_DIRECT_RPC -I$(SRCROOT)
+Extra_LD_Flags = -static
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble m.template\
- h.template backing_store_alerts.defs\
- backing_store_triggers.defs
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CURRENTLY_ACTIVE_VERSION = YES
-DEPLOY_WITH_VERSION_NAME = A
-CODE_GEN_STYLE = STATIC
-MAKEFILE = library.make
-NEXTSTEP_INSTALLDIR = /usr/local/lib
-WINDOWS_INSTALLDIR = /Developer/Libraries
-PDO_UNIX_INSTALLDIR = /lib
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-FRAMEWORK_PATHS =
-NEXTSTEP_PB_LDFLAGS = -static
-FRAMEWORKS =
-
-
-WINDOWS_PUBLIC_HEADERS_DIR = $(HOMEDRIVE)$(LOCAL_DEVELOPER_DIR)/Headers/$(NAME)
-
-PDO_UNIX_PUBLIC_HEADERS_DIR = $(LOCAL_DEVELOPER_DIR)/Headers/$(NAME)
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+after_install:
+ $(INSTALL_DIRECTORY) $(DSTROOT)/usr/local/include/mach
+ $(INSTALL_FILE) $(OBJROOT)/$(Project)/backing_store_alerts_server.h \
+ $(DSTROOT)/usr/local/include/mach
+ $(INSTALL_FILE) $(OBJROOT)/$(Project)/backing_store_triggers.h \
+ $(DSTROOT)/usr/local/include/mach
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-INSTALLDIR = /usr/local/lib
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-MIGFLAGS = -no-cpp-precomp -R -untyped -DNO_DIRECT_RPC -I$(SRCROOT)
-MIG = $(NEXT_ROOT)/usr/bin/mig
-
-backing_store_alerts_server.c: \
- backing_store_alerts.defs
- ${MKDIRS} \
- ${DSTROOT}${PUBLIC_HDR_INSTALLDIR}${PUBLIC_HEADER_DIR_SUFFIX};
- cp backing_store_alerts.defs $(SYM_DIR);
- cd $(SYM_DIR) && \
- $(MIG) $(MIGFLAGS) -user /dev/null -server \
- backing_store_alerts_server.c -sheader backing_store_alerts_server.h \
- backing_store_alerts.defs
-
-backing_store_triggers.c: \
- backing_store_triggers.defs
- cp backing_store_triggers.defs $(SYM_DIR);
- cd $(SYM_DIR) && \
- $(MIG) $(MIGFLAGS) -user backing_store_triggers.c -server /dev/null -header backing_store_triggers.h backing_store_triggers.defs
-
-backing_store_alerts_server.h: backing_store_alerts_server.c
-
-backing_store_triggers.h: backing_store_triggers.c
-
-static:
- $(SILENT) unset $(CUMULATIVE_VARIABLES) ||: ; \
- $(MAKE) BUILD_TYPE=$@ BUILD_TYPE_SUFFIX=$(STATIC_SUFFIX)
-
-copy_dstroot:
- ${CP} $(SYM_DIR)/backing_store_triggers.h $(DSTROOT)${PUBLIC_HDR_INSTALLDIR}${PUBLIC_HEADER_DIR_SUFFIX}
- ${CP} $(SYM_DIR)/backing_store_alerts_server.h $(DSTROOT)${PUBLIC_HDR_INSTALLDIR}${PUBLIC_HEADER_DIR_SUFFIX}
- ${CHMOD} 444 $(DSTROOT)${PUBLIC_HDR_INSTALLDIR}${PUBLIC_HEADER_DIR_SUFFIX}/backing_store_triggers.h
- ${CHMOD} 444 $(DSTROOT)${PUBLIC_HDR_INSTALLDIR}${PUBLIC_HEADER_DIR_SUFFIX}/backing_store_alerts_server.h
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-# Before the main makefile is included for this project, you may set:
-#
-# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
-# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
-
-# Compiler/linker flags added to the defaults: The OTHER_* variables will be
-# inherited by all nested sub-projects, but the LOCAL_ versions of the same
-# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
-# Build Attributes inspector if at all possible. To override the default flags
-# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
-# variables below are *inputs* to the build process and distinct from the override
-# settings done (less often) in the Makefile.postamble.
-#
-# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
-# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
-# .cc, .cxx, .C, and .M files. There is no need to respecify the
-# flags in OTHER_MFLAGS, etc.
-# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
-# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
-# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
-# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
-# precompiling header files
-# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
-# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
-# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
-# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
-# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-# AFTER_INSTALL: targets to build after installing the product
-# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
-# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
-#
-# BEFORE_INSTALLHDRS: targets to build before installing headers for a
-# subproject
-# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
-# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
-# AFTER_INSTALLSRC: targets to build after installing source for a subproject
-#
-# BEFORE_DEPEND: targets to build before building dependencies for a
-# subproject
-# AFTER_DEPEND: targets to build after building dependencies for a
-# subproject
-#
-# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
-# updated every time the project is built. If NO, the dependency
-# file is only built when the depend target is invoked.
-
-# Framework-related variables:
-# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the framework's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-
-# Library-related variables:
-# PUBLIC_HEADER_DIR: Determines where public exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically. For library projects you should
-# set this to something like /Developer/Headers/$(NAME). Do not set
-# this variable for framework projects unless you do not want the
-# header files included in the framework.
-# PRIVATE_HEADER_DIR: Determines where private exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
-# whether the libraries produced are statically linked when they
-# are used or if they are dynamically loadable. This defaults to
-# DYNAMIC.
-# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the library's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-#
-# INSTALL_AS_USER: owner of the intalled products (default root)
-# INSTALL_AS_GROUP: group of the installed products (default wheel)
-# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
-#
-# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
-# passed on the command line to recursive invocations of make. Note that
-# the values in OTHER_*FLAGS are inherited by subprojects automatically --
-# you do not have to (and shouldn't) add OTHER_*FLAGS to
-# OTHER_RECURSIVE_VARIABLES.
-
-# Additional headers to export beyond those in the PB.project:
-# OTHER_PUBLIC_HEADERS
-# OTHER_PROJECT_HEADERS
-# OTHER_PRIVATE_HEADERS
-
-# Additional files for the project's product: <<path relative to proj?>>
-# OTHER_RESOURCES: (non-localized) resources for this project
-# OTHER_OFILES: relocatables to be linked into this project
-# OTHER_LIBS: more libraries to link against
-# OTHER_PRODUCT_DEPENDS: other dependencies of this project
-# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
-# OTHER_GARBAGE: additional files to be removed by `make clean'
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-# BUILD_OFILES_LIST_ONLY
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Uncomment to suppress generation of a KeyValueCoding index when installing
-# frameworks (This index is used by WOB and IB to determine keys available
-# for an object). Set to YES by default.
-# PREINDEX_FRAMEWORK = NO
-
-# Change this definition to install projects somewhere other than the
-# standard locations. NEXT_ROOT defaults to "C:/Apple" on Windows systems
-# and "" on other systems.
-VPATH_PREAMBLE = ../dynamic_pager.tproj:
-#DSTROOT = $(HOME)
-LIBRARY_STYLE = STATIC
-OTHER_OFILES = backing_store_alerts_server.o backing_store_triggers.o
-BEFORE_BUILD = backing_store_alerts_server.o backing_store_triggers.o
-PUBLIC_HDR_INSTALLDIR = /usr/local/include
-PUBLIC_HEADER_DIR_SUFFIX = /mach
-LIBRARY_STYLE = STATIC
-AFTER_INSTALL += copy_dstroot
+++ /dev/null
-{
- CURRENTLY_ACTIVE_VERSION = YES;
- DEPLOY_WITH_VERSION_NAME = A;
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- OTHER_SOURCES = (
- Makefile.preamble,
- Makefile,
- Makefile.postamble,
- m.template,
- h.template,
- backing_store_alerts.defs,
- backing_store_triggers.defs
- );
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/local/lib;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "-static";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_INSTALLDIR = /lib;
- PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PDO_UNIX_PUBLICHEADERSDIR = "$(LOCAL_DEVELOPER_DIR)/Headers/$(NAME)";
- PROJECTNAME = dp_notify_lib;
- PROJECTTYPE = Library;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_INSTALLDIR = /Developer/Libraries;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
- WINDOWS_PUBLICHEADERSDIR = "$(HOMEDRIVE)$(LOCAL_DEVELOPER_DIR)/Headers/$(NAME)";
-}
+++ /dev/null
-$$
-/* $FILENAME$ created by $USERNAME$ on $DATE$ */
-
-#import <Foundation/Foundation.h>
-
-@interface $FILENAMESANSEXTENSION$ : NSObject
-{
-
-}
-
-@end
+++ /dev/null
-$$ Lines starting with $$ are not inserted into newly created files
-$$ The following substitutions are made:
-$$
-$$ $FILENAME$ e.g. foo.m
-$$ $FILENAMESANSEXTENSION$ e.g. foo
-$$ $DIRECTORY$ e.g. /tmp/MyNewApp
-$$ $PROJECTNAME$ e.g. MyNewApp
-$$ $SUBPROJECTNAME$ e.g. TheGoodPart.subproj
-$$ $USERNAME$ e.g. mwagner
-$$ $DATE$ e.g. Jan-1-1994
-$$
-/* $FILENAME$ created by $USERNAME$ on $DATE$ */
-
-#import "$FILENAMESANSEXTENSION$.h"
-
-@implementation $FILENAMESANSEXTENSION$
-
-@end
--- /dev/null
+Package: system-cmds
+Maintainer: Darwin Developers <darwin-development@public.lists.apple.com>
+Description: System commands
+Build-Depends: build-base, librpcsvc-hdrs, libinfo-hdrs, libstreams-hdrs, iokituser, libcurses-hdrs, corefoundation, carbonheaders, project-makefiles, iostoragefamily
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = dynamic_pager
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = dynamic_pager
+Install_Dir = /sbin
CFILES = dynamic_pager.c
-
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble\
- default_pager_alerts.defs backing_store_alerts.defs\
- backing_store_triggers.defs dynamic_pager.8\
- com.apple.dynamic_pager.plist
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-NEXTSTEP_PB_CFLAGS = -no-cpp-precomp -DNO_DIRECT_RPC
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+SERVERDEFS = default_pager_alerts.defs \
+ backing_store_triggers.defs
+USERDEFS = backing_store_alerts.defs
+MANPAGES = dynamic_pager.8
+LAUNCHD_PLISTS = com.apple.dynamic_pager.plist
+
+Extra_CC_Flags = -no-cpp-precomp -DNO_DIRECT_RPC
+
+Extra_LD_Flags = -framework CoreFoundation -framework IOKit
+Extra_MIG_Flags = -no-cpp-precomp -R -untyped -DNO_DIRECT_RPC
+
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+
+Embedded=$(shell tconf --test TARGET_OS_EMBEDDED)
+
+after_install:
+ifeq "$(Embedded)" "YES"
+ /usr/libexec/PlistBuddy -x \
+ -c "Add :Disabled bool true" \
+ "$(DSTROOT)/System/Library/LaunchDaemons/com.apple.dynamic_pager.plist"
+endif
+++ /dev/null
-#PRECOMP_CFLAGS =
-#NONRECURSIVE_PRECOMPFLAGS =
-#OPTIMIZE_BUILD_CFLAGS =
-SRC_ROOT = $(SRCROOT)
-
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGE: langage in which the project is written (default "English")
-# LOCAL_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-MIGFLAGS = -no-cpp-precomp -R -untyped -DNO_DIRECT_RPC
-MIG = $(NEXT_ROOT)/usr/bin/mig
-
-Embedded=$(shell tconf --test TARGET_OS_EMBEDDED)
-
-default_pager_alerts_server.c : backing_store_alerts.c \
- backing_store_triggers_server.c \
- default_pager_alerts.defs
- cp $(SRCROOT)/dynamic_pager.tproj/default_pager_alerts.defs $(SYM_DIR);
- cd $(SYM_DIR) && \
- $(MIG) $(MIGFLAGS) -user /dev/null -server default_pager_alerts_server.c -sheader default_pager_alerts_server.h default_pager_alerts.defs
-
-backing_store_alerts.c: \
- backing_store_alerts.defs
- cp $(SRCROOT)/dynamic_pager.tproj/backing_store_alerts.defs $(SYM_DIR);
- cd $(SYM_DIR) && \
- $(MIG) $(MIGFLAGS) -server /dev/null -user backing_store_alerts.c -header backing_store_alerts.h backing_store_alerts.defs
-
-backing_store_triggers_server.c: \
- backing_store_triggers.defs
- cp $(SRCROOT)/dynamic_pager.tproj/backing_store_triggers.defs $(SYM_DIR);
- cd $(SYM_DIR) && \
- $(MIG) $(MIGFLAGS) -user /dev/null -server backing_store_triggers_server.c -sheader backing_store_triggers_server.h backing_store_triggers.defs
-
-install-man-page:
- install -d $(DSTROOT)/usr/share/man/man8
- install -c -m 444 dynamic_pager.8 $(DSTROOT)/usr/share/man/man8/dynamic_pager.8
-
-LAUNCHD_PLIST_DIR = $(DSTROOT)/System/Library/LaunchDaemons
-LAUNCHD_PLIST = com.apple.dynamic_pager.plist
-
-install-launchd-plist:
- install -d $(LAUNCHD_PLIST_DIR)
- install -c -m 644 $(LAUNCHD_PLIST) $(LAUNCHD_PLIST_DIR)/$(LAUNCHD_PLIST)
-ifeq "$(Embedded)" "YES"
- /usr/libexec/PlistBuddy -x \
- -c "Add :Disabled bool true" \
- "$(LAUNCHD_PLIST_DIR)/$(LAUNCHD_PLIST)"
-endif
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-# Before the main makefile is included for this project, you may set:
-#
-# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
-# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
-
-# Compiler/linker flags added to the defaults: The OTHER_* variables will be
-# inherited by all nested sub-projects, but the LOCAL_ versions of the same
-# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
-# Build Attributes inspector if at all possible. To override the default flags
-# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
-# variables below are *inputs* to the build process and distinct from the override
-# settings done (less often) in the Makefile.postamble.
-#
-# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
-# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
-# .cc, .cxx, .C, and .M files. There is no need to respecify the
-# flags in OTHER_MFLAGS, etc.
-# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
-# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
-# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
-# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
-# precompiling header files
-# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
-# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
-# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
-# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
-# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-# AFTER_INSTALL: targets to build after installing the product
-# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
-# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
-#
-# BEFORE_INSTALLHDRS: targets to build before installing headers for a
-# subproject
-# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
-# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
-# AFTER_INSTALLSRC: targets to build after installing source for a subproject
-#
-# BEFORE_DEPEND: targets to build before building dependencies for a
-# subproject
-# AFTER_DEPEND: targets to build after building dependencies for a
-# subproject
-#
-# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
-# updated every time the project is built. If NO, the dependency
-# file is only built when the depend target is invoked.
-
-# Framework-related variables:
-# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the framework's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-
-# Library-related variables:
-# PUBLIC_HEADER_DIR: Determines where public exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# PRIVATE_HEADER_DIR: Determines where private exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
-# whether the libraries produced are statically linked when they
-# are used or if they are dynamically loadable. <<default?>>
-# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the library's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-#
-# INSTALL_AS_USER: owner of the intalled products (default root)
-# INSTALL_AS_GROUP: group of the installed products (default wheel)
-# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
-#
-# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
-# passed on the command line to recursive invocations of make. Note that
-# the values in OTHER_*FLAGS are inherited by subprojects automatically --
-# you do not have to (and shouldn't) add OTHER_*FLAGS to
-# OTHER_RECURSIVE_VARIABLES.
-
-# Additional headers to export beyond those in the PB.project:
-# OTHER_PUBLIC_HEADERS
-# OTHER_PROJECT_HEADERS
-# OTHER_PRIVATE_HEADERS
-
-# Additional files for the project's product: <<path relative to proj?>>
-# OTHER_RESOURCES: (non-localized) resources for this project
-# OTHER_OFILES: relocatables to be linked into this project
-# OTHER_LIBS: more libraries to link against
-# OTHER_PRODUCT_DEPENDS: other dependencies of this project
-# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
-# OTHER_GARBAGE: additional files to be removed by `make clean'
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-# BUILD_OFILES_LIST_ONLY
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-OTHER_OFILES = default_pager_alerts_server.o backing_store_alerts.o backing_store_triggers_server.o
-#OTHER_PUBLIC_HEADERS = default_pager_alerts_server.h
-#OTHER_GENERATED_OFILES = $(VERS_OFILE)
--include ../Makefile.include
-OTHER_CFLAGS = -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
-OTHER_LDFLAGS = -framework CoreFoundation -framework IOKit
-BEFORE_BUILD = default_pager_alerts_server.o
-AFTER_INSTALL += install-man-page install-launchd-plist
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- FRAMEWORKS = ();
- OTHER_LINKED = (dynamic_pager.c);
- OTHER_SOURCES = (
- Makefile.preamble,
- Makefile,
- Makefile.postamble,
- default_pager_alerts.defs,
- backing_store_alerts.defs,
- backing_store_triggers.defs,
- dynamic_pager.8,
- com.apple.dynamic_pager.plist
- );
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDDIR = "/tmp/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_COMPILEROPTIONS = "-traditional-cpp -DNO_DIRECT_RPC";
- NEXTSTEP_INSTALLDIR = /sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = dynamic_pager;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = fs_usage
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = fs_usage
+Install_Dir = /usr/bin
CFILES = fs_usage.c
+MANPAGES = fs_usage.1
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble fs_usage.1
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /Library/Executables
-PDO_UNIX_INSTALLDIR = /bin
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-HEADER_PATHS = -I$(NEXT_ROOT)/System/Library/System.framework/\
- -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders\
- -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd\
- -I$(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders/bsd
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
+Extra_CC_Flags = -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders\
+ -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-
-WARNING_CFLAGS = -Wall
-
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS = 4555
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-
-install-man-page:
- install -d $(DSTROOT)/usr/share/man/man1
- install -c -m 444 fs_usage.1 $(DSTROOT)/usr/share/man/man1/fs_usage.1
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-# Before the main makefile is included for this project, you may set:
-#
-# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
-# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
-
-# Compiler/linker flags added to the defaults: The OTHER_* variables will be
-# inherited by all nested sub-projects, but the LOCAL_ versions of the same
-# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
-# Build Attributes inspector if at all possible. To override the default flags
-# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
-# variables below are *inputs* to the build process and distinct from the override
-# settings done (less often) in the Makefile.postamble.
-#
-# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
-# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
-# .cc, .cxx, .C, and .M files. There is no need to respecify the
-# flags in OTHER_MFLAGS, etc.
-# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
-# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
-# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
-# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
-# precompiling header files
-# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
-# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
-# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
-# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
-# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-# AFTER_INSTALL: targets to build after installing the product
-# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
-# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
-#
-# BEFORE_INSTALLHDRS: targets to build before installing headers for a
-# subproject
-# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
-# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
-# AFTER_INSTALLSRC: targets to build after installing source for a subproject
-#
-# BEFORE_DEPEND: targets to build before building dependencies for a
-# subproject
-# AFTER_DEPEND: targets to build after building dependencies for a
-# subproject
-#
-# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
-# updated every time the project is built. If NO, the dependency
-# file is only built when the depend target is invoked.
-
-# Framework-related variables:
-# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the framework's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-
-# Library-related variables:
-# PUBLIC_HEADER_DIR: Determines where public exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically. For library projects you should
-# set this to something like /Developer/Headers/$(NAME). Do not set
-# this variable for framework projects unless you do not want the
-# header files included in the framework.
-# PRIVATE_HEADER_DIR: Determines where private exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
-# whether the libraries produced are statically linked when they
-# are used or if they are dynamically loadable. This defaults to
-# DYNAMIC.
-# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the library's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-#
-# INSTALL_AS_USER: owner of the intalled products (default root)
-# INSTALL_AS_GROUP: group of the installed products (default wheel)
-# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
-#
-# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
-# passed on the command line to recursive invocations of make. Note that
-# the values in OTHER_*FLAGS are inherited by subprojects automatically --
-# you do not have to (and shouldn't) add OTHER_*FLAGS to
-# OTHER_RECURSIVE_VARIABLES.
-
-# Additional headers to export beyond those in the PB.project:
-# OTHER_PUBLIC_HEADERS
-# OTHER_PROJECT_HEADERS
-# OTHER_PRIVATE_HEADERS
-
-# Additional files for the project's product: <<path relative to proj?>>
-# OTHER_RESOURCES: (non-localized) resources for this project
-# OTHER_OFILES: relocatables to be linked into this project
-# OTHER_LIBS: more libraries to link against
-# OTHER_PRODUCT_DEPENDS: other dependencies of this project
-# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
-# OTHER_GARBAGE: additional files to be removed by `make clean'
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-# BUILD_OFILES_LIST_ONLY
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Uncomment to suppress generation of a KeyValueCoding index when installing
-# frameworks (This index is used by WOB and IB to determine keys available
-# for an object). Set to YES by default.
-# PREINDEX_FRAMEWORK = NO
-
-# Change this definition to install projects somewhere other than the
-# standard locations. NEXT_ROOT defaults to "C:/Apple" on Windows systems
-# and "" on other systems.
-DSTROOT = $(HOME)
-
-AFTER_INSTALL += install-man-page
-
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- HEADERSEARCH = ("$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd");
- OTHER_LINKED = (fs_usage.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, fs_usage.1);
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_COMPILEROPTIONS = "-DKERNEL_PRIVATE";
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_INSTALLDIR = /bin;
- PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = fs_usage;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_INSTALLDIR = /Library/Executables;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
+Project = getconf
+Install_Dir = /usr/bin
-NAME = getconf
+CFILES = getconf.c \
+ $(OBJROOT)/$(Project)/confstr.c \
+ $(OBJROOT)/$(Project)/limits.c \
+ $(OBJROOT)/$(Project)/pathconf.c \
+ $(OBJROOT)/$(Project)/progenv.c \
+ $(OBJROOT)/$(Project)/sysconf.c
+MANPAGES = getconf.1
-PROJECTVERSION = 1.0
-PROJECT_TYPE = Tool
+Extra_CC_Flags = -include _fbsd_compat.h -DAPPLE_GETCONF_UNDERSCORE \
+ -DAPPLE_GETCONF_SPEC -I.
-CFILES = getconf.c
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble\
- _fbsd_compat.h confstr.gperf fake-gperf.awk getconf.1\
- getconf.h limits.gperf pathconf.gperf progenv.gperf sysconf.gperf
-OTHER_GENERATED_SRCFILES = $(OBJROOT)/confstr.c $(OBJROOT)/limits.c\
- $(OBJROOT)/pathconf.c $(OBJROOT)/progenv.c $(OBJROOT)/sysconf.c
-OTHER_GENERATED_OFILES = confstr.o limits.o pathconf.o progenv.o sysconf.o
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /usr/bin
-PDO_UNIX_INSTALLDIR = /usr/bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+$(OBJROOT)/$(Project)/%.c: %.gperf
+ LC_ALL=C awk -f fake-gperf.awk $< > $@
+++ /dev/null
-INSTALL_AS_USER = root
-
-after_install::
- install -o $(INSTALL_AS_USER) -m 755 -d $(DSTROOT)/usr/share/man/man1
- install -o $(INSTALL_AS_USER) -m 644 -c getconf.1 \
- $(DSTROOT)/usr/share/man/man1
+++ /dev/null
--include ../Makefile.include
-
-$(OBJROOT)/%.c: %.gperf
- LC_ALL=C awk -f fake-gperf.awk $< > $@
-
-OTHER_CFLAGS += -include _fbsd_compat.h -DAPPLE_GETCONF_UNDERSCORE \
- -DAPPLE_GETCONF_SPEC
-vpath %.c $(OBJROOT)
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- CLASSES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (dummy.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /usr/bin;
- PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = usr-share-locale;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /usr/bin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = getty
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = getty
+Install_Dir = /usr/libexec
HFILES = extern.h gettytab.h pathnames.h
-
CFILES = chat.c init.c main.c subr.c
+MANPAGES = getty.8 gettytab.5 ttys.5
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble getty.8\
- gettytab.5 ttys.5 com.apple.getty.plist
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/libexec
-WINDOWS_INSTALLDIR = /usr/libexec
-PDO_UNIX_INSTALLDIR = /usr/libexec
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
+Embedded = $(shell tconf --test TARGET_OS_EMBEDDED)
+ifeq ($(Embedded),YES)
+LAUNCHD_PLISTS = com.apple.getty.plist
+endif
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of the directory to which resources are copied.
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# ENGLISH - boolean flag set iff $(LANGUAGE) = "English"
-# JAPANESE - boolean flag set iff $(LANGUAGE) = "Japanese"
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder that output Makefile
-# APPICON - application icon file
-# DOCICONS - dock icon files
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-#
-###############################################################################
-
-
-# Change defaults assumed by the standard makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Versioning of frameworks, libraries, bundles, and palettes:
-#CURRENTLY_ACTIVE_VERSION = YES # Set to "NO" to produce a compatibility binary
-#DEPLOY_WITH_VERSION_NAME = A
-#COMPATIBILITY_PROJECT_VERSION = 1
-
-# Some compiler flags can be easily overridden here, but onlytake effect at
-# the top-level:
-#OPTIMIZATION_CFLAG = -O
-#DEBUG_SYMBOLS_CFLAG = -g
-WARNING_CFLAGS = -Wall -Werror
-#DEBUG_BUILD_CFLAGS = -DDEBUG
-#PROFILE_BUILD_CFLAGS = -pg -DPROFILE
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Library and Framework projects only:
-# 1. If you want something other than the default .dylib name, override it here
-#DYLIB_INSTALL_NAME = lib$(NAME).dylib
-
-# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all.
-#DYLIB_INSTALL_DIR = $(INSTALLDIR)
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root # User/group ownership
-#INSTALL_AS_GROUP = wheel # (probably want to set both of these)
-#INSTALL_PERMISSIONS = # If set, 'install' chmod's executable to this
-
-# Options to strip for various project types. Note: -S strips debugging symbols
-# (executables can be stripped down further with -x or, if they load no bundles, with no
-# options at all).
-#APP_STRIP_OPTS = -S
-#TOOL_STRIP_OPTS = -S
-#LIBRARY_STRIP_OPTS = -S # for .a archives
-#DYNAMIC_STRIP_OPTS = -S # for bundles and shared libraries
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. "Official"
-# user-defined rules are:
-# * before_install
-# * after_install
-# * after_installhdrs
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-
-LAUNCHD_PLIST_DIR = $(DSTROOT)/System/Library/LaunchDaemons
-LAUNCHD_PLIST = com.apple.getty.plist
-
-Embedded = $(shell tconf --test TARGET_OS_EMBEDDED)
-
-after_install:
- mkdir -p $(DSTROOT)/usr/share/man/man5
- install -c -m 444 gettytab.5 $(DSTROOT)/usr/share/man/man5
- install -c -m 444 ttys.5 $(DSTROOT)/usr/share/man/man5
- mkdir -p $(DSTROOT)/usr/share/man/man8
- install -c -m 444 getty.8 $(DSTROOT)/usr/share/man/man8
-ifeq "$(Embedded)" "YES"
- install -d $(LAUNCHD_PLIST_DIR)
- install -c -m 644 $(LAUNCHD_PLIST) $(LAUNCHD_PLIST_DIR)/$(LAUNCHD_PLIST)
-endif
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project. Each node in a project
-# tree of sub-projects, tools, etc. should have its own Makefile.preamble and
-# Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags in ProjectBuilder's Build Options inspector if at all possible.
-## To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS = -fno-builtin-puts
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-# Flags passed to libtool when building libraries
-OTHER_LIBTOOL_FLAGS =
-# For ordering named sections on NEXTSTEP (see ld(1))
-SECTORDER_FLAGS =
-
-# Stuff related to exporting headers from this project that isn't already
-# handled by PB.
-OTHER_PUBLIC_HEADERS =
-OTHER_PROJECT_HEADERS =
-OTHER_PRIVATE_HEADERS =
-
-# Set all three of these if you want a precomp to be built as part of
-# installation. The cc -precomp will be run in the specified dir on the
-# specified public header files with the specified additional flags. Don't put
-# $(DSTROOT) in PUBLIC_HEADER_DIR; this is done for you.
-PUBLIC_HEADER_DIR =
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-PRIVATE_HEADER_DIR =
-
-# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR#
-# (say, to add a subdirectory like "/sys"), you can use:
-PUBLIC_HEADER_DIR_SUFFIX =
-PRIVATE_HEADER_DIR_SUFFIX =
-
-# Additional (non-localized) resources for this project, which can be generated
-OTHER_RESOURCES =
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-BUILD_OFILES_LIST_ONLY =
-
-# Additional relocatables to be linked into this project
-OTHER_OFILES =
-# Additional libraries to link against
-OTHER_LIBS =
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-## Configure how things get built here. Additional dependencies, source files,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-
-# Targets to build before installation
-OTHER_INSTALL_DEPENDS =
-
-# A virtual root directory (other than /) to be prepended to the $(INSTALLDIR)
-# passed from ProjectBuilder.
-DSTROOT =
-
-# More obscure flags you might want to set for pswrap, yacc, lex, etc.
-PSWFLAGS =
-YFLAGS =
-LFLAGS =
-
-## Delete this line if you want fast and loose cleans that will not remove
-## things like precomps and user-defined OTHER_GARBAGE in subprojects.
-CLEAN_ALL_SUBPROJECTS = YES
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# After you have saved your project using the 4.0 PB, you will automatically
-# start using the makefiles in $(SYSTEM_DEVELOPER_DIR)/Makefiles/project. If you should
-# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to
-# be $(SYSTEM_DEVELOPER_DIR)/Makefiles/app.
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
-
+++ /dev/null
-{
- FILESTABLE = {
- C_FILES = ();
- H_FILES = (extern.h, gettytab.h, pathnames.h);
- M_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (init.c, main.c, subr.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, getty.8, gettytab.5, ttys.5);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_INSTALLDIR = /usr/libexec;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/libexec;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = getty;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/libexec;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = hostinfo
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = hostinfo
+Install_Dir = /usr/bin
CFILES = hostinfo.c
+MANPAGES = hostinfo.8
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble hostinfo.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of the directory to which resources are copied.
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0)
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-#
-###############################################################################
-
-
-# Change defaults assumed by the standard makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Versioning of frameworks, libraries, bundles, and palettes:
-#CURRENTLY_ACTIVE_VERSION = YES
- # Set to "NO" to produce a compatibility binary
-#DEPLOY_WITH_VERSION_NAME = A
- # This should be incremented as your API changes.
-#COMPATIBILITY_PROJECT_VERSION = 1
- # This should be incremented as your API grows.
-#CURRENT_PROJECT_VERSION = 1
- # Defaults to using the "vers_string" hack.
-
-# Some compiler flags can be easily overridden here, but onlytake effect at
-# the top-level:
-#OPTIMIZATION_CFLAG = -O
-#DEBUG_SYMBOLS_CFLAG = -g
-#WARNING_CFLAGS = -Wmost
-#DEBUG_BUILD_CFLAGS = -DDEBUG
-#PROFILE_BUILD_CFLAGS = -pg -DPROFILE
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Library and Framework projects only:
-# 1. If you want something other than the default .dylib name, override it here
-#DYLIB_INSTALL_NAME = lib$(NAME).dylib
-
-# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all.
-#DYLIB_INSTALL_DIR = $(INSTALLDIR)
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-# Options to strip for various project types. Note: -S strips debugging symbols
-# (executables can be stripped down further with -x or, if they load no bundles, with no
-# options at all).
-#APP_STRIP_OPTS = -S
-#TOOL_STRIP_OPTS = -S
-#LIBRARY_STRIP_OPTS = -S
- # for .a archives
-#DYNAMIC_STRIP_OPTS = -S
- # for bundles and shared libraries
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. "Official"
-# user-defined rules are:
-# * before_install
-# * after_install
-# * after_installhdrs
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-# Note: on MS Windows, executables, have an extension, so rules and dependencies
-# for generated tools should use $(EXECUTABLE_EXT) on the end.
-
-SHAREDIR = /usr/share
-MANDIR = $(SHAREDIR)/man/man8
-
-install-man-pages:
- $(MKDIRS) $(DSTROOT)$(MANDIR)
- install -c -m 444 hostinfo.8 $(DSTROOT)$(MANDIR)/hostinfo.8
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project. Each node in a project
-# tree of sub-projects, tools, etc. should have its own Makefile.preamble and
-# Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags in ProjectBuilder's Build Options inspector if at all possible.
-## To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-# Flags passed to libtool when building libraries
-OTHER_LIBTOOL_FLAGS =
-# For ordering named sections on NEXTSTEP (see ld(1))
-SECTORDER_FLAGS =
-
-# If you do not want any headers exported before compilations begin,
-# uncomment the following line. This can be a big time saver.
-#SKIP_EXPORTING_HEADERS = YES
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-# AFTER_INSTALL: targets to build after installing the product
-
-AFTER_INSTALL += install-man-pages
-
-# Stuff related to exporting headers from this project that isn't already
-# handled by PB.
-OTHER_PUBLIC_HEADERS =
-OTHER_PROJECT_HEADERS =
-OTHER_PRIVATE_HEADERS =
-
-# Set these two macros if you want a precomp to be built as part of
-# installation. The cc -precomp will be run in the public header directory
-# on the specified public header files with the specified additional flags.
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-# Set this for library projects if you want to publish header files. If your
-# app or tool project exports headers Don't
-# include $(DSTROOT); this is added for you automatically.
-PUBLIC_HEADER_DIR =
-PRIVATE_HEADER_DIR =
-
-# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR#
-# (say, to add a subdirectory like "/sys"), you can use:
-PUBLIC_HEADER_DIR_SUFFIX =
-PRIVATE_HEADER_DIR_SUFFIX =
-
-# Set this for dynamic library projects on platforms where code which references
-# a dynamic library must link against an import library (i.e., Windows NT)
-# Don't include $(DSTROOT); this is added for you automatically.
-IMPORT_LIBRARY_DIR =
-
-# Additional (non-localized) resources for this project, which can be generated
-OTHER_RESOURCES =
-
-# Uncomment this to produce a static archive-style (.a) library
-#LIBRARY_STYLE = STATIC
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-BUILD_OFILES_LIST_ONLY =
-
-# Additional relocatables to be linked into this project
-OTHER_OFILES =
-# Additional libraries to link against
-OTHER_LIBS =
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-## Configure how things get built here. Additional dependencies, source files,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-
-# Targets to build before installation
-OTHER_INSTALL_DEPENDS =
-
-# More obscure flags you might want to set for pswrap, yacc, lex, etc.
-PSWFLAGS =
-YFLAGS =
-LFLAGS =
-
-## Delete this line if you want fast and loose cleans that will not remove
-## things like precomps and user-defined OTHER_GARBAGE in subprojects.
-CLEAN_ALL_SUBPROJECTS = YES
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-# .x files that should have rpcgen run on them
-RPCFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# After you have saved your project using the 4.0 PB, you will automatically
-# start using the makefiles in $(SYSTEM_DEVELOPER_DIR)/Makefiles/project. If you should
-# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to
-# be $(SYSTEM_DEVELOPER_DIR)/Makefiles/app.
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- FRAMEWORKS = ();
- H_FILES = ();
- OTHER_LINKED = (hostinfo.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDDIR = "/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = hostinfo;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
--- /dev/null
+argon_usrbin/vmstat/names.c
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = iostat
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = iostat
+Install_Dir = /usr/sbin
CFILES = iostat.c
+MANPAGES = iostat.8
+Extra_Frameworks = -framework CoreFoundation -framework IOKit
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble iostat.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /usr/sbin
-PDO_UNIX_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-FRAMEWORKS = -framework CoreFoundation -framework IOKit
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-# This is modeled after the postamble script found in the
-# system_cmds/ktrace.tproj/Makefile.postamble script
-
-install-man-page:
- install -d $(DSTROOT)/usr/share/man/man8
- install -c -m 444 iostat.8 $(DSTROOT)/usr/share/man/man8/iostat.8
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags here. To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-
-BUNDLELDFLAGS = # use iff project is a bundle
-PALETTELDFLAGS = # use iff project is a palette
-
-## Specify which headers in this project should be published to the outside
-## world in a flat header directory given in PUBLIC_HEADER_DIR (which will be
-## prepended by DSTROOT, below. Any subset of these public headers can be
-## precompiled automatically after installation, with extra user-defined flags.
-PUBLIC_HEADER_DIR =
-PUBLIC_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-## Configure what is linked in at each level here. Libraries are only used in
-## the final 'app' linking step. Final 'app' linking is only done via the
-## 'app', 'debug', and 'profile' targets when they are invoked for
-## the top-level app.
-
-# Additional relocatables to be linked in at this level
-OTHER_OFILES =
-# Additional libs to link apps against ('app' target)
-#OTHER_LIBS =
-# Additional libs to link apps against ('debug' target)
-OTHER_DEBUG_LIBS =
-# Additional libs to link apps against ('profile' target)
-OTHER_PROF_LIBS =
-
-# More 'app' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_LIBS =
-# More 'debug' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_DEBUG_LIBS =
-# More 'profile' libs when $(JAPANESE) = "YES"
-OTHER_JAPANESE_PROF_LIBS =
-
-# If this is a bundle, and you *know* the enclosing application will not
-# be linking with a library which you require in your bundle code, then
-# mention it here so that it gets linked into the bundle. Note that this
-# is wasteful but sometimes necessary.
-BUNDLE_LIBS =
-
-## Configure how things get built here. Additional dependencies, sourcefiles,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-# Precompiled headers to be built before any compilation occurs (e.g., draw.p)
-PRECOMPS =
-
-# Targets to be built before installation
-OTHER_INSTALL_DEPENDS =
-
-# A virtual root directory (other than /) to be prepended to the $(INSTALLDIR)
-# passed from ProjectBuilder.
-DSTROOT =
-
-# Set the following to "YES" if you want the old behavior of recursively
-# cleaning all nested subprojects during 'make clean'.
-CLEAN_ALL_SUBPROJECTS =
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# to make it install the man page
-AFTER_INSTALL += install-man-page
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- FRAMEWORKS = (CoreFoundation.framework, IOKit.framework);
- C_FILES = ();
- H_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (iostat.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, iostat.8);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- GENERATEMAIN = YES;
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_DOCUMENTEXTENSIONS = ();
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = iostat;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1986, 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if !defined(hp300) && !defined(tahoe) && !defined(vax) && \
+ !defined(luna68k) && !defined(mips)
+char *defdrives[] = { 0 };
+int
+read_names()
+{
+ return 0;
+}
+#endif
+
+#if defined(hp300) || defined(luna68k)
+#if defined(hp300)
+#include <hp/dev/device.h>
+#else
+#include <luna68k/dev/device.h>
+#endif
+
+char *defdrives[] = { "sd0", "sd1", "sd2", "rd0", "rd1", "rd2", 0 };
+
+int
+read_names()
+{
+ register char *p;
+ register u_long hp;
+ static char buf[BUFSIZ];
+ struct hp_device hdev;
+ struct driver hdrv;
+ char name[10];
+
+ hp = namelist[X_HPDINIT].n_value;
+ if (hp == 0) {
+ (void)fprintf(stderr,
+ "disk init info not in namelist\n");
+ return (0);
+ }
+ p = buf;
+ for (;; hp += sizeof hdev) {
+ (void)kvm_read(kd, hp, &hdev, sizeof hdev);
+ if (hdev.hp_driver == 0)
+ break;
+ if (hdev.hp_dk < 0 || hdev.hp_alive == 0 ||
+ hdev.hp_cdriver == 0)
+ continue;
+ (void)kvm_read(kd, (u_long)hdev.hp_driver, &hdrv, sizeof hdrv);
+ (void)kvm_read(kd, (u_long)hdrv.d_name, name, sizeof name);
+ dr_name[hdev.hp_dk] = p;
+ p += sprintf(p, "%s%d", name, hdev.hp_unit) + 1;
+ }
+ return (1);
+}
+#endif /* hp300 || luna68k */
+
+#ifdef tahoe
+#include <tahoe/vba/vbavar.h>
+
+char *defdrives[] = { "dk0", "dk1", "dk2", 0 };
+
+int
+read_names()
+{
+ register char *p;
+ struct vba_device udev, *up;
+ struct vba_driver udrv;
+ char name[10];
+ static char buf[BUFSIZ];
+
+ up = (struct vba_device *)namelist[X_VBDINIT].n_value;
+ if (up == 0) {
+ (void) fprintf(stderr,
+ "disk init info not in namelist\n");
+ return (0);
+ }
+ p = buf;
+ for (;; up += sizeof udev) {
+ (void)kvm_read(kd, up, &udev, sizeof udev);
+ if (udev.ui_driver == 0)
+ break;
+ if (udev.ui_dk < 0 || udev.ui_alive == 0)
+ continue;
+ (void)kvm_read(kd, udev.ui_driver, &udrv, sizeof udrv);
+ (void)kvm_read(kd, udrv.ud_dname, name, sizeof name);
+ dr_name[udev.ui_dk] = p;
+ p += sprintf(p, "%s%d", name, udev.ui_unit);
+ }
+ return (1);
+}
+#endif /* tahoe */
+
+#ifdef vax
+#include <vax/uba/ubavar.h>
+#include <vax/mba/mbavar.h>
+
+char *defdrives[] = { "hp0", "hp1", "hp2", 0 };
+
+int
+read_names()
+{
+ register char *p;
+ unsigned long mp, up;
+ struct mba_device mdev;
+ struct mba_driver mdrv;
+ struct uba_device udev;
+ struct uba_driver udrv;
+ char name[10];
+ static char buf[BUFSIZ];
+
+ mp = namelist[X_MBDINIT].n_value;
+ up = namelist[X_UBDINIT].n_value;
+ if (mp == 0 && up == 0) {
+ (void)fprintf(stderr,
+ "disk init info not in namelist\n");
+ return (0);
+ }
+ p = buf;
+ if (mp)
+ for (;; mp += sizeof mdev) {
+ (void)kvm_read(kd, mp, &mdev, sizeof mdev);
+ if (mdev.mi_driver == 0)
+ break;
+ if (mdev.mi_dk < 0 || mdev.mi_alive == 0)
+ continue;
+ (void)kvm_read(kd, mdev.mi_driver, &mdrv, sizeof mdrv);
+ (void)kvm_rea(kd, mdrv.md_dname, name, sizeof name);
+ dr_name[mdev.mi_dk] = p;
+ p += sprintf(p, "%s%d", name, mdev.mi_unit);
+ }
+ if (up)
+ for (;; up += sizeof udev) {
+ (void)kvm_read(kd, up, &udev, sizeof udev);
+ if (udev.ui_driver == 0)
+ break;
+ if (udev.ui_dk < 0 || udev.ui_alive == 0)
+ continue;
+ (void)kvm_read(kd, udev.ui_driver, &udrv, sizeof udrv);
+ (void)kvm_read(kd, udrv.ud_dname, name, sizeof name);
+ dr_name[udev.ui_dk] = p;
+ p += sprintf(p, "%s%d", name, udev.ui_unit);
+ }
+ return (1);
+}
+#endif /* vax */
+
+#ifdef sun
+#include <sundev/mbvar.h>
+
+int
+read_names()
+{
+ static int once = 0;
+ struct mb_device mdev;
+ struct mb_driver mdrv;
+ short two_char;
+ char *cp = (char *) &two_char;
+ register struct mb_device *mp;
+
+ mp = (struct mb_device *)namelist[X_MBDINIT].n_value;
+ if (mp == 0) {
+ (void)fprintf(stderr,
+ "disk init info not in namelist\n");
+ return (0);
+ }
+ for (;; ++mp) {
+ (void)kvm_read(kd, mp++, &mdev, sizeof(mdev));
+ if (mdev.md_driver == 0)
+ break;
+ if (mdev.md_dk < 0 || mdev.md_alive == 0)
+ continue;
+ (void)kvm_read(kd, mdev.md_driver, &mdrv, sizeof(mdrv));
+ (void)kvm_read(kd, mdrv.mdr_dname, &two_char, sizeof(two_char));
+ (void)sprintf(dr_name[mdev.md_dk],
+ "%c%c%d", cp[0], cp[1], mdev.md_unit);
+ }
+ return(1);
+}
+#endif /* sun */
+
+#if defined(mips)
+#include <pmax/dev/device.h>
+
+char *defdrives[] = { "rz0", "rz1", "rz2", "rz3", "rz4", "rz5", "rz6", 0 };
+
+int
+read_names()
+{
+ register char *p;
+ register u_long sp;
+ static char buf[BUFSIZ];
+ struct scsi_device sdev;
+ struct driver hdrv;
+ char name[10];
+
+ sp = namelist[X_SCSI_DINIT].n_value;
+ if (sp == 0) {
+ (void)fprintf(stderr, "disk init info not in namelist\n");
+ return (0);
+ }
+ p = buf;
+ for (;; sp += sizeof sdev) {
+ (void)kvm_read(kd, sp, &sdev, sizeof sdev);
+ if (sdev.sd_driver == 0)
+ break;
+ if (sdev.sd_dk < 0 || sdev.sd_alive == 0 ||
+ sdev.sd_cdriver == 0)
+ continue;
+ (void)kvm_read(kd, (u_long)sdev.sd_driver, &hdrv, sizeof hdrv);
+ (void)kvm_read(kd, (u_long)hdrv.d_name, name, sizeof name);
+ dr_name[sdev.sd_dk] = p;
+ p += sprintf(p, "%s%d", name, sdev.sd_unit) + 1;
+ }
+ return (1);
+}
+#endif /* mips */
--- /dev/null
+#
+# Generated by the NeXT Project Builder.
+#
+# NOTE: Do NOT change this file -- Project Builder maintains it.
+#
+# Put all of your customizations in files called Makefile.preamble
+# and Makefile.postamble (both optional), and Makefile will include them.
+#
+
+NAME = kgmon
+
+PROJECTVERSION = 2.8
+PROJECT_TYPE = Tool
+
+CFILES = kgmon.c
+
+OTHERSRCS = Makefile.preamble Makefile Makefile.postamble kgmon.8
+
+
+MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
+CODE_GEN_STYLE = DYNAMIC
+MAKEFILE = tool.make
+NEXTSTEP_INSTALLDIR = /usr/sbin
+WINDOWS_INSTALLDIR = /usr/sbin
+PDO_UNIX_INSTALLDIR = /usr/sbin
+LIBS =
+DEBUG_LIBS = $(LIBS)
+PROF_LIBS = $(LIBS)
+
+
+
+
+NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
+WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
+PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
+NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
+WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
+PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
+
+include $(MAKEFILEDIR)/platform.make
+
+-include Makefile.preamble
+
+include $(MAKEFILEDIR)/$(MAKEFILE)
+
+-include Makefile.postamble
+
+-include Makefile.dependencies
--- /dev/null
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)kgmon.8 8.1 (Berkeley) 6/6/93
+.\"
+.Dd June 6, 1993
+.Dt KGMON 8
+.Os BSD 4.2
+.Sh NAME
+.Nm kgmon
+.Nd generate a dump of the operating system's profile buffers
+.Sh SYNOPSIS
+.Nm kgmon
+.Op Fl bhpr
+.Op Fl M core
+.Op Fl N system
+.Sh DESCRIPTION
+.Nm Kgmon
+is a tool used when profiling the operating system.
+When no arguments are supplied,
+.Nm kgmon
+indicates the state of operating system profiling as running,
+off, or not configured.
+(see
+.Xr config 8 )
+If the
+.Fl p
+flag is specified,
+.Nm kgmon
+extracts profile data from the operating system and produces a
+.Pa gmon.out
+file suitable for later analysis by
+.Xr gprof 1 .
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.\" ==========
+.It Fl b
+Resume the collection of profile data.
+.\" ==========
+.It Fl h
+Stop the collection of profile data.
+.\" ==========
+.It Fl M
+Extract values associated with the name list from the specified core
+instead of the default ``/dev/kmem''.
+.\" ==========
+.It Fl N
+Extract the name list from the specified system instead of the
+default ``/vmunix''.
+.\" ==========
+.It Fl p
+Dump the contents of the profile buffers into a
+.Pa gmon.out
+file.
+.\" ==========
+.It Fl r
+Reset all the profile buffers.
+If the
+.Fl p
+flag is also specified, the
+.Pa gmon.out
+file is generated before the buffers are reset.
+.El
+.Pp
+If neither
+.Fl b
+nor
+.Fl h
+is specified, the state of profiling collection remains unchanged.
+For example, if the
+.Fl p
+flag is specified and profile data is being collected,
+profiling will be momentarily suspended,
+the operating system profile buffers will be dumped,
+and profiling will be immediately resumed.
+.Sh FILES
+.Bl -tag -width /dev/kmemx -compact
+.It Pa /vmunix
+the default system
+.It Pa /dev/kmem
+the default memory
+.El
+.Sh SEE ALSO
+.Xr gprof 1 ,
+.Xr config 8
+.Sh DIAGNOSTICS
+Users with only read permission on
+.Pa /dev/kmem
+cannot change the state
+of profiling collection.
+If profiling is in progress,
+they can get a
+.Pa gmon.out
+file containing a warning that the data may be inconsistent.
+.Sh HISTORY
+The
+.Nm kgmon
+command appeared in
+.Bx 4.2 .
--- /dev/null
+/*
+ * Copyright (c) 1983, 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+#ifndef __APPLE__
+#ifndef lint
+static const char copyright[] =
+"@(#) Copyright (c) 1983, 1992, 1993\n\
+ The Regents of the University of California. All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)kgmon.c 8.1 (Berkeley) 6/6/93";
+#endif
+static const char rcsid[] =
+ "$FreeBSD: src/usr.sbin/kgmon/kgmon.c,v 1.14 2004/08/30 03:11:46 marcel Exp $";
+#endif /* not lint */
+#endif /* !__APPLE__ */
+
+#include <sys/param.h>
+#include <sys/file.h>
+#include <sys/time.h>
+#include <sys/sysctl.h>
+#include <sys/gmon.h>
+#include <ctype.h>
+#include <err.h>
+#include <errno.h>
+#include <kvm.h>
+#include <limits.h>
+#include <nlist.h>
+#include <paths.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+struct nlist nl[] = {
+#define N_GMONPARAM 0
+ { "__gmonparam" },
+#define N_PROFHZ 1
+ { "_profhz" },
+ { NULL },
+};
+
+struct kvmvars {
+ kvm_t *kd;
+ struct gmonparam gpm;
+};
+
+int Bflag, bflag, hflag, kflag, rflag, pflag;
+int debug = 0;
+int getprof(struct kvmvars *);
+int getprofhz(struct kvmvars *);
+void kern_readonly(int);
+int openfiles(char *, char *, struct kvmvars *);
+void setprof(struct kvmvars *kvp, int state);
+void dumpstate(struct kvmvars *kvp);
+void reset(struct kvmvars *kvp);
+static void usage(void);
+
+int
+main(int argc, char **argv)
+{
+#ifdef __APPLE__
+ extern char *optarg;
+ extern int optind;
+#endif
+ int ch, mode, disp, accessmode;
+ struct kvmvars kvmvars;
+ char *system, *kmemf;
+
+ seteuid(getuid());
+ kmemf = NULL;
+ system = NULL;
+#ifdef __APPLE__
+ while ((ch = getopt(argc, argv, "M:N:bhpr")) != -1) {
+#else
+ while ((ch = getopt(argc, argv, "M:N:Bbhpr")) != -1) {
+#endif
+ switch((char)ch) {
+
+ case 'M':
+ kmemf = optarg;
+ kflag = 1;
+ break;
+
+ case 'N':
+ system = optarg;
+ break;
+
+#ifndef __APPLE__
+ case 'B':
+ Bflag = 1;
+ break;
+#endif
+
+ case 'b':
+ bflag = 1;
+ break;
+
+ case 'h':
+ hflag = 1;
+ break;
+
+ case 'p':
+ pflag = 1;
+ break;
+
+ case 'r':
+ rflag = 1;
+ break;
+
+ default:
+ usage();
+ }
+ }
+ argc -= optind;
+ argv += optind;
+
+#define BACKWARD_COMPATIBILITY
+#ifdef BACKWARD_COMPATIBILITY
+ if (*argv) {
+ system = *argv;
+ if (*++argv) {
+ kmemf = *argv;
+ ++kflag;
+ }
+ }
+#endif
+ if (system == NULL)
+#ifdef __APPLE__
+ system = _PATH_UNIX;
+#else
+ system = (char *)getbootfile();
+#endif
+ accessmode = openfiles(system, kmemf, &kvmvars);
+ mode = getprof(&kvmvars);
+ if (hflag)
+ disp = GMON_PROF_OFF;
+#ifndef __APPLE__
+ else if (Bflag)
+ disp = GMON_PROF_HIRES;
+#endif
+ else if (bflag)
+ disp = GMON_PROF_ON;
+ else
+ disp = mode;
+ if (pflag)
+ dumpstate(&kvmvars);
+ if (rflag)
+ reset(&kvmvars);
+ if (accessmode == O_RDWR)
+ setprof(&kvmvars, disp);
+ (void)fprintf(stdout, "kgmon: kernel profiling is %s.\n",
+#ifndef __APPLE__
+ disp == GMON_PROF_OFF ? "off" :
+ disp == GMON_PROF_HIRES ? "running (high resolution)" :
+ disp == GMON_PROF_ON ? "running" :
+ disp == GMON_PROF_BUSY ? "busy" :
+ disp == GMON_PROF_ERROR ? "off (error)" :
+ "in an unknown state");
+#else
+ disp == GMON_PROF_OFF ? "off" : "running");
+#endif /* __APPLE__ */
+ return (0);
+}
+
+static void
+usage()
+{
+#ifdef __APPLE__
+ fprintf(stderr, "usage: kgmon [-bhrp]\n");
+#else
+ fprintf(stderr, "usage: kgmon [-Bbhrp] [-M core] [-N system]\n");
+#endif
+ exit(1);
+}
+
+/*
+ * Check that profiling is enabled and open any ncessary files.
+ */
+int
+openfiles(system, kmemf, kvp)
+ char *system;
+ char *kmemf;
+ struct kvmvars *kvp;
+{
+ size_t size;
+ int mib[3], state, openmode;
+ char errbuf[_POSIX2_LINE_MAX];
+
+ if (!kflag) {
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROF;
+ mib[2] = GPROF_STATE;
+ size = sizeof state;
+ if (sysctl(mib, 3, &state, &size, NULL, 0) < 0)
+ errx(20, "profiling not defined in kernel");
+#ifdef __APPLE__
+ if (!(bflag || hflag || rflag ||
+ (pflag && (state == GMON_PROF_ON))))
+ return (O_RDONLY);
+#else
+ if (!(Bflag || bflag || hflag || rflag ||
+ (pflag &&
+ (state == GMON_PROF_HIRES || state == GMON_PROF_ON))))
+ return (O_RDONLY);
+#endif
+ (void)seteuid(0);
+ if (sysctl(mib, 3, NULL, NULL, &state, size) >= 0)
+ return (O_RDWR);
+ (void)seteuid(getuid());
+ kern_readonly(state);
+ return (O_RDONLY);
+ }
+#ifdef __APPLE__
+ openmode = (bflag || hflag || pflag || rflag)
+#else
+ openmode = (Bflag || bflag || hflag || pflag || rflag)
+#endif
+ ? O_RDWR : O_RDONLY;
+ kvp->kd = kvm_openfiles(system, kmemf, NULL, openmode, errbuf);
+ if (kvp->kd == NULL) {
+ if (openmode == O_RDWR) {
+ openmode = O_RDONLY;
+ kvp->kd = kvm_openfiles(system, kmemf, NULL, O_RDONLY,
+ errbuf);
+ }
+ if (kvp->kd == NULL)
+ errx(2, "kvm_openfiles: %s", errbuf);
+ kern_readonly(GMON_PROF_ON);
+ }
+ if (kvm_nlist(kvp->kd, nl) < 0)
+ errx(3, "%s: no namelist", system);
+ if (!nl[N_GMONPARAM].n_value)
+ errx(20, "profiling not defined in kernel");
+ return (openmode);
+}
+
+/*
+ * Suppress options that require a writable kernel.
+ */
+void
+kern_readonly(mode)
+ int mode;
+{
+
+ (void)fprintf(stderr, "kgmon: kernel read-only: ");
+#ifdef __APPLE__
+ if (pflag && mode == GMON_PROF_ON)
+#else
+ if (pflag && (mode == GMON_PROF_HIRES || mode == GMON_PROF_ON))
+#endif
+ (void)fprintf(stderr, "data may be inconsistent\n");
+ if (rflag)
+ (void)fprintf(stderr, "-r supressed\n");
+#ifndef __APPLE__
+ if (Bflag)
+ (void)fprintf(stderr, "-B supressed\n");
+#endif
+ if (bflag)
+ (void)fprintf(stderr, "-b supressed\n");
+ if (hflag)
+ (void)fprintf(stderr, "-h supressed\n");
+#ifdef __APPLE__
+ rflag = bflag = hflag = 0;
+#else
+ rflag = Bflag = bflag = hflag = 0;
+#endif
+}
+
+/*
+ * Get the state of kernel profiling.
+ */
+int
+getprof(kvp)
+ struct kvmvars *kvp;
+{
+ size_t size;
+ int mib[3];
+
+ if (kflag) {
+ size = kvm_read(kvp->kd, nl[N_GMONPARAM].n_value, &kvp->gpm,
+ sizeof kvp->gpm);
+ } else {
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROF;
+ mib[2] = GPROF_GMONPARAM;
+ size = sizeof kvp->gpm;
+ if (sysctl(mib, 3, &kvp->gpm, &size, NULL, 0) < 0)
+ size = 0;
+ }
+
+#ifdef __APPLE__
+ if (size != sizeof kvp->gpm)
+ errx(4, "cannot get gmonparam: %s",
+ kflag ? kvm_geterr(kvp->kd) : strerror(errno));
+#else /* __APPLE__ */
+ /*
+ * Accept certain undersized "structs" from old kernels. We need
+ * everything up to hashfraction, and want profrate and
+ * histcounter_type. Assume that the kernel doesn't put garbage
+ * in any padding that is returned instead of profrate and
+ * histcounter_type. This is a bad assumption for dead kernels,
+ * since kvm_read() will normally return garbage for bytes beyond
+ * the end of the actual kernel struct, if any.
+ */
+ if (size < offsetof(struct gmonparam, hashfraction) +
+ sizeof(kvp->gpm.hashfraction) || size > sizeof(kvp->gpm))
+ errx(4, "cannot get gmonparam: %s",
+ kflag ? kvm_geterr(kvp->kd) : strerror(errno));
+ bzero((char *)&kvp->gpm + size, sizeof(kvp->gpm) - size);
+ if (kvp->gpm.profrate == 0)
+ kvp->gpm.profrate = getprofhz(kvp);
+#ifdef __i386__
+ if (kvp->gpm.histcounter_type == 0) {
+ /*
+ * This fixup only works for not-so-old i386 kernels. The
+ * magic 16 is the kernel FUNCTION_ALIGNMENT. 64-bit
+ * counters are signed; smaller counters are unsigned.
+ */
+ kvp->gpm.histcounter_type = 16 /
+ (kvp->gpm.textsize / kvp->gpm.kcountsize) * CHAR_BIT;
+ if (kvp->gpm.histcounter_type == 64)
+ kvp->gpm.histcounter_type = -64;
+ }
+#endif
+#endif /* __APPLE__ */
+
+ return (kvp->gpm.state);
+}
+
+/*
+ * Enable or disable kernel profiling according to the state variable.
+ */
+void
+setprof(kvp, state)
+ struct kvmvars *kvp;
+ int state;
+{
+ struct gmonparam *p = (struct gmonparam *)nl[N_GMONPARAM].n_value;
+ size_t sz;
+ int mib[3], oldstate;
+
+ sz = sizeof(state);
+ if (!kflag) {
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROF;
+ mib[2] = GPROF_STATE;
+ if (sysctl(mib, 3, &oldstate, &sz, NULL, 0) < 0)
+ goto bad;
+ if (oldstate == state)
+ return;
+ (void)seteuid(0);
+ if (sysctl(mib, 3, NULL, NULL, &state, sz) >= 0) {
+ (void)seteuid(getuid());
+ return;
+ }
+ (void)seteuid(getuid());
+ } else if (kvm_write(kvp->kd, (u_long)&p->state, (void *)&state, sz)
+ == sz)
+ return;
+bad:
+ warnx("warning: cannot turn profiling %s",
+ state == GMON_PROF_OFF ? "off" : "on");
+}
+
+/*
+ * Build the gmon.out file.
+ */
+void
+dumpstate(kvp)
+ struct kvmvars *kvp;
+{
+ register FILE *fp;
+ struct rawarc rawarc;
+ struct tostruct *tos;
+ u_long frompc;
+ u_short *froms, *tickbuf;
+ size_t i;
+ int mib[3];
+ struct gmonhdr h;
+ int fromindex, endfrom, toindex;
+
+ setprof(kvp, GMON_PROF_OFF);
+ fp = fopen("gmon.out", "w");
+ if (fp == 0) {
+ warn("gmon.out");
+ return;
+ }
+
+ /*
+ * Build the gmon header and write it to a file.
+ */
+ bzero(&h, sizeof(h));
+ h.lpc = kvp->gpm.lowpc;
+ h.hpc = kvp->gpm.highpc;
+ h.ncnt = kvp->gpm.kcountsize + sizeof(h);
+ h.version = GMONVERSION;
+#ifdef __APPLE__
+ h.profrate = getprofhz(kvp);
+#else
+ h.profrate = kvp->gpm.profrate;
+ h.histcounter_type = kvp->gpm.histcounter_type;
+#endif
+ fwrite((char *)&h, sizeof(h), 1, fp);
+
+ /*
+ * Write out the tick buffer.
+ */
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROF;
+ if ((tickbuf = (u_short *)malloc(kvp->gpm.kcountsize)) == NULL)
+ errx(5, "cannot allocate kcount space");
+ if (kflag) {
+ i = kvm_read(kvp->kd, (u_long)kvp->gpm.kcount, (void *)tickbuf,
+ kvp->gpm.kcountsize);
+ } else {
+ mib[2] = GPROF_COUNT;
+ i = kvp->gpm.kcountsize;
+ if (sysctl(mib, 3, tickbuf, &i, NULL, 0) < 0)
+ i = 0;
+ }
+ if (i != kvp->gpm.kcountsize)
+ errx(6, "read ticks: read %lu, got %ld: %s",
+ kvp->gpm.kcountsize, (long)i,
+ kflag ? kvm_geterr(kvp->kd) : strerror(errno));
+ if ((fwrite(tickbuf, kvp->gpm.kcountsize, 1, fp)) != 1)
+ err(7, "writing tocks to gmon.out");
+ free(tickbuf);
+
+ /*
+ * Write out the arc info.
+ */
+ if ((froms = (u_short *)malloc(kvp->gpm.fromssize)) == NULL)
+ errx(8, "cannot allocate froms space");
+ if (kflag) {
+ i = kvm_read(kvp->kd, (u_long)kvp->gpm.froms, (void *)froms,
+ kvp->gpm.fromssize);
+ } else {
+ mib[2] = GPROF_FROMS;
+ i = kvp->gpm.fromssize;
+ if (sysctl(mib, 3, froms, &i, NULL, 0) < 0)
+ i = 0;
+ }
+ if (i != kvp->gpm.fromssize)
+ errx(9, "read froms: read %lu, got %ld: %s",
+ kvp->gpm.fromssize, (long)i,
+ kflag ? kvm_geterr(kvp->kd) : strerror(errno));
+ if ((tos = (struct tostruct *)malloc(kvp->gpm.tossize)) == NULL)
+ errx(10, "cannot allocate tos space");
+ if (kflag) {
+ i = kvm_read(kvp->kd, (u_long)kvp->gpm.tos, (void *)tos,
+ kvp->gpm.tossize);
+ } else {
+ mib[2] = GPROF_TOS;
+ i = kvp->gpm.tossize;
+ if (sysctl(mib, 3, tos, &i, NULL, 0) < 0)
+ i = 0;
+ }
+ if (i != kvp->gpm.tossize)
+ errx(11, "read tos: read %lu, got %ld: %s",
+ kvp->gpm.tossize, (long)i,
+ kflag ? kvm_geterr(kvp->kd) : strerror(errno));
+ if (debug)
+ warnx("lowpc 0x%lx, textsize 0x%lx",
+ (unsigned long)kvp->gpm.lowpc, kvp->gpm.textsize);
+ endfrom = kvp->gpm.fromssize / sizeof(*froms);
+ for (fromindex = 0; fromindex < endfrom; ++fromindex) {
+ if (froms[fromindex] == 0)
+ continue;
+ frompc = (u_long)kvp->gpm.lowpc +
+ (fromindex * kvp->gpm.hashfraction * sizeof(*froms));
+ for (toindex = froms[fromindex]; toindex != 0;
+ toindex = tos[toindex].link) {
+ if (debug)
+ warnx("[mcleanup] frompc 0x%lx selfpc 0x%lx "
+ "count %ld", frompc, tos[toindex].selfpc,
+ tos[toindex].count);
+ rawarc.raw_frompc = frompc;
+ rawarc.raw_selfpc = (u_long)tos[toindex].selfpc;
+ rawarc.raw_count = tos[toindex].count;
+ fwrite((char *)&rawarc, sizeof(rawarc), 1, fp);
+ }
+ }
+ fclose(fp);
+}
+
+/*
+ * Get the profiling rate.
+ */
+int
+getprofhz(kvp)
+ struct kvmvars *kvp;
+{
+ size_t size;
+ int mib[2], profrate;
+ struct clockinfo clockrate;
+
+ if (kflag) {
+ profrate = 1;
+ if (kvm_read(kvp->kd, nl[N_PROFHZ].n_value, &profrate,
+ sizeof profrate) != sizeof profrate)
+ warnx("get clockrate: %s", kvm_geterr(kvp->kd));
+ return (profrate);
+ }
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_CLOCKRATE;
+ clockrate.profhz = 1;
+ size = sizeof clockrate;
+ if (sysctl(mib, 2, &clockrate, &size, NULL, 0) < 0)
+ warn("get clockrate: %s", strerror(errno));
+ return (clockrate.profhz);
+}
+
+/*
+ * Reset the kernel profiling date structures.
+ */
+void
+reset(kvp)
+ struct kvmvars *kvp;
+{
+ char *zbuf;
+ u_long biggest;
+ int mib[3];
+
+ setprof(kvp, GMON_PROF_OFF);
+
+ biggest = kvp->gpm.kcountsize;
+ if (kvp->gpm.fromssize > biggest)
+ biggest = kvp->gpm.fromssize;
+ if (kvp->gpm.tossize > biggest)
+ biggest = kvp->gpm.tossize;
+ if ((zbuf = (char *)malloc(biggest)) == NULL)
+ errx(12, "cannot allocate zbuf space");
+ bzero(zbuf, biggest);
+ if (kflag) {
+ if (kvm_write(kvp->kd, (u_long)kvp->gpm.kcount, zbuf,
+ kvp->gpm.kcountsize) != kvp->gpm.kcountsize)
+ errx(13, "tickbuf zero: %s", kvm_geterr(kvp->kd));
+ if (kvm_write(kvp->kd, (u_long)kvp->gpm.froms, zbuf,
+ kvp->gpm.fromssize) != kvp->gpm.fromssize)
+ errx(14, "froms zero: %s", kvm_geterr(kvp->kd));
+ if (kvm_write(kvp->kd, (u_long)kvp->gpm.tos, zbuf,
+ kvp->gpm.tossize) != kvp->gpm.tossize)
+ errx(15, "tos zero: %s", kvm_geterr(kvp->kd));
+ return;
+ }
+ (void)seteuid(0);
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROF;
+ mib[2] = GPROF_COUNT;
+ if (sysctl(mib, 3, NULL, NULL, zbuf, kvp->gpm.kcountsize) < 0)
+ errx(13, "tickbuf zero: %s", strerror(errno));
+ mib[2] = GPROF_FROMS;
+ if (sysctl(mib, 3, NULL, NULL, zbuf, kvp->gpm.fromssize) < 0)
+ errx(14, "froms zero: %s", strerror(errno));
+ mib[2] = GPROF_TOS;
+ if (sysctl(mib, 3, NULL, NULL, zbuf, kvp->gpm.tossize) < 0)
+ errx(15, "tos zero: %s", strerror(errno));
+ (void)seteuid(getuid());
+ free(zbuf);
+}
--- /dev/null
+#
+# Generated by the Apple Project Builder.
+#
+# NOTE: Do NOT change this file -- Project Builder maintains it.
+#
+# Put all of your customizations in files called Makefile.preamble
+# and Makefile.postamble (both optional), and Makefile will include them.
+#
+
+NAME = kmodload
+
+PROJECTVERSION = 2.8
+PROJECT_TYPE = Tool
+
+HFILES = kld_patch.h vers_rsrc.h c++rem3.h
+
+CFILES = c++rem3.c kld_patch.c kmodload.c vers_rsrc.c
+
+OTHERSRCS = Makefile.preamble Makefile Makefile.postamble kmodload.8\
+ kmodsyms.8
+
+
+MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
+CODE_GEN_STYLE = DYNAMIC
+MAKEFILE = tool.make
+NEXTSTEP_INSTALLDIR = /sbin
+WINDOWS_INSTALLDIR = /Library/Executables
+PDO_UNIX_INSTALLDIR = /bin
+LIBS = -lkld
+DEBUG_LIBS = $(LIBS)
+PROF_LIBS = $(LIBS)
+
+
+
+
+NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
+WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
+PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
+NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
+WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
+PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
+
+include $(MAKEFILEDIR)/platform.make
+
+-include Makefile.preamble
+
+include $(MAKEFILEDIR)/$(MAKEFILE)
+
+-include Makefile.postamble
+
+-include Makefile.dependencies
--- /dev/null
+// 45678901234567890123456789012345678901234567890123456789012345678901234567890
+/*
+
+Rules specification by
+Stan Shebs of Apple Computer, Inc 2002
+
+Parse and remangle implemented by
+Godfrey van der Linden of Apple Computer, Inc 2002
+
+Rules for demangling IOKit symbols
+
+In Darwin versions 1.0 through at least 5.2, IOKit is compiled using
+GCC version 2. GCC 2's C++ symbol mangling algorithm ultimately
+derives from the basic scheme described in the Annotated C++ Reference
+Manual (ARM), section 7.2.1c, with a number of changes, mostly due to
+the expansion of the language since the ARM was published in 1990.
+
+This description is not complete. It omits RTTI, thunks, and
+templates, since they are not allowed in IOKit. The description also
+mentions mangled name constructs that are not disallowed in IOKit, but
+that as of Jan 2002, did actually appear in any symbol in the base
+system.
+
+A mangled name basically consists of a function name followed
+by two underscores, optionally followed by a signature computed
+from the function's argument types. (Note that in Darwin, the
+compiler adds an additional underscore to all C and C++ symbols.
+The description assumes this has been removed.)
+
+<special_or_name> ::= <gnu_special>
+ | <mangled_name>
+
+<mangled_name> ::= <prefix> [ <signature> ]
+
+<prefix> ::= [ "_GLOBAL_" [ID] "__" ] <function_name> "__" [ <opinfo> ]
+
+<function_name> ::= <char> <char>*
+ | NULL
+
+Questions for Stan (@@@Stan@@@)
+1> A valid <opinfo> implies a null function name.
+2> I wonder if an <opinfo> is mutually exclusive with a <function_name> perhaps something like :-
+<prefix> ::= [ "_GLOBAL_" ("I"|"D") "__" ] ((<function_name> "__") | <opinfo>)
+3> Do constructors turn up as an opinfo or a NULL function name?
+
+The optional "_GLOBAL_"("I"|"D")"__" sequence indicates global constructors
+and destructors, but in practice these do not appear with the mach-o Apple 2.95
+
+A Null <function_name> indicates a constructor or an operator.
+
+Since <function_name> may include trailing underscores, the demangler
+should scan forward until a non-underscore is seen, and then take the
+last two as the separator between name and signature.
+
+<function_name> may also include any number of leading underscores, so
+the demangler needs to add those to <function_name> and look for the
+"__" following the name.
+
+<gnu_special> ::= ("_._"|"_$_" ) <class_name> ; destructor
+ | "__vt_" <class_name> ; virtual table
+ | "_" <class_name> ("."|"$") <varname> ; Variable
+
+<class_name> ::= <counted_class_name>
+ | "Q" <qualified_name>
+ | "K" <qualified_name> ; ignored and illegal
+
+<counted_class_name> ::= <count> <name>
+
+<qualified_name> ::= <q_count> <counted_class_name> <counted_class_name>*
+
+<opinfo> ::= "type" <type>
+ | "__op" <type>
+ | <opname> "__"
+ | "a"
+
+<opname> ::= "aa" # &&
+ | "aad" # &=
+ | "ad" # &
+ | "adv" # /=
+ | "aer" # ^=
+ | "als" # <<=
+ | "amd" # %=
+ | "ami" # -=
+ | "aml" # *=
+ | "aor" # |=
+ | "apl" # +=
+ | "ars" # >>=
+ | "as" # =
+ | "cl" # ()
+ | "cm" # ,
+ | "cn" # ?:
+ | "co" # ~
+ | "dl" # delete
+ | "dv" # /
+ | "eq" # ==
+ | "er" # ^
+ | "ge" # >=
+ | "gt" # >
+ | "le" # <=
+ | "ls" # <<
+ | "lt" # <
+ | "md" # %
+ | "mi" # -
+ | "ml" # *
+ | "mm" # --
+ | "mn" # <?
+ | "mx" # >?
+ | "ne" # !=
+ | "nt" # !
+ | "nw" # new
+ | "oo" # ||
+ | "or" # |
+ | "pl" # +
+ | "pp" # ++
+ | "rf" # ->
+ | "rm" # ->*
+ | "rs" # >>
+ | "sz" # sizeof
+ | "vc" # []
+ | "vd" # delete[]
+ | "vn" # new[]
+
+Questions for Stan (@@@Stan@@@)
+1> What the hell is The "type" & "__op" stuff?
+
+IOKit has so far only been observed to use operations new ("nw") and
+delete ("dl").
+
+The signature is a concatenated list of elements, which are usually
+argument types, but may include other sorts of things.
+
+<signature> ::= <qualifier>* <s_element> <argument_types>
+
+<s_element> ::= <class_name>
+ | "S"
+ | "F" <argument_types> [ "_" <return_type> ]
+
+Questions for Stan (@@@Stan@@@)
+1> I think the 'B' phrase should probably read '| "B" <index>'?
+2> Ambiguous productions for signature
+ OSObject::func(struct timeval fred) => _func__8OSObject7timeval
+ signature could be parsed as
+ <s_element> <s_element> or <s_element> <argument_types>
+ I believe the second one must be the valid production.
+
+<count> ::= <digit> <digit>*
+
+<varname> :: <name>
+
+<name> ::= <char> <char>*
+
+The <count> is the number of characters in <name>.
+
+Argument types are a concatenated sequence of types.
+
+<argument_types> ::= # Empty
+ | <arg_type>+
+<arg_type> ::= <type> [ "n" <index> ]
+ | "N" <count> <pos>
+ | "T" <index>
+
+The "N" repeats and "T" references to already-seen typescan only
+appear if -fno-squangle (no squashed mangling), and in practice aren't
+seen in IOKit symbols.
+
+<index> ::= <digit> | <digit> <digit> <digit>* "_"
+
+Return types are just like any other sort of type.
+
+<return_type> ::= <type>
+
+Types consist of a variable number of declarators in front of a basic
+type.
+
+<type> ::= <declarator>* <base_type>
+
+<declarator> ::= "P" ; pointer
+ | "p" ; pointer (but never occurs?)
+ | "R" ; reference (&)
+ | "A" <count> ; array
+ | "T" <index>
+ | "O" <count>
+ | <qualifier>
+
+The "A" <count> production can produce an ambigous output if it is followed by a counted class name or structure name.
+
+The "T" reference to a type does not appear in IOKit symbols, nor do
+the "M" and "O" declarators.
+
+<base_type> ::= <function_type> ; function
+ | <method_type> ; method
+ | <type_qualifier>* <fund_type_id>
+
+<function_type> ::= "F" <argument_types> "_" <type>
+
+<method_type> ::= "M" <class_name> <function_type>
+
+A qualified name consists of a count of types, followed by all the
+types concatenated together. For instance, Namespace::Class is
+Q29Namespace5Class. For more than 9 types (which has not yet occurred
+in IOKit), the multi-digit count is surrounded by underscores.
+
+Questions for Stan (@@@Stan@@@)
+1> Can the types in a qualified name really be generic types or can the set be restricted to just counted class names?
+
+<q_count> ::= <digit> | "_" <digit> <digit>* "_"
+
+Fundamental types are single letters representing standard built-in
+types, optionally preceded by type qualifiers for properties like
+signedness and constness. For instance, CUi is a const unsigned int.
+
+<type_qualifier> ::= "S" ; signed (chars only)
+ | "U" ; unsigned (any integral type)
+ | "J" ; __complex
+ | <qualifier>
+
+<fund_type_id> ::= <class_name>
+ | "b" ; bool
+ | "c" ; char
+ | "d" ; double
+ | "f" ; float
+ | "i" ; int
+ | "l" ; long
+ | "r" ; long double
+ | "s" ; short
+ | "v" ; void
+ | "w" ; wchar_t
+ | "x" ; long long
+ | "G" <count> ; ?????
+ | "e" ; ellipsis
+
+"G" does not appear in IOKit symbols in this context.
+
+<qualifier> ::= "C" ; const
+ | "V" ; volatile
+ | "u" ; restrict (C99)
+ | "G" ; struct/union/enum unused by gcc3
+
+The restrict qualifier has not appeared in IOKit symbols.
+
+*/
+#if KERNEL
+
+#include <stdarg.h>
+#include <string.h>
+
+#include <sys/systm.h>
+
+#include <libkern/OSTypes.h>
+
+#include <libsa/stdlib.h>
+
+enum { false = 0, true = 1 };
+
+#else /* !KERNEL */
+
+#include <unistd.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#endif /* KERNEL */
+
+#include "c++rem3.h"
+
+#define STRLEN(s) (sizeof(s)-1)
+#define APPENDSTR(c, str) do { appendNStr(c, str, STRLEN(str)); } while (0)
+
+#define MAX_COMPOUND_TYPES 128
+#define MAX_ENTRIES 256
+#define MAX_SDICT_ENTRIES 256
+#define MAX_BDICT_ENTRIES 64
+#define MAX_RETURN_BUFFER 256
+
+// Can't be bigger that 16 entries
+typedef enum NameTypes {
+ kNTUndefined, kNTClass, kNTFunction, kNTFuncEnd,
+ kNTMethod, kNTBuiltIn, kNTDeclarator, kNTArray,
+ kNTKName, kNTSubstitute, kNTSubQualClass
+} NameTypes;
+
+typedef struct TypeData {
+ short fStartEntry, fNumEntries;
+} TypeData;
+
+typedef struct BaseTypeData {
+ const char *fFundTypeID; // May contain the type itself for kNTBuiltIt
+ unsigned int fLen:16;
+ unsigned int fType:4; // Must fit a NameType
+ unsigned int fVolatile:1;
+ unsigned int fConst:1;
+ unsigned int fSigned:1;
+ unsigned int fUnsigned:1;
+ unsigned int fPseudo:1;
+ unsigned int fQualified:1;
+} BaseTypeData;
+
+typedef struct CheckPoint {
+ const char *fInChar;
+ unsigned char fNumI, fNumO, fNumT, fNumB, fNumS;
+} CheckPoint;
+
+typedef struct ParseContext {
+ CheckPoint fP;
+ BaseTypeData fInEntries[MAX_ENTRIES]; // Input parsed elements
+ BaseTypeData fOutEntries[MAX_ENTRIES]; // Output parsed elements
+ TypeData fTypeList[MAX_COMPOUND_TYPES]; // Table of types
+ TypeData fSubDict[MAX_SDICT_ENTRIES];
+ TypeData fBDict[MAX_BDICT_ENTRIES]; // B dictionary types
+ BaseTypeData *fCurBaseP;
+ const char *fInStr;
+ char *fOutStrEnd;
+ char *fOutChar;
+ int fInSize;
+ Rem3Return fRetCode;
+} ParseContext;
+
+//
+// The only forward declaration necessary
+//
+static Boolean parse_type(ParseContext *c);
+
+// Helper functions for walking through the string
+static __inline__ char getNext(ParseContext *c)
+{
+ return *c->fP.fInChar++;
+}
+
+static __inline__ CheckPoint *checkPoint(ParseContext *c)
+{
+ return &c->fP;
+}
+
+static __inline__ void resetTo(ParseContext *c, CheckPoint *chk)
+{
+ c->fP = *chk;
+}
+
+static __inline__ const char *inCharFromCheck(ParseContext *c, CheckPoint *chk)
+{
+ return chk->fInChar;
+}
+
+static __inline__ void advance(ParseContext *c, int len)
+{
+ c->fP.fInChar += len;
+}
+
+static __inline__ Boolean retard(ParseContext *c, int len)
+{
+ const char *cp = c->fP.fInChar - len;
+ if (cp < c->fInStr)
+ return false;
+
+ c->fP.fInChar = cp;
+ return true;
+}
+
+static __inline__ char peekAt(ParseContext *c, int index)
+{
+ return c->fP.fInChar[index];
+}
+
+static __inline__ char peekNext(ParseContext *c)
+{
+ return peekAt(c, 0);
+}
+
+static __inline__ Boolean atEnd(ParseContext *c)
+{
+ return '\0' == peekNext(c);
+}
+
+static __inline__ Boolean hasRemain(ParseContext *c, int len)
+{
+ return (c->fP.fInChar - c->fInStr + len <= c->fInSize);
+}
+
+//
+// Routines for allocating entries in the various
+//
+static __inline__ BaseTypeData *newIn(ParseContext *c)
+{
+ BaseTypeData *iP;
+
+ if (c->fP.fNumI < MAX_ENTRIES) {
+ iP = &c->fInEntries[c->fP.fNumI++];
+ bzero(iP, sizeof(*iP));
+ c->fCurBaseP = iP;
+ return iP;
+ }
+ else {
+ c->fRetCode = kR3InternalNotRemangled;
+ return NULL;
+ }
+}
+
+static __inline__ BaseTypeData *newOut(ParseContext *c)
+{
+ BaseTypeData *oP;
+
+ if (c->fP.fNumO < MAX_ENTRIES) {
+ oP = &c->fOutEntries[c->fP.fNumO++];
+ return oP;
+ }
+ else {
+ c->fRetCode = kR3InternalNotRemangled;
+ return NULL;
+ }
+}
+
+static __inline__ TypeData *
+newSub(ParseContext *c, int start, int num)
+{
+ TypeData *sP;
+
+ if (c->fP.fNumS < MAX_SDICT_ENTRIES) {
+ sP = &c->fSubDict[c->fP.fNumS++];
+ sP->fStartEntry = start;
+ sP->fNumEntries = num;
+ return sP;
+ }
+ else {
+ c->fRetCode = kR3InternalNotRemangled;
+ return NULL;
+ }
+}
+
+static __inline__ TypeData *
+newBDict(ParseContext *c, int start, int num)
+{
+ TypeData *bP;
+
+ if (c->fP.fNumB < MAX_BDICT_ENTRIES) {
+ bP = &c->fBDict[c->fP.fNumB++];
+ bP->fStartEntry = start;
+ bP->fNumEntries = num;
+ return bP;
+ }
+ else {
+ c->fRetCode = kR3InternalNotRemangled;
+ return NULL;
+ }
+}
+
+static __inline__ TypeData *
+newType(ParseContext *c, int start)
+{
+ TypeData *tP;
+
+ if (c->fP.fNumT < MAX_COMPOUND_TYPES) {
+ tP = &c->fTypeList[c->fP.fNumT++];
+ tP->fStartEntry = start;
+ return tP;
+ }
+ else
+ return NULL;
+}
+
+static __inline__ TypeData *
+dupType(ParseContext *c, TypeData *iTP, int offset)
+{
+ TypeData *tP = newType(c, iTP->fStartEntry + offset);
+ if (tP)
+ tP->fNumEntries = iTP->fNumEntries;
+
+ return tP;
+}
+
+//
+// Identifier character recognition helpers, can be optimised
+//
+static __inline__ Boolean isValidFirstAlphabetic(char c)
+{
+ if ('a' <= c && c <= 'z')
+ return true;
+ else if ('A' <= c && c <= 'Z')
+ return true;
+ else
+ return false;
+}
+
+static __inline__ Boolean isValidFirstChar(char c)
+{
+ if (isValidFirstAlphabetic(c))
+ return true;
+ else if (c == '_')
+ return true;
+ else
+ return false;
+}
+
+static __inline__ Boolean isValidChar(char c)
+{
+ if (isValidFirstChar(c))
+ return true;
+ else if ('0' <= c && c <= '9')
+ return true;
+ else
+ return false;
+}
+
+//
+// Helper function for recognising characters and strings
+//
+
+// Check the current input is the given character
+static __inline__ Boolean isNext(ParseContext *c, char ch)
+{
+ if (peekNext(c) == ch) {
+ advance(c, 1);
+ return true;
+ }
+ else
+ return false;
+}
+
+// Check the current input is ONE of the characters in str
+static Boolean charNext(ParseContext *c, char *str)
+{
+ if (hasRemain(c, 1)) {
+ char ch = peekNext(c);
+ char next;
+
+ while ( (next = *str++) )
+ if (next == ch) {
+ advance(c, 1);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// Check the current input for 'str'
+static Boolean strNext(ParseContext *c, const char *str)
+{
+ const char *cp = c->fP.fInChar;
+
+ do {
+ if (!*str) {
+ c->fP.fInChar = (char *) cp;
+ return true;
+ }
+ else if (!*cp)
+ return false;
+
+ } while (*cp++ == *str++);
+
+ return false;
+}
+
+//
+// Qualifier re-encoding
+//
+static void
+decodeQual(BaseTypeData *typeP, int *qualLenP, const char **qualP)
+{
+ const char *qual;
+ int qualLen;
+
+ if (typeP->fConst && typeP->fVolatile)
+ { qual = "VK"; qualLen = 2; }
+ else if (typeP->fConst)
+ { qual = "K"; qualLen = 1; }
+ else if (typeP->fVolatile)
+ { qual = "V"; qualLen = 1; }
+ else
+ { qual = NULL; qualLen = 0; }
+
+ *qualLenP = qualLen;
+ *qualP = qual;
+}
+
+
+//
+// Output functions
+//
+
+static void appendChar(ParseContext *c, char ch)
+{
+ char *outAddr = c->fOutChar++;
+ if (outAddr < c->fOutStrEnd)
+ *outAddr = ch;
+}
+
+static void appendNStr(ParseContext *c, const char *str, int len)
+{
+ char *outAddr = c->fOutChar;
+
+ c->fOutChar += len;
+ if (c->fOutChar < c->fOutStrEnd)
+ bcopy(str, outAddr, len);
+}
+
+static __inline__ void appendStr(ParseContext *c, const char *str)
+{
+ appendNStr(c, str, strlen(str));
+}
+
+static void appendSub(ParseContext *c, int ls)
+{
+ appendChar(c, 'S');
+ if (ls) {
+ if (--ls >= 36) {
+ int ms;
+
+ ms = ls / 36;
+ appendChar(c, (ms < 10)? '0' + ms : 'A' + ms - 10);
+ ls -= (ms * 36);
+ }
+ appendChar(c, (ls < 10)? '0' + ls : 'A' + ls - 10);
+ }
+ appendChar(c, '_');
+}
+
+static Boolean compareTypes(ParseContext *c, int sub, int entry, int numEntries)
+{
+ TypeData *subP = &c->fSubDict[sub];
+ BaseTypeData *bSP, *bIP;
+ int i;
+
+ if (subP->fNumEntries != numEntries)
+ return false;
+
+ bSP = &c->fInEntries[subP->fStartEntry];
+ bIP = &c->fInEntries[entry];
+
+ for (i = 0; i < numEntries; i++, bSP++, bIP++) {
+ if (bSP->fType != bIP->fType)
+ return false;
+
+ switch (bSP->fType) {
+ case kNTClass:
+ if (bSP->fLen != bIP->fLen)
+ return false;
+ else if (strncmp(bSP->fFundTypeID, bIP->fFundTypeID, bSP->fLen))
+ return false;
+ break;
+
+ case kNTArray:
+ case kNTBuiltIn:
+ case kNTDeclarator:
+ if (bSP->fFundTypeID != bIP->fFundTypeID)
+ return false;
+ break;
+
+ case kNTMethod:
+ case kNTFunction:
+ case kNTUndefined:
+ case kNTKName:
+ break; // OK so far
+
+ default:
+ return false; // Fatal errors
+ }
+ }
+
+ return true;
+}
+
+static int searchDict(ParseContext *c, int entry, int numE)
+{
+ int sub, numSubs = c->fP.fNumS;
+
+ // don't try to substitute the last builtin
+ if (numE == 1 && kNTBuiltIn == c->fInEntries[entry].fType)
+ return -1;
+
+ for (sub = 0; sub < numSubs; sub++)
+ if (compareTypes(c, sub, entry, numE))
+ return sub;
+
+ return -1;
+}
+
+static int searchDictClass(ParseContext *c, const char *qname, int len)
+{
+ TypeData *subP;
+ int sub, numSubs = c->fP.fNumS;
+
+ for (sub = 0, subP = c->fSubDict; sub < numSubs; sub++, subP++) {
+ BaseTypeData *iP = &c->fInEntries[subP->fStartEntry];
+
+ if (kNTClass != iP->fType || iP->fLen != len)
+ continue;
+ if (!strncmp(iP->fFundTypeID, qname, len))
+ return sub;
+ }
+
+ return -1;
+}
+
+static Boolean
+appendQualifiedClass(ParseContext *c, int entry)
+{
+ BaseTypeData *iP, *oP, *sP, *endSP;
+ const char *cp, *typeID;
+ int sub, subEntry, prefixLen;
+ int q_count;
+
+ int decodeStart = c->fP.fNumI;
+
+ // Scan through the incom
+ iP = &c->fInEntries[entry];
+ endSP = &c->fInEntries[MAX_ENTRIES];
+ sP = &c->fInEntries[decodeStart];
+
+ prefixLen = iP->fLen;
+ typeID = cp = iP->fFundTypeID;
+ for (q_count = 0; sP < endSP && (cp-typeID) < prefixLen; q_count++, sP++) {
+ int count;
+
+ count = strtoul(cp, (char **) &cp, 10);
+ cp += count;
+
+ sP->fType = kNTClass;
+ sP->fFundTypeID = typeID;
+ sP->fLen = cp - typeID;
+ }
+ if (sP >= endSP)
+ return false;
+
+ // Search backwards until I find the first substitution
+ sub = -1;
+ for (subEntry = q_count, sP--; subEntry > 0; subEntry--, sP--) {
+ sub = searchDictClass(c, sP->fFundTypeID, sP->fLen);
+ if (-1 != sub)
+ break;
+ }
+
+ // Now drop the symbol into the output buffer
+ oP = newOut(c);
+ if (!oP)
+ return false;
+
+ if (sub < 0)
+ *oP = *iP; // No sub copy original
+ else {
+ // Substitution found
+ prefixLen = sP->fLen; // Length of substitution
+
+ oP->fType = kNTSubstitute; // Assume complete substitution
+ oP->fLen = sub;
+ oP->fFundTypeID = 0;
+
+ // We have a partial substitution so tag on the unmatched bit
+ if (prefixLen != iP->fLen) {
+ oP->fType = kNTSubQualClass; // Re-characterise as 2 part sub
+
+ oP = newOut(c);
+ if (!oP)
+ return false;
+
+ *oP = *iP; // Duplicate the original
+ oP->fType = kNTSubQualClass;
+ oP->fFundTypeID += prefixLen; // Skip leading substituted text
+ oP->fLen -= prefixLen;
+ }
+ }
+
+ // Finally insert the qualified class names into the dictionary
+ for (subEntry++, sP++; subEntry < q_count; subEntry++, decodeStart++) {
+ c->fInEntries[decodeStart] = *sP++;
+ if (!newSub(c, decodeStart, 1))
+ return false;
+ }
+ c->fP.fNumI = decodeStart;
+
+ if (!newSub(c, entry, 1))
+ return false;
+
+ return true;
+}
+
+static int
+appendType(ParseContext *c, int type)
+{
+ BaseTypeData *iP, *oP;
+ TypeData *tP;
+ int i, sub;
+ int entry, numE, lastEntry;
+ Boolean found;
+
+ if (type >= c->fP.fNumT)
+ return -1;
+
+ tP = &c->fTypeList[type++];
+ entry = tP->fStartEntry;
+ numE = tP->fNumEntries;
+ lastEntry = entry + numE;
+ iP = 0;
+ for (i = 0, found = false, sub = -1; i < numE; i++) {
+ iP = &c->fInEntries[entry + i];
+ switch (iP->fType) {
+
+ // Function & Builtin can't be compressed alone
+ case kNTFunction:
+ case kNTBuiltIn:
+ i++; // Copy the current entry
+ found = true;
+ break;
+
+ case kNTClass:
+ case kNTMethod:
+ sub = searchDict(c, entry + i, numE - i);
+ if (sub < 0 && !iP->fQualified)
+ i++;
+ found = true;
+ break;
+
+ case kNTDeclarator:
+ case kNTArray:
+ sub = searchDict(c, entry + i, numE - i);
+ found = (sub >= 0);
+ break;
+
+ // Internal error's should never occur
+ case kNTKName:
+ case kNTSubstitute:
+ case kNTSubQualClass:
+ case kNTUndefined:
+ default:
+ return -1;
+ }
+ if (found)
+ break;
+ }
+
+ if (!found)
+ return -1; // Internal error: no terminal symbol?
+
+ // Copy the already input buffer to the output
+ oP = &c->fOutEntries[c->fP.fNumO];
+ if (i) {
+ if (c->fP.fNumO + i >= MAX_ENTRIES)
+ return -1;
+
+ bcopy(&c->fInEntries[entry], oP, i * sizeof(*oP));
+ c->fP.fNumO += i;
+ oP += i;
+ }
+
+ if (sub >= 0) {
+ // We found a substitution
+ oP->fType = kNTSubstitute;
+ oP->fLen = sub;
+ c->fP.fNumO++; // Increment output for the substitution
+
+ // Walk over types that have been substituted
+ while (type < c->fP.fNumT
+ && c->fTypeList[type].fStartEntry < lastEntry)
+ type++;
+ }
+ else switch (iP->fType)
+ {
+ case kNTMethod:
+ type = appendType(c, type); // Class Name
+ if (type < 0)
+ return type;
+ type = appendType(c, type); // Pointer to function
+ if (type < 0)
+ return type;
+ break;
+
+ case kNTFunction:
+ type = appendType(c, type); // Return type
+ if (type < 0)
+ return type;
+
+ // process the argument list
+ do {
+ tP = &c->fTypeList[type];
+ if (tP->fStartEntry < lastEntry) {
+ type = appendType(c, type);
+ if (type < 0)
+ return type;
+ }
+ else
+ break;
+ } while (type < c->fP.fNumT);
+ oP = newOut(c);
+ if (!oP)
+ return -1;
+ oP->fType = kNTFuncEnd;
+ break;
+
+ case kNTBuiltIn:
+ i--; // Do not store the buildit in the dictionary
+ break;
+
+ case kNTClass: // Nothing more to do
+ if (!iP->fQualified)
+ break;
+ else if (appendQualifiedClass(c, entry + i))
+ break;
+ else
+ return -1;
+ }
+
+ // No further substititions to be had update the dictionary
+ for (i += entry; --i >= entry; ) {
+ if (!newSub(c, i, lastEntry - i))
+ return -1;
+ }
+
+ return type;
+}
+
+static Boolean appendArgumentList(ParseContext *c)
+{
+ int i, num;
+
+ c->fRetCode = kR3InternalNotRemangled;
+ // Setup the output entry array
+ num = c->fP.fNumT;
+ for (i = 0; i < num; ) {
+ i = appendType(c, i);
+ if (i < 0)
+ return false;
+ }
+
+ // First pass output uncompressed types
+ for (i = 0, num = c->fP.fNumO; i < num; i++) {
+ BaseTypeData *bP;
+
+ bP = &c->fOutEntries[i];
+
+ if (bP->fPseudo)
+ continue; // Pseudo entry do not output;
+
+ switch (bP->fType) {
+
+ case kNTSubstitute: appendSub(c, bP->fLen); break;
+
+ case kNTSubQualClass:
+ appendChar(c, 'N');
+ appendSub(c, bP->fLen);
+ i++; bP = &c->fOutEntries[i];
+ appendNStr(c, bP->fFundTypeID, bP->fLen);
+ appendChar(c, 'E');
+ break;
+
+ case kNTClass:
+ if (bP->fQualified) {
+ appendChar(c, 'N');
+ appendNStr(c, bP->fFundTypeID, bP->fLen);
+ appendChar(c, 'E');
+ }
+ else
+ appendNStr(c, bP->fFundTypeID, bP->fLen);
+ break;
+
+ case kNTArray: {
+ char numbuf[16]; // Bigger than MAX_LONG + 3
+ int len;
+ len = snprintf(numbuf, sizeof(numbuf),
+ "A%lu_", (unsigned long) bP->fFundTypeID);
+ appendNStr(c, numbuf, len);
+ break;
+ }
+
+ case kNTBuiltIn:
+ case kNTDeclarator: appendChar(c, (int) bP->fFundTypeID); break;
+ case kNTMethod: appendChar(c, 'M'); break;
+ case kNTFunction: appendChar(c, 'F'); break;
+ case kNTFuncEnd: appendChar(c, 'E'); break;
+
+ case kNTUndefined:
+ case kNTKName:
+ default:
+ return false; // Fatal errors
+ }
+ }
+
+ // Successful remangle
+ c->fRetCode = kR3Remangled;
+ return true;
+}
+
+//
+// Parse routines
+//
+
+// <count> ::= <digit> <digit>*
+static Boolean parse_count(ParseContext *c, int *countP)
+{
+ int count = 0;
+ char ch;
+
+ ch = peekNext(c);
+ if (ch < '1' || ch > '9')
+ return false;
+
+ count = strtol(c->fP.fInChar, (char **) &c->fP.fInChar, 10);
+ if (countP)
+ *countP = count;
+
+ return true;
+}
+
+
+// "n" <index> can cause the following type to be ambiguous as
+// n23_Pc... can be
+// "n" <digit> <counted_class_name> ...
+// | "n" <digit> <digit> '_' <declarator> <fund_type_id> ...
+// However as the class '_Pc' is probably going to be unlikely a quick
+// check to see if the next field is a valid type would probably clear
+// up the abiguity for the majority of cases.
+//
+// <index> ::= <digit> | <digit> <digit> <digit>* "_"
+static Boolean parse_index(ParseContext *c, int *indexP)
+{
+ CheckPoint chk = *checkPoint(c);
+ char ch0, ch1;
+ int index;
+
+ ch0 = peekAt(c, 0);
+ ch1 = peekAt(c, 1);
+
+ if ( !('0' <= ch0 && ch0 <= '9') )
+ goto abandonParse;
+ if ('0' <= ch1 && ch1 <= '9') {
+ if (!parse_count(c, &index))
+ goto abandonParse;
+ if (isNext(c, '_')) {
+ // @@@ gvdl: Ambiguity check one day
+ if (indexP)
+ *indexP = index;
+ return true;
+ }
+ else
+ resetTo(c, &chk); // Must be the one digit case
+ }
+
+ // One digit case
+ advance(c, 1);
+ index = ch0 - '0';
+
+ if (indexP)
+ *indexP = index;
+ return true;
+
+abandonParse:
+ return false;
+}
+
+
+// <qualifier> ::= "C" ; const
+// | "V" ; volatile
+// | "u" ; restrict (C99) unsupported
+// | "G" ; struct/union/enum ; unused in gcc3
+static Boolean parse_qualifiers(ParseContext *c)
+{
+ BaseTypeData *bP = c->fCurBaseP;
+
+ for (;;) {
+ if (isNext(c, 'C'))
+ bP->fConst = true; // "C" ; const
+ else if (isNext(c, 'V'))
+ bP->fVolatile = true; // "V" ; volatile
+ else if (isNext(c, 'u'))
+ return false; // "u" ; restrict (C99)
+ else if (isNext(c, 'G'))
+ continue; // "G" ; struct/union/enum ; unused
+ else
+ break;
+ }
+
+ return true;
+}
+
+// Assumes we have an open fInEntry in fCurBaseP
+static Boolean duplicateEntries(ParseContext *c, int start, int numE)
+{
+ BaseTypeData *bIP = &c->fInEntries[start]; // First duplicate entry
+ BaseTypeData *bP = c->fCurBaseP;
+ int i;
+
+ // Duplicating a method
+ if (kNTMethod == bIP->fType) {
+ bP--; // Strip leading 'P' declarator
+ c->fP.fNumI--;
+ }
+
+ numE--;
+
+ // do we have room available for duplication
+ if (c->fP.fNumI + numE >= MAX_ENTRIES)
+ return false;
+
+ // Copy the parse entries over
+ bcopy(bIP, bP, (numE + 1) * sizeof(*bP));
+
+ // Now we have to duplicate the types for the new entry
+ for (i = 0; i < c->fP.fNumT; i++) {
+ TypeData *tP = &c->fTypeList[i];
+ if (tP->fStartEntry < start)
+ continue;
+ else if (tP->fStartEntry <= start + numE)
+ dupType(c, tP, bP - bIP);
+ else
+ break;
+ }
+
+ c->fP.fNumI += numE;
+ bP += numE;
+ c->fCurBaseP = bP;
+
+ return true;
+}
+
+// Must have a valid c->fCurBaseP pointer on entry
+// <class_name> ::= <counted_class_name> ; plain class name
+// | "Q" <qualified_name> ; qualified name
+// | "B" <index> ; compressed name
+// | "K" <qualified_name> ; ignored and illegal
+// <qualified_name> ::= <q_count> <counted_class_name>+
+// <q_count> ::= <digit> | "_" <digit> <digit>* "_"
+// <counted_class_name> ::= <count> <name>
+// <name> ::= <char> <char>*
+static Boolean
+parse_class_name(ParseContext *c)
+{
+ BaseTypeData *bP = c->fCurBaseP;
+ const char *typeId = c->fP.fInChar;
+ char ch;
+ int count;
+
+ if (parse_count(c, &count)) {
+
+ // <counted_class_name> ::= <count> <name>
+ if (!hasRemain(c, count))
+ goto abandonParse;
+
+ bP->fType = kNTClass;
+ advance(c, count);
+
+ bP->fFundTypeID = typeId;
+ bP->fLen = c->fP.fInChar - typeId;
+ }
+ else {
+ switch (peekNext(c)) {
+
+ case 'Q': {
+ int i, q_count;
+
+ advance(c, 1);
+
+ // | "Q" <qualified_name> ; qualified name
+ // <qualified_name> ::= <q_count> <counted_class_name>+
+ // <q_count> ::= <digit> | "_" <digit> <digit>* "_"
+ if ('_' == (ch = getNext(c))) {
+ advance(c, 1);
+ if (!parse_count(c, &q_count) || !isNext(c, '_'))
+ goto abandonParse;
+ }
+ else if ('1' <= ch && ch <= '9')
+ q_count = ch - '0';
+
+ if (!q_count)
+ goto abandonParse;
+
+ typeId = c->fP.fInChar;
+ bP->fType = kNTClass;
+ bP->fQualified = true;
+ i = 0;
+ for (i = 0; i < q_count; i++) {
+ if (parse_count(c, &count))
+ advance(c, count);
+ else
+ goto abandonParse;
+ }
+ bP->fLen = c->fP.fInChar - typeId;
+ bP->fFundTypeID = typeId;
+ break;
+ }
+
+ case 'B':
+ // | "B" <index>
+ advance(c, 1);
+
+ if (!parse_index(c, &count) || count >= c->fP.fNumB)
+ goto abandonParse;
+
+ if (!duplicateEntries(c, c->fBDict[count].fStartEntry,
+ c->fBDict[count].fNumEntries))
+ goto abandonParse;
+ return true;
+
+ case 'K': default:
+ goto abandonParse;
+ }
+ }
+
+ if (newBDict(c, bP - c->fInEntries, 1))
+ return true;
+
+abandonParse:
+ return false;
+}
+
+// <fund_type_id> ::= <class_name>
+// | "b" ; bool
+// | "c" ; char
+// | "d" ; double
+// | "e" ; ellipsis
+// | "f" ; float
+// | "i" ; int
+// | "l" ; long
+// | "r" ; long double
+// | "s" ; short
+// | "v" ; void
+// | "w" ; wchar_t
+// | "x" ; long long
+// | "G" <count> ; ???
+static Boolean parse_fund_type_id(ParseContext *c)
+{
+ BaseTypeData *bP = c->fCurBaseP;
+
+ if (!parse_class_name(c)) {
+ // Use the TypeID pointer as a 4 character buffer
+ char ch = peekNext(c);
+
+ if (bP->fSigned && 'c' != ch)
+ goto abandonParse; // illegal only chars can be signed
+
+ switch (ch) {
+
+ case 'b': case 'd': case 'f': case 'v': case 'w': // No map types
+ break;
+
+ case 'c': // character
+ if (bP->fSigned) ch = 'a';
+ else if (bP->fUnsigned) ch = 'h';
+ break;
+ case 'e': // ellipsis
+ ch = 'z';
+ break;
+ case 'i': // int
+ if (bP->fUnsigned) ch = 'j';
+ break;
+ case 'l': // long
+ if (bP->fUnsigned) ch = 'm';
+ break;
+ case 'r': // long double
+ ch = 'e';
+ break;
+ case 's': // short
+ if (bP->fUnsigned) ch = 't';
+ break;
+ case 'x': // long long
+ if (bP->fUnsigned) ch = 'y';
+ break;
+
+ case 'G': // Don't understand "G"
+ default:
+ goto abandonParse;
+ }
+
+ advance(c, 1); // Consume the input character
+ bP->fFundTypeID = (void *) (int) ch;
+ bP->fLen = 0;
+ bP->fType = kNTBuiltIn;
+ }
+
+ return true;
+
+abandonParse:
+ return false;
+}
+
+// <arg_type> ::= <type> [ "n" <index> ]
+// | "N" <count> <pos> ; Not implemented
+// | "T" <index> ; Not implemented
+static Boolean parse_arg_type(ParseContext *c)
+{
+ // Don't bother to check point as parse_argument_types does it for us
+
+ TypeData *typeP;
+ int repeat = 0;
+
+ typeP = &c->fTypeList[c->fP.fNumT]; // Cache type for later repeat
+ if (!parse_type(c))
+ return false;
+
+ // Now check for a repeat count on this type
+ if (isNext(c, 'n')) {
+ if (!parse_index(c, &repeat))
+ return false;
+
+ do {
+ c->fCurBaseP = newIn(c); // Duplicate requires a fresh type
+ if (!c->fCurBaseP)
+ return false;
+ if (!duplicateEntries(c, typeP->fStartEntry, typeP->fNumEntries))
+ return false;
+ } while (--repeat);
+ }
+
+ return true;
+}
+
+// <argument_types> ::= # Empty
+// | <arg_type>+
+static Boolean parse_argument_types(ParseContext *c)
+{
+ if (atEnd(c))
+ return true;
+
+ if (!parse_arg_type(c))
+ goto abandonParse;
+
+ while (!atEnd(c) && parse_arg_type(c))
+ ;
+
+ return true;
+
+ // Not a counted class name so reset to checkPoint
+abandonParse:
+ return false;
+}
+
+// leaf function so the copy aside buffer isn't on the primary
+// recursion stack.
+static Boolean
+rotateFunction(ParseContext *c, int argStart, int retStart)
+{
+ char returnTypeBuffer[MAX_RETURN_BUFFER];
+ int numArg, numRet;
+ int lenArg, lenRet;
+ char *sArgP, *sRetP;
+ int i;
+
+ TypeData *argTP = &c->fTypeList[argStart];
+ TypeData *retTP = &c->fTypeList[retStart];
+
+ // Rotate around the entries first
+ numArg = retTP->fStartEntry - argTP->fStartEntry;
+ numRet = retTP->fNumEntries;
+ lenArg = numArg * sizeof(BaseTypeData);
+ lenRet = numRet * sizeof(BaseTypeData);
+
+ // Copy the return type into a buffer
+ if (lenRet > sizeof(returnTypeBuffer))
+ return false;
+
+ sArgP = (char *) (&c->fInEntries[argTP->fStartEntry]);
+ sRetP = (char *) (&c->fInEntries[retTP->fStartEntry]);
+
+ bcopy(sRetP, returnTypeBuffer, lenRet);
+ bcopy(sArgP, sArgP + lenRet, lenArg);
+ bcopy(returnTypeBuffer, sArgP, lenRet);
+
+ // Retarget the argument and return types for the new entry positions
+ lenArg = numArg;
+ lenRet = numRet;
+ numArg = retStart - argStart;
+ numRet = c->fP.fNumT - retStart;
+ for (i = 0; i < numArg; i++)
+ c->fTypeList[argStart+i].fStartEntry += lenRet;
+ for (i = 0; i < numRet; i++)
+ c->fTypeList[retStart+i].fStartEntry -= lenArg;
+
+ // Rotate the BDictionary
+ for (i = 0; i < c->fP.fNumB; i++) {
+ TypeData *bDP = &c->fBDict[i];
+ int start = bDP->fStartEntry;
+
+ if (start >= argTP->fStartEntry)
+ bDP->fStartEntry = start + lenRet;
+ else if (start >= retTP->fStartEntry)
+ bDP->fStartEntry = start - lenArg;
+ }
+
+ // Finally rotate the retargeted type structures.
+ lenArg = numArg * sizeof(TypeData);
+ lenRet = numRet * sizeof(TypeData);
+
+ sArgP = (char *) (&c->fTypeList[argStart]);
+ sRetP = (char *) (&c->fTypeList[retStart]);
+
+ bcopy(sRetP, returnTypeBuffer, lenRet);
+ bcopy(sArgP, sArgP + lenRet, lenArg);
+ bcopy(returnTypeBuffer, sArgP, lenRet);
+
+ return true;
+}
+
+// <function_type> ::= "F" <argument_types> "_" <type>
+static Boolean parse_function_type(ParseContext *c, Boolean forMethod)
+{
+ TypeData *bDictP = 0;
+ BaseTypeData *bP = c->fCurBaseP;
+
+ int argTypeStart, retTypeStart;
+
+ if (!forMethod) {
+ bDictP = newBDict(c, c->fP.fNumI-1, 0);
+ if (!bDictP)
+ goto abandonParse;
+ }
+
+ if (!isNext(c, 'F'))
+ goto abandonParse;
+
+ bP->fType = kNTFunction;
+
+ // Note that the argument types will advance the Entry list
+ argTypeStart = c->fP.fNumT;
+ if (!parse_argument_types(c))
+ goto abandonParse;
+
+ if (!isNext(c, '_'))
+ goto abandonParse;
+
+ // Parse the return type
+ retTypeStart = c->fP.fNumT;
+ if (!parse_type(c))
+ goto abandonParse;
+
+ // gcc3 puts the return code just after the 'F' declaration
+ // as this impacts the order of the compression I need to rotate
+ // the return type and the argument types.
+ if (!rotateFunction(c, argTypeStart, retTypeStart))
+ goto abandonParse;
+
+ if (!forMethod)
+ bDictP->fNumEntries = c->fP.fNumI - bDictP->fStartEntry;
+
+ return true;
+
+abandonParse:
+ return false;
+}
+
+// To convert 2.95 method to a 3.0 method I need to prune the
+// first argument of the function type out of the parse tree.
+static Boolean cleanMethodFunction(ParseContext *c, int type)
+{
+ TypeData *typeP, *startTP, *endTP;
+ BaseTypeData *bP;
+ int i, thisStart, thisEnd, thisLen, funcRemain;
+
+ // Get pointer for the return value's type.
+ startTP = &c->fTypeList[type+1];
+ endTP = &c->fTypeList[c->fP.fNumT];
+
+ // Now look for the first type that starts after the return type
+ thisEnd = startTP->fStartEntry + startTP->fNumEntries;
+ for (startTP++; startTP < endTP; startTP++)
+ if (startTP->fStartEntry >= thisEnd)
+ break;
+
+ if (startTP >= endTP) {
+ c->fRetCode = kR3InternalNotRemangled;
+ return false; // Internal error: should never happen
+ }
+
+ // We now have a pointer to the 1st argument in the input list
+ // we will need to excise the entries from the input list and don't forget
+ // to remove the associated types from the type list.
+
+ thisLen = startTP->fNumEntries;
+ thisStart = startTP->fStartEntry;
+ thisEnd = thisStart + thisLen;
+ funcRemain = c->fP.fNumI - thisEnd;
+ bP = &c->fInEntries[thisStart];
+
+ // If we have no arguments then replace the pointer with a void
+ if (!funcRemain) {
+ c->fP.fNumI -= (thisLen - 1);
+
+ bP->fFundTypeID = (void *) (int) 'v'; // Void arg list
+ bP->fLen = 0;
+ bP->fType = kNTBuiltIn;
+
+ // Update the type entry for the void argument list
+ startTP->fNumEntries = 1;
+ return true;
+ }
+
+ // Move the argument list down to replace the 'this' pointer
+ bcopy(bP + thisLen, bP, funcRemain * sizeof(*bP));
+ c->fP.fNumI -= thisLen;
+
+ // And remove the 'this' pointers type
+
+ // First walk over all of the types that have to be removed
+ for (typeP = startTP + 1; typeP < endTP; typeP++)
+ if (typeP->fStartEntry >= thisEnd)
+ break;
+
+ if (typeP >= endTP) {
+ c->fRetCode = kR3InternalNotRemangled;
+ return false; // Internal error Can't be a void argument list.
+ }
+
+ bcopy(typeP, startTP, (char *) endTP - (char *) typeP);
+
+ c->fP.fNumT -= typeP - startTP;
+ endTP = &c->fTypeList[c->fP.fNumT];
+ for (typeP = startTP ; typeP < endTP; typeP++)
+ typeP->fStartEntry -= thisLen;
+
+ // Finally we can retarget the BDictionary lists
+ for (i = 0; i < c->fP.fNumB; i++) {
+ TypeData *bDP = &c->fBDict[i];
+ int start = bDP->fStartEntry;
+
+ if (start < thisStart)
+ continue;
+ if (start >= thisEnd)
+ break;
+
+ bDP->fStartEntry = start - thisLen;
+ }
+
+ return true;
+}
+
+// <method_type> ::= "M" <class_name> <function_type>
+//
+// Note this is a very bad function. Gcc3 doesn't doesn't use pointer that
+// is immediately before this entry. We will have to delete the 'P' declarator
+// that is before the method declaration.
+// We will also have to prune the first type in the argument list as Gcc3
+// doesn't register the 'this' pointer within the function list.
+static Boolean parse_method_type(ParseContext *c)
+{
+ TypeData *bDictP;
+ TypeData *typeP;
+ BaseTypeData *bP;
+
+ bDictP = newBDict(c, c->fP.fNumI-2, 0);
+ if (!bDictP)
+ goto abandonParse;
+
+ // Replace 'P' declarator
+ c->fP.fNumI--;
+ bP = c->fCurBaseP - 1;
+
+ if (!isNext(c, 'M'))
+ goto abandonParse;
+
+ if (bP->fFundTypeID != (void *) (int) 'P')
+ goto abandonParse;
+
+ // Replace the previous 'Pointer' declarator
+ bP->fType = kNTMethod;
+ bP->fFundTypeID = NULL;
+ bP->fLen = 0;
+
+ // Grab the method's 'this' type specification
+ typeP = newType(c, c->fP.fNumI);
+ if (!newIn(c) || !typeP)
+ goto abandonParse;
+
+ if (!parse_class_name(c))
+ goto abandonParse;
+ typeP->fNumEntries = c->fP.fNumI - typeP->fStartEntry;
+
+ // Grab the <function_type> specifier
+ typeP = newType(c, c->fP.fNumI);
+ if (!newIn(c) || !typeP)
+ goto abandonParse;
+
+ if (!parse_function_type(c, /* forMethod */ true))
+ goto abandonParse;
+
+ if (!cleanMethodFunction(c, typeP - c->fTypeList))
+ goto abandonParse;
+ typeP->fNumEntries = c->fP.fNumI - typeP->fStartEntry;
+
+ // Finally update the dictionary with the M & 'this'
+ bDictP->fNumEntries = c->fP.fNumI - bDictP->fStartEntry;
+
+ return true;
+
+abandonParse:
+ return false;
+}
+
+static Boolean emitQualifiers(ParseContext *c)
+{
+ BaseTypeData *bP = c->fCurBaseP;
+
+ if (bP->fVolatile || bP->fConst) {
+ Boolean isConst, isVolatile, isSigned, isUnsigned;
+
+ isVolatile = bP->fVolatile;
+ isConst = bP->fConst;
+ isSigned = bP->fSigned;
+ isUnsigned = bP->fUnsigned;
+ bP->fConst = bP->fVolatile = bP->fSigned = bP->fUnsigned = 0;
+
+ if (isVolatile) {
+ bP->fType = kNTDeclarator;
+ bP->fFundTypeID = (void *) (int) 'V';
+ bP->fLen = 0;
+ bP = newIn(c);
+ if (!bP)
+ return false;
+ }
+ if (isConst) {
+ bP->fType = kNTDeclarator;
+ bP->fFundTypeID = (void *) (int) 'K';
+ bP->fLen = 0;
+ bP = newIn(c);
+ if (!bP)
+ return false;
+ }
+ bP->fSigned = isSigned;
+ bP->fUnsigned = isUnsigned;
+ }
+
+ return true;
+}
+
+
+// <base_type> ::= <function_type> ; function
+// | <method_type> ; method
+// | <type_qualifier>* <fund_type_id>
+// <type_qualifier> ::= "S" ; signed (chars only)
+// | "U" ; unsigned (any integral type)
+// | "J" ; __complex
+// | <qualifier>
+static Boolean parse_base_type(ParseContext *c)
+{
+ if ('F' == peekNext(c)) {
+ if (!parse_function_type(c, /* forMethod */ false))
+ goto abandonParse;
+ }
+ else if ('M' == peekNext(c)) {
+ if (!parse_method_type(c))
+ goto abandonParse;
+ }
+ else {
+ // | <type_qualifier>* <fund_type_id>
+ BaseTypeData *bP = c->fCurBaseP;
+ for (;;) {
+ if (isNext(c, 'S'))
+ // <type_qualifier> ::= "S" ; signed (chars only)
+ { bP->fSigned = true; continue; }
+ else if (isNext(c, 'U'))
+ // | "U" ; unsigned (any integral type)
+ { bP->fUnsigned = true; continue; }
+ else if (isNext(c, 'C'))
+ // | <qualifier>
+ // <qualifier> ::= "C" ; const
+ { bP->fConst = true; continue; }
+ else if (isNext(c, 'V'))
+ // | "V" ; volatile
+ { bP->fVolatile = true; continue; }
+ else if (charNext(c, "Ju"))
+ goto abandonParse; // Don't support these qualifiers
+ // | "J" ; __complex
+ // | "u" ; restrict (C99)
+ else
+ break;
+ }
+
+ if (!emitQualifiers(c))
+ goto abandonParse;
+
+ if (!parse_fund_type_id(c))
+ goto abandonParse;
+ }
+ return true;
+
+abandonParse:
+ return false;
+}
+
+// Use the top SDict as a stack of declarators.
+// parses <declarator>*
+// <declarator> ::= "P" ; pointer
+// | "p" ; pointer (but never occurs?)
+// | "R" ; reference (&)
+// | "A" <count> ; array
+// | "T" <index>
+// | "O" <count>
+// | <qualifier>
+//
+// As a side-effect the fCurBaseP is setup with any qualifiers on exit
+static Boolean parse_declarators(ParseContext *c)
+{
+ int count;
+ BaseTypeData *dP;
+
+ // Note we MUST go through the for loop at least once
+ for (count = 0; ; count++) {
+ const char *curDecl;
+ char ch;
+
+ if (!newIn(c))
+ goto abandonParse;
+
+ // <declarator> ::= <qualifier> production
+ if (!parse_qualifiers(c) || !emitQualifiers(c))
+ goto abandonParse;
+
+ dP = c->fCurBaseP; // Find the current base type pointer
+
+ curDecl = c->fP.fInChar;
+
+ switch (peekNext(c)) {
+
+ case 'P': case 'p': case 'R':
+ // <declarator> ::= "P" ; pointer
+ // | "p" ; pointer (but never occurs?)
+ // | "R" ; reference (&)
+
+ dP->fType = kNTDeclarator;
+ advance(c, 1);
+
+ ch = *curDecl;
+ if ('p' == ch) ch = 'P';
+ dP->fFundTypeID = (void *) (int) ch;
+ dP->fLen = 0;
+ continue; // Go around again
+
+ case 'A':
+ // | "A" <count> ; array
+ dP->fType = kNTArray;
+
+ advance(c, 1); curDecl++;
+ curDecl = (void *)
+ strtoul(curDecl, (char **) &c->fP.fInChar, 10);
+ if (!curDecl)
+ goto abandonParse;
+ dP->fFundTypeID = curDecl;
+ dP->fLen = 0;
+ continue; // Go around again
+
+ case 'T': case 'O':
+ // | "T" <index> Unsupported
+ // | "O" <count> Unsupported
+ goto abandonParse;
+
+ default:
+ break;
+ }
+
+ break;
+ }
+
+ dP->fLen = 0;
+ return true;
+
+abandonParse:
+ return false;
+}
+
+// <type> ::= <declarator>* <base_type>
+static Boolean parse_type(ParseContext *c)
+{
+ CheckPoint chk = *checkPoint(c);
+ TypeData *typeP = newType(c, c->fP.fNumI);
+ if (!typeP)
+ goto abandonParse;
+
+ // As a side-effect the fCurBaseP is setup with any qualifiers on exit
+ if (!parse_declarators(c))
+ goto abandonParse;
+
+ // Merge the last qualifiers into the base type
+ if (!parse_base_type(c) || kNTUndefined == c->fCurBaseP->fType)
+ goto abandonParse;
+
+ typeP->fNumEntries = c->fP.fNumI - typeP->fStartEntry;
+ return true;
+
+abandonParse:
+ resetTo(c, &chk);
+ return false;
+}
+
+// <function_name> ::= <char> <char>*
+// No need to check point as an invalid function name is fatal
+// Consumes trailing "__".
+static Boolean
+parse_function_name(ParseContext *c)
+{
+ char ch;
+
+ while ( (ch = peekNext(c)) )
+ {
+ advance(c, 1);
+ if ('_' == ch && '_' == peekNext(c)) {
+ do {
+ advance(c, 1);
+ } while ('_' == peekNext(c));
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// <opinfo> ::= "type" <type>
+// | "__op" <type>
+// | <opname> "__" ; Implies null function name
+// | "a"
+// <opname> ::= "aa" # && ==> "aa"
+// | "aad" # &= ==> "aN"
+// | "ad" # & ==> "ad"
+// | "adv" # /= ==> "dV"
+// | "aer" # ^= ==> "eO"
+// | "als" # <<= ==> "lS"
+// | "amd" # %= ==> "rM"
+// | "ami" # -= ==> "mI"
+// | "aml" # *= ==> "mL
+// | "aor" # |= ==> "oR
+// | "apl" # += ==> "pL
+// | "ars" # >>= ==> "rS
+// | "as" # = ==> "aS
+// | "cl" # () ==> "cl
+// | "cm" # , ==> "cm
+// | "cn" # ?: ==> "qu
+// | "co" # ~ ==> "co
+// | "dl" # delete ==> "dl
+// | "dv" # / ==> "dv
+// | "eq" # == ==> "eq
+// | "er" # ^ ==> "eo
+// | "ge" # >= ==> "ge
+// | "gt" # > ==> "gt
+// | "le" # <= ==> "le
+// | "ls" # << ==> "ls
+// | "lt" # < ==> "lt
+// | "md" # % ==> "rm
+// | "mi" # - ==> "mi
+// | "ml" # * ==> "ml
+// | "mm" # -- ==> "mm
+// | "mn" # <? ==> "????????????????
+// | "mx" # >? ==> "????????????????
+// | "ne" # != ==> "ne
+// | "nt" # ! ==> "nt
+// | "nw" # new ==> "nw
+// | "oo" # || ==> "oo"
+// | "or" # | ==> "or
+// | "pl" # + ==> "pl
+// | "pp" # ++ ==> "pp
+// | "rf" # -> ==> "pt
+// | "rm" # ->* ==> "pm
+// | "rs" # >> ==> "rs
+// | "sz" # sizeof ==> "sz
+// | "vc" # [] ==> "ix
+// | "vd" # delete[] ==> "da
+// | "vn" # new[] ==> "na
+static struct opMap {
+ const char *op295, *op3;
+} opMapTable[] = {
+ {"aad", "aN" }, {"adv", "dV" }, {"aer", "eO" }, {"als", "lS" },
+ {"amd", "rM" }, {"ami", "mI" }, {"aml", "mL" }, {"aor", "oR" },
+ {"apl", "pL" }, {"ars", "rS" }, {"aa", "aa" }, {"ad", "ad" },
+ {"as", "aS" }, {"cl", "cl" }, {"cm", "cm" }, {"cn", "qu" },
+ {"co", "co" }, {"dl", "dl" }, {"dv", "dv" }, {"eq", "eq" },
+ {"er", "eo" }, {"ge", "ge" }, {"gt", "gt" }, {"le", "le" },
+ {"ls", "ls" }, {"lt", "lt" }, {"md", "rm" }, {"mi", "mi" },
+ {"ml", "ml" }, {"mm", "mm" }, {"mn", NULL }, {"mx", NULL },
+ {"ne", "ne" }, {"nt", "nt" }, {"nw", "nw" }, {"oo", "oo" },
+ {"or", "or" }, {"pl", "pl" }, {"pp", "pp" }, {"rf", "pt" },
+ {"rm", "pm" }, {"rs", "rs" }, {"sz", "sz" }, {"vc", "ix" },
+ {"vd", "da" }, {"vn", "na" },
+};
+
+static Boolean parse_opinfo(ParseContext *c, const char **opInfoP)
+{
+ CheckPoint chk = *checkPoint(c);
+ const char *op;
+ char ch;
+ int i;
+
+ if ('a' == (ch = peekNext(c))) {
+ goto abandonParse;
+ }
+ else if (strNext(c, "type")) {
+ goto abandonParse;
+ }
+ else if (retard(c, 4) && strNext(c, "____op")) {
+ // @@@ gvdl: check this out it may change
+ // <opinfo> ::= "__op" <type>
+ goto abandonParse;
+ }
+
+ // Failed till now so reset and see if we have an operator
+ resetTo(c, &chk);
+
+ // quick check to see if we may have an operator
+ if (!strrchr("acdeglmnoprsv", peekNext(c)))
+ goto abandonParse;
+
+ op = NULL;
+ for (i = 0; i < sizeof(opMapTable)/sizeof(opMapTable[0]); i++) {
+ if (strNext(c, opMapTable[i].op295)) {
+ op = opMapTable[i].op3;
+ break;
+ }
+ }
+ if (!op)
+ goto abandonParse;
+
+ if (!strNext(c, "__")) // Trailing underbars
+ goto abandonParse;
+
+ if (opInfoP)
+ *opInfoP = op;
+ return true;
+
+abandonParse:
+ return false;
+}
+
+// <signature> ::= <qualifier>* <s_element> <argument_types>
+// <s_element> ::= <class_name>
+// | "K" <qualified_name>
+// | "S"
+// | "F" <argument_types> [ "_" <return_type> ]
+// <return_type> ::= <type>
+// Treat the prefix's s_element as a full type
+static Boolean
+parse_signature(ParseContext *c,
+ const char *func, int funcLen, const char *op)
+{
+ BaseTypeData *bP;
+ TypeData *tP;
+
+ Boolean isFunction = false;
+
+ if (isNext(c, 'F')) {
+ // | "F" <argument_types> [ "_" <return_type> ]
+
+ char numbuf[16]; // Bigger than MAX_INT + 4
+ int len;
+ isFunction = true;
+ if (!funcLen)
+ goto abandonParse;
+
+ len = snprintf(numbuf, sizeof(numbuf), "__Z%d", funcLen);
+
+ appendNStr(c, numbuf, len);
+ appendNStr(c, func, funcLen);
+ }
+ else if (isNext(c, 'S')) {
+ // | "S" ; Ignored
+ goto abandonParse;
+ }
+ else {
+ const char *qual;
+ int qualLen;
+
+ // See if we can find a qualified class reference
+ tP = newType(c, c->fP.fNumI);
+ if (!tP)
+ goto abandonParse;
+
+ bP = newIn(c);
+ if (!bP)
+ goto abandonParse;
+
+ // Parse any qualifiers, store results in *fCurBaseP
+ bP->fPseudo = true;
+ if (!parse_qualifiers(c))
+ goto abandonParse;
+
+ if (!parse_class_name(c))
+ goto abandonParse;
+
+ bP = c->fCurBaseP; // class name may have redifined current
+ tP->fNumEntries = c->fP.fNumI - tP->fStartEntry;
+
+ APPENDSTR(c, "__ZN");
+ decodeQual(bP, &qualLen, &qual);
+ if (qualLen)
+ appendNStr(c, qual, qualLen);
+ appendNStr(c, bP->fFundTypeID, bP->fLen);
+
+ if (funcLen) {
+ char numbuf[16]; // Bigger than MAX_INT + 1
+ int len;
+
+ len = snprintf(numbuf, sizeof(numbuf), "%d", funcLen);
+ appendNStr(c, numbuf, len);
+ appendNStr(c, func, funcLen);
+ }
+ else if (op)
+ appendStr(c, op);
+ else {
+ // No function & no op means constructor choose one of C1 & C2
+ APPENDSTR(c, "C2");
+ }
+ appendChar(c, 'E');
+ }
+
+ if (atEnd(c)) {
+ appendChar(c, 'v'); // void argument list
+ c->fRetCode = kR3Remangled;
+ return true;
+ }
+
+ c->fCurBaseP = NULL;
+ if (!parse_argument_types(c))
+ goto abandonParse;
+
+ if (isFunction) {
+ if (isNext(c, '_')) {
+ // && !parse_type(c) @@@ gvdl: Unsupported return
+ c->fRetCode = kR3InternalNotRemangled;
+ goto abandonParse;
+ }
+ }
+
+ if (!atEnd(c))
+ goto abandonParse;
+
+ // OK we have a complete and successful parse now output the
+ // argument list
+ return appendArgumentList(c);
+
+abandonParse:
+ return false;
+}
+
+// <mangled_name> ::= <prefix> [ <signature> ]
+// <prefix> ::= [ "_GLOBAL_" [ID] "__" ] <function_name> "__" [ <opinfo> ]
+static Boolean parse_mangled_name(ParseContext *c)
+{
+ CheckPoint chk;
+ CheckPoint dubBarChk;
+ const char *func;
+
+ // <prefix> parse
+ if (strNext(c, "_GLOBAL_")) { // Is this GLOBAL static constructor?
+ // gvdl: can't deal with _GLOBAL_
+ c->fRetCode = kR3InternalNotRemangled;
+ return false; // Can't deal with these
+ }
+
+ func = c->fP.fInChar;
+ for (chk = *checkPoint(c); ; resetTo(c, &dubBarChk)) {
+ int funcLen;
+ const char *op = NULL;
+
+ if (!parse_function_name(c))
+ goto abandonParse;
+ dubBarChk = *checkPoint(c);
+
+ // Note that the opInfo may be earlier than the curDoubleBar
+ // in which case the function name may need to be shrunk later on.
+ (void) parse_opinfo(c, &op);
+
+ if (atEnd(c))
+ goto abandonParse; // No Signature?
+
+ funcLen = inCharFromCheck(c, &dubBarChk) - func - 2;
+ if (parse_signature(c, func, funcLen, op))
+ return true;
+
+ if (kR3NotRemangled != c->fRetCode)
+ goto abandonParse;
+
+ // If no error then try again maybe another '__' exists
+ }
+
+abandonParse:
+ resetTo(c, &chk);
+ return false;
+}
+
+// <gnu_special> ::= ("_._" | "_$_" ) <class_name> ; destructor
+// | "__vt_" <class_name> ; virtual table
+// | "_" <class_name> ("."|"$") <varname>
+static Boolean parse_gnu_special(ParseContext *c)
+{
+ CheckPoint chk = *checkPoint(c);
+ BaseTypeData *bP = newIn(c);
+
+ if (!bP)
+ return false;
+
+ // What do the intel desctructors look like
+ if (strNext(c, "_._") || strNext(c, "_$_") ) // Is this a destructor
+ {
+ if (!parse_class_name(c) || !atEnd(c))
+ goto abandonParse;
+ APPENDSTR(c, "__ZN");
+ appendNStr(c, bP->fFundTypeID, bP->fLen);
+ APPENDSTR(c, "D2Ev");
+ c->fRetCode = kR3Remangled;
+ return true;
+ }
+ else if (strNext(c, "__vt_")) // Is it's a vtable?
+ {
+ if (!parse_class_name(c) || !atEnd(c))
+ goto abandonParse;
+
+ APPENDSTR(c, "__ZTV");
+ if (kNTClass != bP->fType)
+ goto abandonParse;
+ else if (bP->fQualified) {
+ appendChar(c, 'N');
+ appendNStr(c, bP->fFundTypeID, bP->fLen);
+ appendChar(c, 'E');
+ }
+ else
+ appendNStr(c, bP->fFundTypeID, bP->fLen);
+
+ c->fRetCode = kR3Remangled;
+ return true;
+ }
+ else if (isNext(c, '_')) // Maybe it's a variable
+ {
+ const char *varname;
+ int varlen, len;
+ char numbuf[16]; // Bigger than MAX_INT + 1
+
+ if (!parse_class_name(c)) // Loads up the bP structure
+ goto abandonParse;
+
+ if (!isNext(c, '.') && !isNext(c, '$'))
+ goto abandonParse;
+
+ // Parse the variable name now.
+ varname = c->fP.fInChar;
+ if (atEnd(c) || !isValidFirstChar(getNext(c)))
+ goto abandonParse;
+
+ while ( !atEnd(c) )
+ if (!isValidChar(getNext(c)))
+ goto abandonParse;
+
+ varlen = c->fP.fInChar - varname;
+ len = snprintf(numbuf, sizeof(numbuf), "%d", varlen);
+
+ APPENDSTR(c, "__ZN");
+ appendNStr(c, bP->fFundTypeID, bP->fLen);
+
+ appendNStr(c, numbuf, len);
+ appendNStr(c, varname, varlen);
+ appendChar(c, 'E');
+
+ c->fRetCode = kR3Remangled;
+ return true;
+ }
+
+ // Oh well it is none of those so give up but reset scan
+abandonParse:
+ resetTo(c, &chk);
+ return false;
+}
+
+// <special_or_name> ::= <gnu_special>
+// | <mangled_name>
+static Boolean parse_special_or_name(ParseContext *c)
+{
+ Boolean res;
+
+
+ res = (parse_gnu_special(c) || parse_mangled_name(c));
+ appendChar(c, '\0');
+
+ return res;
+}
+
+Rem3Return rem3_remangle_name(char *gcc3, int *gcc3size, const char *gcc295)
+{
+ ParseContext *c;
+ Rem3Return result;
+ int size;
+
+ if (!gcc295 || !gcc3 || !gcc3size)
+ return kR3BadArgument;
+
+ size = strlen(gcc295);
+ if (size < 2)
+ return kR3NotRemangled; // Not a valid C++ symbol
+ else if (*gcc295 != '_')
+ return kR3NotRemangled; // no leading '_', not valid
+
+ c = (ParseContext *) malloc(sizeof(*c));
+ if (!c)
+ return kR3InternalNotRemangled;
+ bzero(c, sizeof(*c));
+
+ c->fInSize = size;
+ c->fInStr = gcc295 + 1; // Strip leading '_'
+ c->fP.fInChar = c->fInStr;
+
+ c->fOutStrEnd = gcc3 + *gcc3size;
+ c->fOutChar = gcc3;
+
+ c->fRetCode = kR3NotRemangled;
+ (void) parse_special_or_name(c);
+
+ result = c->fRetCode;
+ if (kR3Remangled == result) {
+ if (c->fOutChar > c->fOutStrEnd)
+ result = kR3BufferTooSmallRemangled;
+ *gcc3size = c->fOutChar - gcc3 - 1; // Remove nul from len
+ }
+
+ free(c);
+
+ return result;
+}
--- /dev/null
+/*
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * History:
+ * 2002-02-26 gvdl Initial implementation of the gcc 2.95 -> gcc 3.x
+ * symbol remangler.
+ */
+
+#include <sys/cdefs.h>
+
+typedef enum Rem3Return {
+ kR3NotRemangled = 0, // Wasn't a 2.95 C++ symbol but otherwise OK
+ kR3Remangled, // Was sucessfully remangled from 2.95 -> 3.x
+ kR3InternalNotRemangled, // Symbol is too big to be parsed
+ kR3BufferTooSmallRemangled, // Is 2.95 symbol but insufficent output space
+ kR3BadArgument, // One of the pointers are NULL
+} Rem3Return;
+
+__BEGIN_DECLS
+
+extern Rem3Return
+rem3_remangle_name(char *gcc3, int *gcc3size, const char *gcc295);
+
+__END_DECLS
--- /dev/null
+/*
+ * Copyright (c) 2001 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * History:
+ * 2001-05-30 gvdl Initial implementation of the vtable patcher.
+ */
+// 45678901234567890123456789012345678901234567890123456789012345678901234567890
+
+#include <mach-o/fat.h>
+#include <mach-o/loader.h>
+#include <mach-o/nlist.h>
+#include <mach-o/reloc.h>
+
+#if KERNEL
+
+#include <stdarg.h>
+#include <string.h>
+
+#include <sys/systm.h>
+
+#include <libkern/OSTypes.h>
+
+#include <libsa/stdlib.h>
+#include <libsa/mach/mach.h>
+
+#include "mach_loader.h"
+
+#include <vm/vm_kern.h>
+
+enum { false = 0, true = 1 };
+
+#define vm_page_size page_size
+
+extern load_return_t fatfile_getarch(
+ void * vp, // normally a (struct vnode *)
+ vm_offset_t data_ptr,
+ struct fat_arch * archret);
+
+__private_extern__ char *strstr(const char *in, const char *str);
+
+#else /* !KERNEL */
+
+#include <unistd.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <sys/errno.h>
+#include <sys/fcntl.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <sys/vm.h>
+
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+
+#include <mach-o/arch.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#define PAGE_SIZE vm_page_size
+#define PAGE_MASK (PAGE_SIZE - 1)
+
+#endif /* KERNEL */
+
+#include "kld_patch.h"
+#include "c++rem3.h"
+
+#if 0
+#define DIE() do { for (;;) ; } while(0)
+
+#if KERNEL
+# define LOG_DELAY() /* IODelay(200000) */
+# define DEBUG_LOG(x) do { IOLog x; LOG_DELAY(); } while(0)
+#else
+# define LOG_DELAY()
+# define DEBUG_LOG(x) do { printf x; } while(0)
+#endif
+
+#else
+
+#define DIE()
+#define LOG_DELAY()
+#define DEBUG_LOG(x)
+
+#endif
+
+// OSObject symbol prefixes and suffixes
+#define kCPPSymbolPrefix "_Z"
+#define kVTablePrefix "_" kCPPSymbolPrefix "TV"
+#define kOSObjPrefix "_" kCPPSymbolPrefix "N"
+#define kReservedNamePrefix "_RESERVED"
+#define k29SuperClassSuffix "superClass"
+#define k31SuperClassSuffix "10superClassE"
+#define kGMetaSuffix "10gMetaClassE"
+#define kLinkEditSegName SEG_LINKEDIT
+
+// GCC 2.95 drops 2 leading constants in the vtable
+#define kVTablePreambleLen 2
+
+// Last address that I'm willing to try find vm in
+#define kTopAddr ((unsigned char *) (1024 * 1024 * 1024))
+
+// Size in bytes that Data Ref object's get increased in size
+// Must be a power of 2
+#define kDataCapacityIncrement 128
+
+// My usual set of helper macros. I personally find these macros
+// easier to read in the code rather than an explicit error condition
+// check. If I don't make it easy then I may get lazy ond not check
+// everything. I'm sorry if you find this code harder to read.
+
+// break_if will evaluate the expression and if it is true
+// then it will print the msg, which is enclosed in parens
+// and then break. Usually used in loops are do { } while (0)
+#define break_if(expr, msg) \
+ if (expr) { \
+ errprintf msg; \
+ break; \
+ }
+
+// return_if will evaluate expr and if true it will log the
+// msg, which is enclosed in parens, and then it will return
+// with the return code of ret.
+#define return_if(expr, ret, msg) do { \
+ if (expr) { \
+ errprintf msg; \
+ return ret; \
+ } \
+} while (0)
+
+#ifndef MIN
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#endif /* MIN */
+#ifndef MAX
+#define MAX(a,b) (((a)>(b))?(a):(b))
+#endif /* MAX */
+
+typedef struct Data {
+ unsigned long fLength, fCapacity;
+ unsigned char *fData;
+} Data, *DataRef;
+
+struct sectionRecord {
+ const struct section *fSection;
+ DataRef fRelocCache;
+};
+
+enum patchState {
+ kSymbolIdentical,
+ kSymbolLocal,
+ kSymbolPadUpdate,
+ kSymbolSuperUpdate,
+ kSymbolMismatch
+};
+
+struct patchRecord {
+ struct nlist *fSymbol;
+ enum patchState fType;
+};
+
+struct relocRecord {
+ void *fValue;
+ const struct nlist *fSymbol;
+ struct relocation_info *fRInfo;
+ void *reserved;
+};
+
+struct metaClassRecord {
+ char *fSuperName;
+ struct fileRecord *fFile;
+ const struct nlist *fVTableSym;
+ struct patchRecord *fPatchedVTable;
+ char fClassName[1];
+};
+
+struct fileRecord {
+ size_t fMapSize, fMachOSize;
+ unsigned char *fMap, *fMachO, *fPadEnd;
+ DataRef fClassList;
+ DataRef fSectData;
+ DataRef fNewSymbols, fNewStringBlocks;
+ DataRef fSym2Strings;
+ struct symtab_command *fSymtab;
+ struct sectionRecord *fSections;
+ struct segment_command *fLinkEditSeg;
+ const char **fSymbToStringTable;
+ char *fStringBase;
+ struct nlist *fSymbolBase;
+ const struct nlist *fLocalSyms;
+ unsigned int fNSects;
+ int fNLocal;
+ Boolean fIsKernel, fNoKernelExecutable, fIsKmem;
+ Boolean fImageDirty, fSymbolsDirty;
+ Boolean fRemangled, fFoundOSObject;
+ const char fPath[1];
+};
+
+static DataRef sFilesTable;
+static struct fileRecord *sKernelFile;
+
+static DataRef sMergedFiles;
+static DataRef sMergeMetaClasses;
+static Boolean sMergedKernel;
+
+static void errprintf(const char *fmt, ...)
+{
+ extern void kld_error_vprintf(const char *format, va_list ap);
+
+ va_list ap;
+
+ va_start(ap, fmt);
+ kld_error_vprintf(fmt, ap);
+ va_end(ap);
+
+DIE();
+}
+
+static __inline__ unsigned long DataGetLength(DataRef data)
+{
+ return data->fLength;
+}
+
+static __inline__ unsigned char *DataGetPtr(DataRef data)
+{
+ return data->fData;
+}
+
+static __inline__ unsigned char *DataGetEndPtr(DataRef data)
+{
+ return data->fData + data->fLength;
+}
+
+static __inline__ unsigned long DataRemaining(DataRef data)
+{
+ return data->fCapacity - data->fLength;
+}
+
+static __inline__ Boolean DataContainsAddr(DataRef data, void *vAddr)
+{
+ vm_offset_t offset = (vm_address_t) vAddr;
+
+ if (!data)
+ return false;
+
+ offset = (vm_address_t) vAddr - (vm_address_t) data->fData;
+ return (offset < data->fLength);
+}
+
+static Boolean DataEnsureCapacity(DataRef data, unsigned long capacity)
+{
+ // Don't bother to ever shrink a data object.
+ if (capacity > data->fCapacity) {
+ unsigned char *newData;
+
+ capacity += kDataCapacityIncrement - 1;
+ capacity &= ~(kDataCapacityIncrement - 1);
+ newData = (unsigned char *) realloc(data->fData, capacity);
+ if (!newData)
+ return false;
+
+ bzero(newData + data->fCapacity, capacity - data->fCapacity);
+ data->fData = newData;
+ data->fCapacity = capacity;
+ }
+
+ return true;
+}
+
+static __inline__ Boolean DataSetLength(DataRef data, unsigned long length)
+{
+ if (DataEnsureCapacity(data, length)) {
+ data->fLength = length;
+ return true;
+ }
+ else
+ return false;
+}
+
+static __inline__ Boolean DataAddLength(DataRef data, unsigned long length)
+{
+ return DataSetLength(data, data->fLength + length);
+}
+
+static __inline__ Boolean
+DataAppendBytes(DataRef data, const void *addr, unsigned int len)
+{
+ unsigned long size = DataGetLength(data);
+
+ if (!DataAddLength(data, len))
+ return false;
+
+ bcopy(addr, DataGetPtr(data) + size, len);
+ return true;
+}
+
+static __inline__ Boolean DataAppendData(DataRef dst, DataRef src)
+{
+ return DataAppendBytes(dst, DataGetPtr(src), DataGetLength(src));
+}
+
+static DataRef DataCreate(unsigned long capacity)
+{
+ DataRef data = (DataRef) malloc(sizeof(Data));
+
+ if (data) {
+ if (!capacity)
+ data->fCapacity = kDataCapacityIncrement;
+ else {
+ data->fCapacity = capacity + kDataCapacityIncrement - 1;
+ data->fCapacity &= ~(kDataCapacityIncrement - 1);
+ }
+
+ data->fData = (unsigned char *) malloc(data->fCapacity);
+ if (!data->fData) {
+ free(data);
+ return NULL;
+ }
+
+ bzero(data->fData, data->fCapacity);
+ data->fLength = 0;
+ }
+ return data;
+}
+
+static void DataRelease(DataRef data)
+{
+ if (data) {
+ if (data->fData)
+ free(data->fData);
+ data->fData = 0;
+ free(data);
+ }
+}
+
+static __inline__ const char *
+symNameByIndex(const struct fileRecord *file, unsigned int symInd)
+{
+ return file->fSymbToStringTable[symInd];
+}
+
+static __inline__ const char *
+symbolname(const struct fileRecord *file, const struct nlist *sym)
+{
+ unsigned int index;
+
+ index = sym - file->fSymbolBase;
+ if (index < file->fSymtab->nsyms)
+ return symNameByIndex(file, index);
+
+ if (-1 == sym->n_un.n_strx)
+ return (const char *) sym->n_value;
+
+ // If the preceding tests fail then we have a getNewSymbol patch and
+ // the file it refers to has already been patched as the n_strx is set
+ // to -1 temporarily while we are still processing a file.
+ // Once we have finished with a file then we repair the 'strx' offset
+ // to be valid for the repaired file's string table.
+ return file->fStringBase + sym->n_un.n_strx;
+}
+
+static struct fileRecord *
+getFile(const char *path)
+{
+ if (sFilesTable) {
+ int i, nfiles;
+ struct fileRecord **files;
+
+ // Check to see if we have already merged this file
+ nfiles = DataGetLength(sFilesTable) / sizeof(struct fileRecord *);
+ files = (struct fileRecord **) DataGetPtr(sFilesTable);
+ for (i = 0; i < nfiles; i++) {
+ if (!strcmp(path, files[i]->fPath))
+ return files[i];
+ }
+ }
+
+ return NULL;
+}
+
+static struct fileRecord *
+addFile(struct fileRecord *file, const char *path)
+{
+ struct fileRecord *newFile;
+
+ if (!sFilesTable) {
+ sFilesTable = DataCreate(0);
+ if (!sFilesTable)
+ return NULL;
+ }
+
+ newFile = (struct fileRecord *)
+ malloc(sizeof(struct fileRecord) + strlen(path));
+ if (!newFile)
+ return NULL;
+
+ if (!DataAppendBytes(sFilesTable, &newFile, sizeof(newFile))) {
+ free(newFile);
+ return NULL;
+ }
+
+ bcopy(file, newFile, sizeof(struct fileRecord) - 1);
+ strcpy((char *) newFile->fPath, path);
+
+ return newFile;
+}
+
+// @@@ gvdl: need to clean up the sMergeMetaClasses
+// @@@ gvdl: I had better fix the object file up again
+static void unmapFile(struct fileRecord *file)
+{
+ if (file->fSectData) {
+ struct sectionRecord *section;
+ unsigned int i, nsect;
+
+ nsect = file->fNSects;
+ section = file->fSections;
+ for (i = 0; i < nsect; i++, section++) {
+ if (section->fRelocCache) {
+ DataRelease(section->fRelocCache);
+ section->fRelocCache = 0;
+ }
+ }
+
+ DataRelease(file->fSectData);
+ file->fSectData = 0;
+ file->fSections = 0;
+ file->fNSects = 0;
+ }
+
+ if (file->fSym2Strings) {
+ DataRelease(file->fSym2Strings);
+ file->fSym2Strings = 0;
+ }
+
+ if (file->fMap) {
+#if KERNEL
+ if (file->fIsKmem)
+ kmem_free(kernel_map, (vm_address_t) file->fMap, file->fMapSize);
+#else /* !KERNEL */
+ if (file->fPadEnd) {
+ vm_address_t padVM;
+ vm_size_t padSize;
+
+ padVM = round_page((vm_address_t) file->fMap + file->fMapSize);
+ padSize = (vm_size_t) ((vm_address_t) file->fPadEnd - padVM);
+ (void) vm_deallocate(mach_task_self(), padVM, padSize);
+ file->fPadEnd = 0;
+ }
+
+ (void) munmap((caddr_t) file->fMap, file->fMapSize);
+#endif /* !KERNEL */
+ file->fMap = 0;
+ }
+}
+
+static void removeFile(struct fileRecord *file)
+{
+ if (file->fClassList) {
+ DataRelease(file->fClassList);
+ file->fClassList = 0;
+ }
+
+ unmapFile(file);
+
+ free(file);
+}
+
+#if !KERNEL
+static Boolean
+mapObjectFile(struct fileRecord *file, const char *pathName)
+{
+ Boolean result = false;
+ static unsigned char *sFileMapBaseAddr = 0;
+
+ int fd = 0;
+
+ if (!sFileMapBaseAddr) {
+ kern_return_t ret;
+ vm_address_t probeAddr;
+
+ // If we don't already have a base addr find any random chunk
+ // of 32 meg of VM and to use the 16 meg boundrary as a base.
+ ret = vm_allocate(mach_task_self(), &probeAddr,
+ 32 * 1024 * 1024, VM_FLAGS_ANYWHERE);
+ return_if(KERN_SUCCESS != ret, false,
+ ("Unable to allocate base memory %s\n", mach_error_string(ret)));
+ (void) vm_deallocate(mach_task_self(), probeAddr, 32 * 1024 * 1024);
+
+ // Now round to the next 16 Meg boundrary
+ probeAddr = (probeAddr + (16 * 1024 * 1024 - 1))
+ & ~(16 * 1024 * 1024 - 1);
+ sFileMapBaseAddr = (unsigned char *) probeAddr;
+ }
+
+ fd = open(pathName, O_RDONLY, 0);
+ return_if(fd == -1, false, ("Can't open %s for reading - %s\n",
+ pathName, strerror(errno)));
+
+ do {
+ kern_return_t ret;
+ struct stat sb;
+ int retaddr = -1;
+
+ break_if(fstat(fd, &sb) == -1,
+ ("Can't stat %s - %s\n", file->fPath, strerror(errno)));
+
+ file->fMapSize = sb.st_size;
+ file->fMap = sFileMapBaseAddr;
+ ret = KERN_SUCCESS;
+ while (file->fMap < kTopAddr) {
+ vm_address_t padVM;
+ vm_address_t padVMEnd;
+ vm_size_t padSize;
+
+ padVM = round_page((vm_address_t) file->fMap + file->fMapSize);
+ retaddr = (int) mmap(file->fMap, file->fMapSize,
+ PROT_READ|PROT_WRITE,
+ MAP_FIXED|MAP_FILE|MAP_PRIVATE,
+ fd, 0);
+ if (-1 == retaddr) {
+ break_if(ENOMEM != errno,
+ ("mmap failed %d - %s\n", errno, strerror(errno)));
+
+ file->fMap = (unsigned char *) padVM;
+ continue;
+ }
+
+
+ // Round up padVM to the next page after the file and assign at
+ // least another fMapSize more room rounded up to the next page
+ // boundary.
+ padVMEnd = round_page(padVM + file->fMapSize);
+ padSize = padVMEnd - padVM;
+ ret = vm_allocate(
+ mach_task_self(), &padVM, padSize, VM_FLAGS_FIXED);
+ if (KERN_SUCCESS == ret) {
+ file->fPadEnd = (unsigned char *) padVMEnd;
+ break;
+ }
+ else {
+ munmap(file->fMap, file->fMapSize);
+ break_if(KERN_INVALID_ADDRESS != ret,
+ ("Unable to allocate pad vm for %s - %s\n",
+ pathName, mach_error_string(ret)));
+
+ file->fMap = (unsigned char *) padVMEnd;
+ continue; // try again wherever the vm system wants
+ }
+ }
+
+ if (-1 == retaddr || KERN_SUCCESS != ret)
+ break;
+
+ break_if(file->fMap >= kTopAddr,
+ ("Unable to map memory %s\n", file->fPath));
+
+ sFileMapBaseAddr = file->fPadEnd;
+ result = true;
+ } while(0);
+
+ close(fd);
+ return result;
+}
+#endif /* !KERNEL */
+
+static Boolean findBestArch(struct fileRecord *file, const char *pathName)
+{
+ unsigned long magic;
+ struct fat_header *fat;
+
+
+ file->fMachOSize = file->fMapSize;
+ file->fMachO = file->fMap;
+ magic = ((const struct mach_header *) file->fMachO)->magic;
+ fat = (struct fat_header *) file->fMachO;
+
+ // Try to figure out what type of file this is
+ return_if(file->fMapSize < sizeof(unsigned long), false,
+ ("%s isn't a valid object file - no magic\n", pathName));
+
+#if KERNEL
+
+ // CIGAM is byte-swapped MAGIC
+ if (magic == FAT_MAGIC || magic == FAT_CIGAM) {
+
+ load_return_t load_return;
+ struct fat_arch fatinfo;
+
+ load_return = fatfile_getarch(NULL, (vm_address_t) fat, &fatinfo);
+ return_if(load_return != LOAD_SUCCESS, false,
+ ("Extension \"%s\": has no code for this computer\n", pathName));
+
+ file->fMachO = file->fMap + fatinfo.offset;
+ file->fMachOSize = fatinfo.size;
+ magic = ((const struct mach_header *) file->fMachO)->magic;
+ }
+
+#else /* !KERNEL */
+
+ // Do we need to in-place swap the endianness of the fat header?
+ if (magic == FAT_CIGAM) {
+ unsigned long i;
+ struct fat_arch *arch;
+
+ fat->nfat_arch = NXSwapBigLongToHost(fat->nfat_arch);
+ return_if(file->fMapSize < sizeof(struct fat_header)
+ + fat->nfat_arch * sizeof(struct fat_arch),
+ false, ("%s is too fat\n", file->fPath));
+
+ arch = (struct fat_arch *) &fat[1];
+ for (i = 0; i < fat->nfat_arch; i++) {
+ arch[i].cputype = NXSwapBigLongToHost(arch[i].cputype);
+ arch[i].cpusubtype = NXSwapBigLongToHost(arch[i].cpusubtype);
+ arch[i].offset = NXSwapBigLongToHost(arch[i].offset);
+ arch[i].size = NXSwapBigLongToHost(arch[i].size);
+ arch[i].align = NXSwapBigLongToHost(arch[i].align);
+ }
+
+ magic = NXSwapBigLongToHost(fat->magic);
+ }
+
+ // Now see if we can find any valid architectures
+ if (magic == FAT_MAGIC) {
+ const NXArchInfo *myArch;
+ unsigned long fatsize;
+ struct fat_arch *arch;
+
+ fatsize = sizeof(struct fat_header)
+ + fat->nfat_arch * sizeof(struct fat_arch);
+ return_if(file->fMapSize < fatsize,
+ false, ("%s isn't a valid fat file\n", pathName));
+
+ myArch = NXGetLocalArchInfo();
+ arch = NXFindBestFatArch(myArch->cputype, myArch->cpusubtype,
+ (struct fat_arch *) &fat[1], fat->nfat_arch);
+ return_if(!arch,
+ false, ("%s hasn't got arch for %s\n", pathName, myArch->name));
+ return_if(arch->offset + arch->size > file->fMapSize,
+ false, ("%s's %s arch is incomplete\n", pathName, myArch->name));
+ file->fMachO = file->fMap + arch->offset;
+ file->fMachOSize = arch->size;
+ magic = ((const struct mach_header *) file->fMachO)->magic;
+ }
+
+#endif /* KERNEL */
+
+ return_if(magic != MH_MAGIC,
+ false, ("%s isn't a valid mach-o\n", pathName));
+
+ return true;
+}
+
+static Boolean
+parseSegments(struct fileRecord *file, struct segment_command *seg)
+{
+ struct sectionRecord *sections;
+ int i, nsects = seg->nsects;
+ const struct segmentMap {
+ struct segment_command seg;
+ const struct section sect[1];
+ } *segMap;
+
+ if (!file->fSectData) {
+ file->fSectData = DataCreate(0);
+ if (!file->fSectData)
+ return false;
+ }
+
+ // Increase length of section DataRef and cache data pointer
+ if (!DataAddLength(file->fSectData, nsects * sizeof(struct sectionRecord)))
+ return false;
+ file->fSections = (struct sectionRecord *) DataGetPtr(file->fSectData);
+
+ // Initialise the new sections
+ sections = &file->fSections[file->fNSects];
+ file->fNSects += nsects;
+ for (i = 0, segMap = (struct segmentMap *) seg; i < nsects; i++)
+ sections[i].fSection = &segMap->sect[i];
+
+ return true;
+}
+
+static Boolean
+remangleExternSymbols(struct fileRecord *file, const char *pathName)
+{
+ const struct nlist *sym;
+ int i, nsyms, len;
+ DataRef strings = NULL;
+
+ DEBUG_LOG(("Remangling %s\n", pathName));
+
+ file->fNewStringBlocks = DataCreate(0);
+ return_if(!file->fNewStringBlocks, false,
+ ("Unable to allocate new string table for %s\n", pathName));
+
+ nsyms = file->fSymtab->nsyms;
+ for (i = 0, sym = file->fSymbolBase; i < nsyms; i++, sym++) {
+ Rem3Return ret;
+ const char *symname;
+ char *newname;
+ unsigned char n_type = sym->n_type;
+
+ // Not an external symbol or it is a stab in any case don't bother
+ if ((n_type ^ N_EXT) & (N_STAB | N_EXT))
+ continue;
+
+ symname = symNameByIndex(file, i);
+
+tryRemangleAgain:
+ if (!strings) {
+ strings = DataCreate(16 * 1024); // Arbitrary block size
+ return_if(!strings, false,
+ ("Unable to allocate new string block for %s\n", pathName));
+ }
+
+ len = DataRemaining(strings);
+ newname = DataGetEndPtr(strings);
+ ret = rem3_remangle_name(newname, &len, symname);
+ switch (ret) {
+ case kR3InternalNotRemangled:
+ errprintf("Remangler fails on %s in %s\n", symname, pathName);
+ /* No break */
+ case kR3NotRemangled:
+ break;
+
+ case kR3Remangled:
+ file->fSymbToStringTable[i] = newname;
+ file->fRemangled = file->fSymbolsDirty = true;
+ DataAddLength(strings, len + 1); // returns strlen
+ break;
+
+ case kR3BufferTooSmallRemangled:
+ return_if(!DataAppendBytes
+ (file->fNewStringBlocks, &strings, sizeof(strings)),
+ false, ("Unable to allocate string table for %s\n", pathName));
+ strings = NULL;
+ goto tryRemangleAgain;
+
+ case kR3BadArgument:
+ default:
+ return_if(true, false,
+ ("Internal error - remangle of %s\n", pathName));
+ }
+ }
+
+ if (strings) {
+ return_if(!DataAppendBytes
+ (file->fNewStringBlocks, &strings, sizeof(strings)),
+ false, ("Unable to allocate string table for %s\n", pathName));
+ }
+
+ return true;
+}
+
+static Boolean parseSymtab(struct fileRecord *file, const char *pathName)
+{
+ const struct nlist *sym;
+ unsigned int i, firstlocal, nsyms;
+ unsigned long strsize;
+ const char *strbase;
+ Boolean foundOSObject, found295CPP;
+
+ // we found a link edit segment so recompute the bases
+ if (file->fLinkEditSeg) {
+ struct segment_command *link = file->fLinkEditSeg;
+
+ file->fSymbolBase = (struct nlist *)
+ (link->vmaddr + (file->fSymtab->symoff - link->fileoff));
+ file->fStringBase = (char *)
+ (link->vmaddr + (file->fSymtab->stroff - link->fileoff));
+ return_if( ( (caddr_t) file->fStringBase + file->fSymtab->strsize
+ > (caddr_t) link->vmaddr + link->vmsize ), false,
+ ("%s isn't a valid mach-o le, bad symbols\n", pathName));
+ }
+ else {
+ file->fSymbolBase = (struct nlist *)
+ (file->fMachO + file->fSymtab->symoff);
+ file->fStringBase = (char *)
+ (file->fMachO + file->fSymtab->stroff);
+ return_if( ( file->fSymtab->stroff + file->fSymtab->strsize
+ > file->fMachOSize ), false,
+ ("%s isn't a valid mach-o, bad symbols\n", pathName));
+ }
+
+ nsyms = file->fSymtab->nsyms;
+
+ // If this file the kernel and do we have an executable image
+ file->fNoKernelExecutable = (vm_page_size == file->fSymtab->symoff)
+ && (file->fSections[0].fSection->size == 0);
+
+ // Generate a table of pointers to strings indexed by the symbol number
+
+ file->fSym2Strings = DataCreate(nsyms * sizeof(const char *));
+ DataSetLength(file->fSym2Strings, nsyms * sizeof(const char *));
+ return_if(!file->fSym2Strings, false,
+ ("Unable to allocate memory - symbol string trans\n", pathName));
+ file->fSymbToStringTable = (const char **) DataGetPtr(file->fSym2Strings);
+
+ // Search for the first non-stab symbol in table
+ strsize = file->fSymtab->strsize;
+ strbase = file->fStringBase;
+ firstlocal = 0;
+ found295CPP = foundOSObject = false;
+ for (i = 0, sym = file->fSymbolBase; i < nsyms; i++, sym++) {
+ long strx = sym->n_un.n_strx;
+ const char *symname = strbase + strx;
+ unsigned char n_type;
+
+ return_if(((unsigned long) strx > strsize), false,
+ ("%s has an illegal string offset in symbol %d\n", pathName, i));
+
+ // Load up lookup symbol look table with sym names
+ file->fSymbToStringTable[i] = symname;
+
+ n_type = sym->n_type & (N_TYPE | N_EXT);
+
+ // Find the first exported symbol
+ if ( !firstlocal && (n_type & N_EXT) ) {
+ firstlocal = i;
+ file->fLocalSyms = sym;
+ }
+
+ // Find the a OSObject based subclass by searching for symbols
+ // that have a suffix of '10superClassE'
+ symname++; // Skip leading '_'
+
+ if (!foundOSObject
+ && (n_type == (N_SECT | N_EXT) || n_type == (N_ABS | N_EXT))
+ && strx) {
+ const char *suffix, *endSym;
+
+ endSym = symname + strlen(symname);
+
+ // Find out if this symbol has the superclass suffix.
+ if (symname[0] == kCPPSymbolPrefix[0]
+ && symname[1] == kCPPSymbolPrefix[1]) {
+
+ suffix = endSym - sizeof(k31SuperClassSuffix) + 1;
+
+ // Check for a gcc3 OSObject subclass
+ if (suffix > symname
+ && !strcmp(suffix, k31SuperClassSuffix))
+ foundOSObject = true;
+ }
+ else {
+ suffix = endSym - sizeof(k29SuperClassSuffix);
+
+ // Check for a gcc295 OSObject subclass
+ if (suffix > symname
+ && ('.' == *suffix || '$' == *suffix)
+ && !strcmp(suffix+1, k29SuperClassSuffix)) {
+ found295CPP = foundOSObject = true;
+ }
+ else if (!found295CPP) {
+ // Finally just check if we need to remangle
+ symname++; // skip leading '__'
+ while (*symname) {
+ if ('_' == *symname++ && '_' == *symname++) {
+ found295CPP = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+ else if (sym->n_type == (N_EXT | N_UNDF)) {
+ if ( !file->fNLocal) // Find the last local symbol
+ file->fNLocal = i - firstlocal;
+ if (!found295CPP) {
+ symname++; // Skip possible second '_' at start.
+ while (*symname) {
+ if ('_' == *symname++ && '_' == *symname++) {
+ found295CPP = true;
+ break;
+ }
+ }
+ }
+ }
+ // Note symname is trashed at this point
+ }
+ return_if(i < nsyms, false,
+ ("%s isn't a valid mach-o, bad symbol strings\n", pathName));
+
+ return_if(!file->fLocalSyms, false, ("%s has no symbols?\n", pathName));
+
+ // If we don't have any undefined symbols then all symbols
+ // must be local so just compute it now if necessary.
+ if ( !file->fNLocal )
+ file->fNLocal = i - firstlocal;
+
+ file->fFoundOSObject = foundOSObject;
+
+ if (found295CPP && !remangleExternSymbols(file, pathName))
+ return false;
+
+ return true;
+}
+
+// @@@ gvdl: These functions need to be hashed they are
+// going to be way too slow for production code.
+static const struct nlist *
+findSymbolByAddress(const struct fileRecord *file, void *entry)
+{
+ // not quite so dumb linear search of all symbols
+ const struct nlist *sym;
+ int i, nsyms;
+
+ // First try to find the symbol in the most likely place which is the
+ // extern symbols
+ sym = file->fLocalSyms;
+ for (i = 0, nsyms = file->fNLocal; i < nsyms; i++, sym++) {
+ if (sym->n_value == (unsigned long) entry && !(sym->n_type & N_STAB) )
+ return sym;
+ }
+
+ // Didn't find it in the external symbols so try to local symbols before
+ // giving up.
+ sym = file->fSymbolBase;
+ for (i = 0, nsyms = file->fSymtab->nsyms; i < nsyms; i++, sym++) {
+ if ( (sym->n_type & N_EXT) )
+ return NULL;
+ if ( sym->n_value == (unsigned long) entry && !(sym->n_type & N_STAB) )
+ return sym;
+ }
+
+ return NULL;
+}
+
+struct searchContext {
+ const char *fSymname;
+ const struct fileRecord *fFile;
+};
+
+static int symbolSearch(const void *vKey, const void *vSym)
+{
+ const struct searchContext *key = (const struct searchContext *) vKey;
+ const struct nlist *sym = (const struct nlist *) vSym;
+
+ return strcmp(key->fSymname + 1, symbolname(key->fFile, sym) + 1);
+}
+
+static const struct nlist *
+findSymbolByName(struct fileRecord *file, const char *symname)
+{
+ if (file->fRemangled) {
+ // @@@ gvdl: Performance problem
+ // Linear search as we don't sort after remangling
+ const struct nlist *sym;
+ int i = file->fLocalSyms - file->fSymbolBase;
+ int nLocal = file->fNLocal + i;
+
+ for (sym = file->fLocalSyms; i < nLocal; i++, sym++)
+ if (!strcmp(symNameByIndex(file, i) + 1, symname + 1))
+ return sym;
+ return NULL;
+ }
+ else {
+ struct searchContext context;
+
+ context.fSymname = symname;
+ context.fFile = file;
+ return (struct nlist *)
+ bsearch(&context,
+ file->fLocalSyms, file->fNLocal, sizeof(struct nlist),
+ symbolSearch);
+ }
+}
+
+static Boolean
+relocateSection(const struct fileRecord *file, struct sectionRecord *sectionRec)
+{
+ const struct nlist *symbol;
+ const struct section *section;
+ struct relocRecord *rec;
+ struct relocation_info *rinfo;
+ unsigned long i;
+ unsigned long r_address, r_symbolnum, r_length;
+ enum reloc_type_generic r_type;
+ UInt8 *sectionBase;
+ void **entry;
+
+ sectionRec->fRelocCache = DataCreate(
+ sectionRec->fSection->nreloc * sizeof(struct relocRecord));
+ if (!sectionRec->fRelocCache)
+ return false;
+
+ section = sectionRec->fSection;
+ sectionBase = file->fMachO + section->offset;
+
+ rec = (struct relocRecord *) DataGetPtr(sectionRec->fRelocCache);
+ rinfo = (struct relocation_info *) (file->fMachO + section->reloff);
+ for (i = 0; i < section->nreloc; i++, rec++, rinfo++) {
+
+ // Totally uninterested in scattered relocation entries
+ if ( (rinfo->r_address & R_SCATTERED) )
+ continue;
+
+ r_address = rinfo->r_address;
+ entry = (void **) (sectionBase + r_address);
+
+ /*
+ * The r_address field is really an offset into the contents of the
+ * section and must reference something inside the section (Note
+ * that this is not the case for PPC_RELOC_PAIR entries but this
+ * can't be one with the above checks).
+ */
+ return_if(r_address >= section->size, false,
+ ("Invalid relocation entry in %s - not in section\n", file->fPath));
+
+ // If we don't have a VANILLA entry or the Vanilla entry isn't
+ // a 'long' then ignore the entry and try the next.
+ r_type = (enum reloc_type_generic) rinfo->r_type;
+ r_length = rinfo->r_length;
+ if (r_type != GENERIC_RELOC_VANILLA || r_length != 2)
+ continue;
+
+ r_symbolnum = rinfo->r_symbolnum;
+
+ /*
+ * If rinfo->r_extern is set this relocation entry is an external entry
+ * else it is a local entry.
+ */
+ if (rinfo->r_extern) {
+ /*
+ * This is an external relocation entry.
+ * r_symbolnum is an index into the input file's symbol table
+ * of the symbol being refered to. The symbol must be
+ * undefined to be used in an external relocation entry.
+ */
+ return_if(r_symbolnum >= file->fSymtab->nsyms, false,
+ ("Invalid relocation entry in %s - no symbol\n", file->fPath));
+
+ /*
+ * If this is an indirect symbol resolve indirection (all chains
+ * of indirect symbols have been resolved so that they point at
+ * a symbol that is not an indirect symbol).
+ */
+ symbol = file->fSymbolBase;
+ if ((symbol[r_symbolnum].n_type & N_TYPE) == N_INDR)
+ r_symbolnum = symbol[r_symbolnum].n_value;
+ symbol = &symbol[r_symbolnum];
+
+ return_if(symbol->n_type != (N_EXT | N_UNDF), false,
+ ("Invalid relocation entry in %s - extern\n", file->fPath));
+ }
+ else {
+ /*
+ * If the symbol is not in any section then it can't be a
+ * pointer to a local segment and I don't care about it.
+ */
+ if (r_symbolnum == R_ABS)
+ continue;
+
+ // Note segment references are offset by 1 from 0.
+ return_if(r_symbolnum > file->fNSects, false,
+ ("Invalid relocation entry in %s - local\n", file->fPath));
+
+ // Find the symbol, if any, that backs this entry
+ symbol = findSymbolByAddress(file, *entry);
+ }
+
+ rec->fValue = *entry; // Save the previous value
+ rec->fRInfo = rinfo; // Save a pointer to the reloc
+ rec->fSymbol = symbol; // Record the current symbol
+
+ *entry = (void *) rec; // Save pointer to record in object image
+ }
+
+ DataSetLength(sectionRec->fRelocCache, i * sizeof(struct relocRecord));
+ ((struct fileRecord *) file)->fImageDirty = true;
+
+ return true;
+}
+
+static const struct nlist *
+findSymbolRefAtLocation(const struct fileRecord *file,
+ struct sectionRecord *sctn, void **loc)
+{
+ if (file->fIsKernel) {
+ if (*loc)
+ return findSymbolByAddress(file, *loc);
+ }
+ else if (sctn->fRelocCache || relocateSection(file, sctn)) {
+ struct relocRecord *reloc = (struct relocRecord *) *loc;
+
+ if (DataContainsAddr(sctn->fRelocCache, reloc))
+ return reloc->fSymbol;
+ }
+
+ return NULL;
+}
+
+static Boolean
+addClass(struct fileRecord *file,
+ struct metaClassRecord *inClass,
+ const char *cname)
+{
+ Boolean result = false;
+ struct metaClassRecord *newClass = NULL;
+ struct metaClassRecord **fileClasses = NULL;
+ int len;
+
+ if (!file->fClassList) {
+ file->fClassList = DataCreate(0);
+ if (!file->fClassList)
+ return false;
+ }
+
+ do {
+ // Attempt to allocate all necessary resource first
+ len = strlen(cname) + 1
+ + (int) (&((struct metaClassRecord *) 0)->fClassName);
+ newClass = (struct metaClassRecord *) malloc(len);
+ if (!newClass)
+ break;
+
+ if (!DataAddLength(file->fClassList, sizeof(struct metaClassRecord *)))
+ break;
+ fileClasses = (struct metaClassRecord **)
+ (DataGetPtr(file->fClassList) + DataGetLength(file->fClassList));
+
+ // Copy the meta Class structure and string name into newClass and
+ // insert object at end of the file->fClassList and sMergeMetaClasses
+ *newClass = *inClass;
+ strcpy(newClass->fClassName, cname);
+ fileClasses[-1] = newClass;
+
+ return true;
+ } while (0);
+
+ if (fileClasses)
+ DataAddLength(file->fClassList, -sizeof(struct metaClassRecord *));
+
+ if (newClass)
+ free(newClass);
+
+ return result;
+}
+
+static struct metaClassRecord *getClass(DataRef classList, const char *cname)
+{
+ if (classList) {
+ int i, nclass;
+ struct metaClassRecord **classes, *thisClass;
+
+ nclass = DataGetLength(classList) / sizeof(struct metaClassRecord *);
+ classes = (struct metaClassRecord **) DataGetPtr(classList);
+ for (i = 0; i < nclass; i++) {
+ thisClass = classes[i];
+ if (!strcmp(thisClass->fClassName, cname))
+ return thisClass;
+ }
+ }
+
+ return NULL;
+}
+
+// Add the class 'cname' to the list of known OSObject based classes
+// Note 'sym' is the <cname>10superClassE symbol.
+static Boolean
+recordClass(struct fileRecord *file, const char *cname, const struct nlist *sym)
+{
+ Boolean result = false;
+ char *supername = NULL;
+ const char *classname = NULL;
+ struct metaClassRecord newClass;
+ char strbuffer[1024];
+
+ // Only do the work to find the super class if we are
+ // not currently working on the kernel. The kernel is the end
+ // of all superclass chains by definition as the kernel must be binary
+ // compatible with itself.
+ if (!file->fIsKernel) {
+ const char *suffix;
+ const struct nlist *supersym;
+ const struct section *section;
+ struct sectionRecord *sectionRec;
+ unsigned char sectind = sym->n_sect;
+ const char *superstr;
+ void **location;
+ int snamelen;
+
+ // We can't resolve anything that isn't in a real section
+ // Note that the sectind is starts at one to make room for the
+ // NO_SECT flag but the fNSects field isn't offset so we have a
+ // '>' test. Which means this isn't an OSObject based class
+ if (sectind == NO_SECT || sectind > file->fNSects) {
+ result = true;
+ goto finish;
+ }
+ sectionRec = file->fSections + sectind - 1;
+ section = sectionRec->fSection;
+ location = (void **) ( file->fMachO + section->offset
+ + sym->n_value - section->addr );
+
+ supersym = findSymbolRefAtLocation(file, sectionRec, location);
+ if (!supersym) {
+ result = true; // No superclass symbol then it isn't an OSObject.
+ goto finish;
+ }
+
+ // Find string in file and skip leading '_' and then find the suffix
+ superstr = symbolname(file, supersym) + 1;
+ suffix = superstr + strlen(superstr) - sizeof(kGMetaSuffix) + 1;
+ if (suffix <= superstr || strcmp(suffix, kGMetaSuffix)) {
+ result = true; // Not an OSObject superclass so ignore it..
+ goto finish;
+ }
+
+ // Got a candidate so hand it over for class processing.
+ snamelen = suffix - superstr - sizeof(kOSObjPrefix) + 2;
+ supername = (char *) malloc(snamelen + 1);
+ bcopy(superstr + sizeof(kOSObjPrefix) - 2, supername, snamelen);
+ supername[snamelen] = '\0';
+ }
+
+ do {
+ break_if(getClass(file->fClassList, cname),
+ ("Duplicate class %s in %s\n", cname, file->fPath));
+
+ snprintf(strbuffer, sizeof(strbuffer), "%s%s", kVTablePrefix, cname);
+ newClass.fVTableSym = findSymbolByName(file, strbuffer);
+ break_if(!newClass.fVTableSym,
+ ("Can't find vtable %s in %s\n", cname, file->fPath));
+
+ newClass.fFile = file;
+ newClass.fSuperName = supername;
+ newClass.fPatchedVTable = NULL;
+
+ // Can't use cname as it may be a stack variable
+ // However the vtable's string has the class name as a suffix
+ // so why don't we use that rather than mallocing a string.
+ classname = symbolname(file, newClass.fVTableSym)
+ + sizeof(kVTablePrefix) - 1;
+ break_if(!addClass(file, &newClass, classname),
+ ("recordClass - no memory?\n"));
+
+ supername = NULL;
+ result = true;
+ } while (0);
+
+finish:
+ if (supername)
+ free(supername);
+
+ return result;
+}
+
+
+static Boolean getMetaClassGraph(struct fileRecord *file)
+{
+ const struct nlist *sym;
+ int i, nsyms;
+
+ // Search the symbol table for the local symbols that are generated
+ // by the metaclass system. There are three metaclass variables
+ // that are relevant.
+ //
+ // <ClassName>.metaClass A pointer to the meta class structure.
+ // <ClassName>.superClass A pointer to the super class's meta class.
+ // <ClassName>.gMetaClass The meta class structure itself.
+ // ___vt<ClassName> The VTable for the class <ClassName>.
+ //
+ // In this code I'm going to search for any symbols that
+ // ends in k31SuperClassSuffix as this indicates this class is a conforming
+ // OSObject subclass and will need to be patched, and it also
+ // contains a pointer to the super class's meta class structure.
+ sym = file->fLocalSyms;
+ for (i = 0, nsyms = file->fNLocal; i < nsyms; i++, sym++) {
+ const char *symname;
+ const char *suffix;
+ char classname[1024];
+ unsigned char n_type = sym->n_type & (N_TYPE | N_EXT);
+ int cnamelen;
+
+ // Check that the symbols is a global and that it has a name.
+ if (((N_SECT | N_EXT) != n_type && (N_ABS | N_EXT) != n_type)
+ || !sym->n_un.n_strx)
+ continue;
+
+ // Only search from the last *sep* in the symbol.
+ // but skip the leading '_' in all symbols first.
+ symname = symbolname(file, sym) + 1;
+ if (symname[0] != kCPPSymbolPrefix[0]
+ || symname[1] != kCPPSymbolPrefix[1])
+ continue;
+
+ suffix = symname + strlen(symname) - sizeof(k31SuperClassSuffix) + 1;
+ if (suffix <= symname || strcmp(suffix, k31SuperClassSuffix))
+ continue;
+
+ // Got a candidate so hand it over for class processing.
+ cnamelen = suffix - symname - sizeof(kOSObjPrefix) + 2;
+ return_if(cnamelen + 1 >= (int) sizeof(classname),
+ false, ("Symbol %s is too long", symname));
+
+ bcopy(symname + sizeof(kOSObjPrefix) - 2, classname, cnamelen);
+ classname[cnamelen] = '\0';
+ if (!recordClass(file, classname, sym))
+ return false;
+ }
+
+ return_if(!file->fClassList, false, ("Internal error, "
+ "getMetaClassGraph(%s) found no classes", file->fPath));
+
+ DEBUG_LOG(("Found %ld classes in %p for %s\n",
+ DataGetLength(file->fClassList)/sizeof(void*),
+ file->fClassList, file->fPath));
+
+ return true;
+}
+
+static Boolean mergeOSObjectsForFile(const struct fileRecord *file)
+{
+ int i, nmerged;
+ Boolean foundDuplicates = false;
+
+ DEBUG_LOG(("Merging file %s\n", file->fPath)); // @@@ gvdl:
+
+ if (!file->fClassList)
+ return true;
+
+ if (!sMergedFiles) {
+ sMergedFiles = DataCreate(0);
+ return_if(!sMergedFiles, false,
+ ("Unable to allocate memory metaclass list\n", file->fPath));
+ }
+
+ // Check to see if we have already merged this file
+ nmerged = DataGetLength(sMergedFiles) / sizeof(struct fileRecord *);
+ for (i = 0; i < nmerged; i++) {
+ if (file == ((void **) DataGetPtr(sMergedFiles))[i])
+ return true;
+ }
+
+ if (!sMergeMetaClasses) {
+ sMergeMetaClasses = DataCreate(0);
+ return_if(!sMergeMetaClasses, false,
+ ("Unable to allocate memory metaclass list\n", file->fPath));
+ }
+ else { /* perform a duplicate check */
+ int i, j, cnt1, cnt2;
+ struct metaClassRecord **list1, **list2;
+
+ list1 = (struct metaClassRecord **) DataGetPtr(file->fClassList);
+ cnt1 = DataGetLength(file->fClassList) / sizeof(*list1);
+ list2 = (struct metaClassRecord **) DataGetPtr(sMergeMetaClasses);
+ cnt2 = DataGetLength(sMergeMetaClasses) / sizeof(*list2);
+
+ for (i = 0; i < cnt1; i++) {
+ for (j = 0; j < cnt2; j++) {
+ if (!strcmp(list1[i]->fClassName, list2[j]->fClassName)) {
+ errprintf("duplicate class %s in %s & %s\n",
+ list1[i]->fClassName,
+ file->fPath, list2[j]->fFile->fPath);
+ }
+ }
+ }
+ }
+ if (foundDuplicates)
+ return false;
+
+ return_if(!DataAppendBytes(sMergedFiles, &file, sizeof(file)), false,
+ ("Unable to allocate memory to merge %s\n", file->fPath));
+
+ return_if(!DataAppendData(sMergeMetaClasses, file->fClassList), false,
+ ("Unable to allocate memory to merge %s\n", file->fPath));
+
+ if (file == sKernelFile)
+ sMergedKernel = true;
+
+ return true;
+}
+
+// Returns a pointer to the base of the section offset by the sections
+// base address. The offset is so that we can add nlist::n_values directly
+// to this address and get a valid pointer in our memory.
+static unsigned char *
+getSectionForSymbol(const struct fileRecord *file, const struct nlist *symb,
+ void ***endP)
+{
+ const struct section *section;
+ unsigned char sectind;
+ unsigned char *base;
+
+ sectind = symb->n_sect; // Default to symbols section
+ if ((symb->n_type & N_TYPE) == N_ABS && file->fIsKernel) {
+ // Absolute symbol so we have to iterate over our sections
+ for (sectind = 1; sectind <= file->fNSects; sectind++) {
+ unsigned long start, end;
+
+ section = file->fSections[sectind - 1].fSection;
+ start = section->addr;
+ end = start + section->size;
+ if (start <= symb->n_value && symb->n_value < end) {
+ // Found the relevant section
+ break;
+ }
+ }
+ }
+
+ // Is the vtable in a valid section?
+ return_if(sectind == NO_SECT || sectind > file->fNSects,
+ (unsigned char *) -1,
+ ("%s isn't a valid kext, bad section reference\n", file->fPath));
+
+ section = file->fSections[sectind - 1].fSection;
+
+ // for when we start walking the vtable so compute offset's now.
+ base = file->fMachO + section->offset;
+ *endP = (void **) (base + section->size);
+
+ return base - section->addr; // return with addr offset
+}
+
+static Boolean resolveKernelVTable(struct metaClassRecord *metaClass)
+{
+ const struct fileRecord *file;
+ struct patchRecord *patchedVTable;
+ void **curEntry, **vtableEntries, **endSection;
+ unsigned char *sectionBase;
+ struct patchRecord *curPatch;
+ int classSize;
+
+ // Should never occur but it doesn't cost us anything to check.
+ if (metaClass->fPatchedVTable)
+ return true;
+
+ DEBUG_LOG(("Kernel vtable %s\n", metaClass->fClassName)); // @@@ gvdl:
+
+ // Do we have a valid vtable to patch?
+ return_if(!metaClass->fVTableSym,
+ false, ("Internal error - no class vtable symbol?\n"));
+
+ file = metaClass->fFile;
+
+ // If the metaClass we are being to ask is in the kernel then we
+ // need to do a quick scan to grab the fPatchList in a reliable format
+ // however we don't need to check the superclass in the kernel
+ // as the kernel vtables are always correct wrt themselves.
+ // Note this ends the superclass chain recursion.
+ return_if(!file->fIsKernel,
+ false, ("Internal error - resolveKernelVTable not kernel\n"));
+
+ if (file->fNoKernelExecutable) {
+ // Oh dear attempt to map the kernel's VM into my memory space
+ return_if(file->fNoKernelExecutable, false,
+ ("Internal error - fNoKernelExecutable not implemented yet\n"));
+ }
+
+ // We are going to need the base and the end
+ sectionBase = getSectionForSymbol(file, metaClass->fVTableSym, &endSection);
+ if (-1 == (long) sectionBase)
+ return false;
+
+ vtableEntries = (void **) (sectionBase + metaClass->fVTableSym->n_value);
+ curEntry = vtableEntries + kVTablePreambleLen;
+ for (classSize = 0; curEntry < endSection && *curEntry; classSize++)
+ curEntry++;
+
+ return_if(*curEntry, false, ("Bad kernel image, short section\n"));
+
+ patchedVTable = (struct patchRecord *)
+ malloc((classSize + 1) * sizeof(struct patchRecord));
+ return_if(!patchedVTable, false, ("resolveKernelVTable - no memory\n"));
+
+ // Copy the vtable of this class into the patch table
+ curPatch = patchedVTable;
+ curEntry = vtableEntries + kVTablePreambleLen;
+ for (; *curEntry; curEntry++, curPatch++) {
+ curPatch->fSymbol = (struct nlist *)
+ findSymbolByAddress(file, *curEntry);
+ curPatch->fType = kSymbolLocal;
+ }
+
+ // Tag the end of the patch vtable
+ curPatch->fSymbol = NULL;
+ metaClass->fPatchedVTable = patchedVTable;
+
+ return true;
+}
+
+static const char *addNewString(struct fileRecord *file,
+ const char *strname, int namelen)
+{
+ DataRef strings = 0;
+ const char *newStr;
+
+ namelen++; // Include terminating '\0';
+
+ // Make sure we have a string table as well for this symbol
+ if (file->fNewStringBlocks) {
+ DataRef *blockTable = (DataRef *) DataGetPtr(file->fNewStringBlocks);
+ int index = DataGetLength(file->fNewStringBlocks) / sizeof(DataRef*);
+ strings = blockTable[index - 1];
+ if (DataRemaining(strings) < namelen)
+ strings = 0;
+ }
+ else
+ {
+ file->fNewStringBlocks = DataCreate(0);
+ return_if(!file->fNewStringBlocks, NULL,
+ ("Unable to allocate new string table %s\n", file->fPath));
+ }
+
+ if (!strings) {
+ int size = (namelen + 1023) & ~1023;
+ if (size < 16 * 1024)
+ size = 16 * 1024;
+ strings = DataCreate(size);
+ return_if(!strings, NULL,
+ ("Unable to allocate new string block %s\n", file->fPath));
+ return_if(
+ !DataAppendBytes(file->fNewStringBlocks, &strings, sizeof(strings)),
+ false, ("Unable to allocate string table for %s\n", file->fPath));
+ }
+
+ newStr = DataGetEndPtr(strings);
+ DataAppendBytes(strings, strname, namelen);
+ return newStr;
+}
+
+// reloc->fPatch must contain a valid pointer
+static struct nlist *
+getNewSymbol(struct fileRecord *file,
+ const struct relocRecord *reloc, const char *supername)
+{
+ unsigned int size, i;
+ struct nlist **sym;
+ struct nlist *msym;
+ struct relocation_info *rinfo;
+ const char *newStr;
+
+ if (!file->fNewSymbols) {
+ file->fNewSymbols = DataCreate(0);
+ return_if(!file->fNewSymbols, NULL,
+ ("Unable to allocate new symbol table for %s\n", file->fPath));
+ }
+
+ rinfo = (struct relocation_info *) reloc->fRInfo;
+ size = DataGetLength(file->fNewSymbols) / sizeof(struct nlist *);
+ sym = (struct nlist **) DataGetPtr(file->fNewSymbols);
+ for (i = 0; i < size; i++, sym++) {
+ int symnum = i + file->fSymtab->nsyms;
+ newStr = symNameByIndex(file, symnum);
+ if (!strcmp(newStr, supername)) {
+ rinfo->r_symbolnum = symnum;
+ file->fSymbolsDirty = true;
+ return *sym;
+ }
+ }
+
+ // Assert that this is a vaild symbol. I need this condition to be true
+ // for the later code to make non-zero. So the first time through I'd
+ // better make sure that it is 0.
+ return_if(reloc->fSymbol->n_sect, NULL,
+ ("Undefined symbol entry with non-zero section %s:%s\n",
+ file->fPath, symbolname(file, reloc->fSymbol)));
+
+ // If we are here we didn't find the symbol so create a new one now
+ msym = (struct nlist *) malloc(sizeof(struct nlist));
+ return_if(!msym,
+ NULL, ("Unable to create symbol table entry for %s", file->fPath));
+ return_if(!DataAppendBytes(file->fNewSymbols, &msym, sizeof(msym)),
+ NULL, ("Unable to grow symbol table for %s\n", file->fPath));
+
+ newStr = addNewString(file, supername, strlen(supername));
+ if (!newStr)
+ return NULL;
+ // If we are here we didn't find the symbol so create a new one now
+ return_if(!DataAppendBytes(file->fSym2Strings, &newStr, sizeof(newStr)),
+ NULL, ("Unable to grow symbol table for %s\n", file->fPath));
+ file->fSymbToStringTable = (const char **) DataGetPtr(file->fSym2Strings);
+
+ // Offset the string index by the original string table size
+ // and negate the address to indicate that this is a 'new' symbol
+ msym->n_un.n_strx = -1;
+ msym->n_type = (N_EXT | N_UNDF);
+ msym->n_sect = NO_SECT;
+ msym->n_desc = 0;
+ msym->n_value = (unsigned long) newStr;
+
+ // Mark the old symbol as being potentially deletable I can use the
+ // n_sect field as the input symbol must be of type N_UNDF which means
+ // that the n_sect field must be set to NO_SECT otherwise it is an
+ // in valid input file.
+ ((struct nlist *) reloc->fSymbol)->n_un.n_strx
+ = -reloc->fSymbol->n_un.n_strx;
+ ((struct nlist *) reloc->fSymbol)->n_sect = (unsigned char) -1;
+
+ rinfo->r_symbolnum = i + file->fSymtab->nsyms;
+ file->fSymbolsDirty = true;
+ return msym;
+}
+
+static struct nlist *
+fixOldSymbol(struct fileRecord *file,
+ const struct relocRecord *reloc, const char *supername)
+{
+ unsigned int namelen;
+ struct nlist *sym = (struct nlist *) reloc->fSymbol;
+ const char *oldname = symbolname(file, sym);
+
+ // assert(sym->n_un.n_strx >= 0);
+
+ namelen = strlen(supername);
+
+ sym->n_un.n_strx = -sym->n_un.n_strx;
+ if (oldname && namelen < strlen(oldname))
+ {
+ // Overwrite old string in string table
+ strcpy((char *) oldname, supername);
+ file->fSymbolsDirty = true;
+ return sym;
+ }
+
+ oldname = addNewString(file, supername, namelen);
+ if (!oldname)
+ return NULL;
+
+ file->fSymbToStringTable[sym - file->fSymbolBase] = oldname;
+ file->fSymbolsDirty = true;
+ return sym;
+}
+
+static enum patchState
+symbolCompare(const struct fileRecord *file,
+ const struct nlist *classsym,
+ const char *supername)
+{
+ const char *classname;
+
+
+ // Check to see if the target function is locally defined
+ // if it is then we can assume this is a local vtable override
+ if ((classsym->n_type & N_TYPE) != N_UNDF)
+ return kSymbolLocal;
+
+ // Check to see if both symbols point to the same symbol name
+ // if so then we are still identical.
+ classname = symbolname(file, classsym);
+ if (!strcmp(classname, supername))
+ return kSymbolIdentical;
+
+ // We know that the target's vtable entry is different from the
+ // superclass' vtable entry. This means that we will have to apply a
+ // patch to the current entry, however before returning lets check to
+ // see if we have a _RESERVEDnnn field 'cause we can use this as a
+ // registration point that must align between vtables.
+ if (strstr(supername, kReservedNamePrefix))
+ return kSymbolMismatch;
+
+ // OK, we have a superclass difference where the superclass doesn't
+ // reference a pad function so assume that the superclass is correct.
+ if (strstr(classname, kReservedNamePrefix))
+ return kSymbolPadUpdate;
+ else
+ return kSymbolSuperUpdate;
+}
+
+static Boolean patchVTable(struct metaClassRecord *metaClass)
+{
+ struct metaClassRecord *super = NULL;
+ struct fileRecord *file;
+ struct patchRecord *patchedVTable;
+ struct relocRecord **curReloc, **vtableRelocs, **endSection;
+ unsigned char *sectionBase;
+ int classSize;
+
+ // Should never occur but it doesn't cost us anything to check.
+ if (metaClass->fPatchedVTable)
+ return true;
+
+ // Do we have a valid vtable to patch?
+ return_if(!metaClass->fVTableSym,
+ false, ("Internal error - no class vtable symbol?\n"));
+
+ file = metaClass->fFile;
+
+ // If the metaClass we are being to ask is in the kernel then we
+ // need to do a quick scan to grab the fPatchList in a reliable format
+ // however we don't need to check the superclass in the kernel
+ // as the kernel vtables are always correct wrt themselves.
+ // Note this ends the superclass chain recursion.
+ return_if(file->fIsKernel,
+ false, ("Internal error - patchVTable shouldn't used for kernel\n"));
+
+ if (!metaClass->fSuperName)
+ return false;
+
+ // The class isn't in the kernel so make sure that the super class
+ // is patched before patching ouselves.
+ super = getClass(sMergeMetaClasses, metaClass->fSuperName);
+ return_if(!super, false, ("Can't find superclass for %s : %s\n",
+ metaClass->fClassName, metaClass->fSuperName));
+
+ // Superclass recursion if necessary
+ if (!super->fPatchedVTable) {
+ Boolean res;
+
+ if (super->fFile->fIsKernel)
+ res = resolveKernelVTable(super);
+ else
+ res = patchVTable(super);
+ if (!res)
+ return false;
+ }
+
+ DEBUG_LOG(("Patching %s\n", metaClass->fClassName)); // @@@ gvdl:
+
+ // We are going to need the base and the end
+
+ sectionBase = getSectionForSymbol(file,
+ metaClass->fVTableSym, (void ***) &endSection);
+ if (-1 == (long) sectionBase)
+ return false;
+
+ vtableRelocs = (struct relocRecord **)
+ (sectionBase + metaClass->fVTableSym->n_value);
+ curReloc = vtableRelocs + kVTablePreambleLen;
+ for (classSize = 0; curReloc < endSection && *curReloc; classSize++)
+ curReloc++;
+
+ return_if(*curReloc, false,
+ ("%s isn't a valid kext, short section\n", file->fPath));
+
+ patchedVTable = (struct patchRecord *)
+ malloc((classSize + 1) * sizeof(struct patchRecord));
+ return_if(!patchedVTable, false, ("patchedVTable - no memory\n"));
+
+ do {
+ struct patchRecord *curPatch;
+ struct nlist *symbol;
+
+ curPatch = patchedVTable;
+ curReloc = vtableRelocs + kVTablePreambleLen;
+
+ // Grab the super table patches if necessary
+ // Can't be patching a kernel table as we don't walk super
+ // class chains in the kernel symbol space.
+ if (super && super->fPatchedVTable) {
+ const struct patchRecord *spp;
+
+ spp = super->fPatchedVTable;
+
+ for ( ; spp->fSymbol; curReloc++, spp++, curPatch++) {
+ const char *supername =
+ symbolname(super->fFile, spp->fSymbol);
+
+ symbol = (struct nlist *) (*curReloc)->fSymbol;
+
+ curPatch->fType = symbolCompare(file, symbol, supername);
+ switch (curPatch->fType) {
+ case kSymbolIdentical:
+ case kSymbolLocal:
+ break;
+
+ case kSymbolSuperUpdate:
+ symbol = getNewSymbol(file, (*curReloc), supername);
+ break;
+
+ case kSymbolPadUpdate:
+ symbol = fixOldSymbol(file, (*curReloc), supername);
+ break;
+
+ case kSymbolMismatch:
+ errprintf("%s is not compatible with its superclass, "
+ "%s superclass changed?\n",
+ metaClass->fClassName, super->fClassName);
+ goto abortPatch;
+
+ default:
+ errprintf("Internal error - unknown patch type\n");
+ goto abortPatch;
+ }
+ if (symbol) {
+ curPatch->fSymbol = symbol;
+ (*curReloc)->fSymbol = symbol;
+ }
+ else
+ goto abortPatch;
+ }
+ }
+
+ // Copy the remainder of this class' vtable into the patch table
+ for (; *curReloc; curReloc++, curPatch++) {
+ // Local reloc symbols
+ curPatch->fType = kSymbolLocal;
+ curPatch->fSymbol = (struct nlist *) (*curReloc)->fSymbol;
+ }
+
+ // Tag the end of the patch vtable
+ curPatch->fSymbol = NULL;
+
+ metaClass->fPatchedVTable = patchedVTable;
+ return true;
+ } while(0);
+
+abortPatch:
+ if (patchedVTable)
+ free(patchedVTable);
+
+ return false;
+}
+
+static Boolean growImage(struct fileRecord *file, vm_size_t delta)
+{
+#if !KERNEL
+ file->fMachOSize += delta;
+ return (file->fMachO + file->fMachOSize <= file->fPadEnd);
+#else /* KERNEL */
+ vm_address_t startMachO, endMachO, endMap;
+ vm_offset_t newMachO;
+ vm_size_t newsize;
+ unsigned long i, last = 0;
+ struct metaClassRecord **classes = NULL;
+ struct sectionRecord *section;
+ kern_return_t ret;
+
+ startMachO = (vm_address_t) file->fMachO;
+ endMachO = startMachO + file->fMachOSize + delta;
+ endMap = (vm_address_t) file->fMap + file->fMapSize;
+
+ // Do we have room in the current mapped image
+ if (endMachO < round_page(endMap)) {
+ file->fMachOSize += delta;
+ return true;
+ }
+
+ newsize = endMachO - startMachO;
+ if (newsize < round_page(file->fMapSize)) {
+ DEBUG_LOG(("Growing image %s by moving\n", file->fPath));
+
+ // We have room in the map if we shift the macho image within the
+ // current map. We will have to patch up pointers into the object.
+ newMachO = (vm_offset_t) file->fMap;
+ bcopy((char *) startMachO, (char *) newMachO, file->fMachOSize);
+ }
+ else if (file->fIsKmem) {
+ // kmem_alloced mapping so we can try a kmem_realloc
+ ret = kmem_realloc(kernel_map,
+ (vm_address_t) file->fMap,
+ (vm_size_t) file->fMapSize,
+ &newMachO,
+ newsize);
+ if (KERN_SUCCESS != ret)
+ return false;
+
+ // If the mapping didn't move then just return
+ if ((vm_address_t) file->fMap == newMachO) {
+ file->fMachOSize = file->fMapSize = newsize;
+ return true;
+ }
+
+ DEBUG_LOG(("Growing image %s by reallocing\n", file->fPath));
+ // We have relocated the kmem image so we are going to have to
+ // move all of the pointers into the image around.
+ }
+ else {
+ DEBUG_LOG(("Growing image %s by allocating\n", file->fPath));
+ // The image doesn't have room for us and I can't kmem_realloc
+ // then I just have to bite the bullet and copy the object code
+ // into a bigger memory segment
+ ret = kmem_alloc(kernel_map, &newMachO, newsize);
+
+ if (KERN_SUCCESS != ret)
+ return false;
+ bcopy((char *) startMachO, (void *) newMachO, file->fMachOSize);
+ file->fIsKmem = true;
+ }
+
+
+ file->fMap = file->fMachO = (unsigned char *) newMachO;
+ file->fMapSize = newsize;
+ file->fMachOSize += delta; // Increment the image size
+
+ // If we are here then we have shifted the object image in memory
+ // I really should change all of my pointers into the image to machO offsets
+ // but I have run out of time. So I'm going to very quickly go over the
+ // cached data structures and add adjustments to the addresses that are
+ // affected. I wonder how long it will take me to get them all.
+ //
+ // For every pointer into the MachO I need to add an adjustment satisfying
+ // the following simultanous equations
+ // addr_old = macho_old + fixed_offset
+ // addr_new = macho_new + fixed_offset therefore:
+ // addr_new = addr_old + (macho_new - macho_old)
+#define REBASE(addr, delta) ( ((vm_address_t) (addr)) += (delta) )
+ delta = newMachO - startMachO;
+
+ // Rebase the cached-in object 'struct symtab_command' pointer
+ REBASE(file->fSymtab, delta);
+
+ // Rebase the cached-in object 'struct nlist' pointer for all symbols
+ REBASE(file->fSymbolBase, delta);
+
+ // Rebase the cached-in object 'struct nlist' pointer for local symbols
+ REBASE(file->fLocalSyms, delta);
+
+ // Rebase the cached-in object 'char' pointer for the string table
+ REBASE(file->fStringBase, delta);
+
+ // Ok now we have to go over all of the relocs one last time
+ // to clean up the pad updates which had their string index negated
+ // to indicate that we have finished with them.
+ section = file->fSections;
+ for (i = 0, last = file->fNSects; i < last; i++, section++)
+ REBASE(section->fSection, delta);
+
+ // We only ever grow images that contain class lists so dont bother
+ // the check if file->fClassList is non-zero 'cause it can't be
+ // assert(file->fClassList);
+ last = DataGetLength(file->fClassList)
+ / sizeof(struct metaClassRecord *);
+ classes = (struct metaClassRecord **) DataGetPtr(file->fClassList);
+ for (i = 0; i < last; i++) {
+ struct patchRecord *patch;
+
+ for (patch = classes[i]->fPatchedVTable; patch->fSymbol; patch++) {
+ vm_address_t symAddr = (vm_address_t) patch->fSymbol;
+
+ // Only need to rebase if the symbol is part of the image
+ // If this is a new symbol then it was independantly allocated
+ if (symAddr >= startMachO && symAddr < endMachO)
+ REBASE(patch->fSymbol, delta);
+ }
+ }
+
+ // Finally rebase all of the string table pointers
+ last = file->fSymtab->nsyms;
+ for (i = 0; i < last; i++)
+ REBASE(file->fSymbToStringTable[i], delta);
+
+#undef REBASE
+
+ return true;
+
+#endif /* KERNEL */
+}
+
+static Boolean
+prepareFileForLink(struct fileRecord *file)
+{
+ unsigned long i, last, numnewsyms, newsymsize, newstrsize;
+ struct sectionRecord *section;
+ struct nlist **symp, *sym;
+ DataRef newStrings, *stringBlocks;
+
+ // If we didn't even do a pseudo 'relocate' and dirty the image
+ // then we can just return now.
+ if (!file->fImageDirty)
+ return true;
+
+DEBUG_LOG(("Linking 2 %s\n", file->fPath)); // @@@ gvdl:
+
+ // We have to go over all of the relocs to repair the damage
+ // that we have done to the image when we did our 'relocation'
+ section = file->fSections;
+ for (i = 0, last = file->fNSects; i < last; i++, section++) {
+ unsigned char *sectionBase;
+ struct relocRecord *rec;
+ unsigned long j, nreloc;
+
+ if (section->fRelocCache) {
+ sectionBase = file->fMachO + section->fSection->offset;
+ nreloc = section->fSection->nreloc;
+ rec = (struct relocRecord *) DataGetPtr(section->fRelocCache);
+
+ // We will need to repair the reloc list
+ for (j = 0; j < nreloc; j++, rec++) {
+ void **entry;
+ struct nlist *sym;
+
+ // Repair Damage to object image
+ entry = (void **) (sectionBase + rec->fRInfo->r_address);
+ *entry = rec->fValue;
+
+ // Check if the symbol that this relocation entry points
+ // to is marked as erasable
+ sym = (struct nlist *) rec->fSymbol;
+ if (sym && sym->n_type == (N_EXT | N_UNDF)
+ && sym->n_sect == (unsigned char) -1) {
+ // It is in use so we better clear the mark
+ sym->n_un.n_strx = -sym->n_un.n_strx;
+ sym->n_sect = NO_SECT;
+ }
+ }
+
+ // Clean up the fRelocCache we don't need it any more.
+ DataRelease(section->fRelocCache);
+ section->fRelocCache = 0;
+ }
+ }
+ file->fImageDirty = false; // Image is clean
+
+ // If we didn't dirty the symbol table then just return
+ if (!file->fSymbolsDirty)
+ return true;
+
+ // calculate total file size increase and check against padding
+ if (file->fNewSymbols) {
+ numnewsyms = DataGetLength(file->fNewSymbols);
+ symp = (struct nlist **) DataGetPtr(file->fNewSymbols);
+ }
+ else {
+ numnewsyms = 0;
+ symp = 0;
+ }
+ numnewsyms /= sizeof(struct nlist *);
+ file->fSymtab->nsyms += numnewsyms;
+
+ // old sting size + 30% rounded up to nearest page
+ newstrsize = file->fSymtab->strsize * 21 / 16;
+ newstrsize = (newstrsize + PAGE_MASK) & ~PAGE_MASK;
+ newStrings = DataCreate(newstrsize);
+ return_if(!newStrings, false,
+ ("Unable to allocate a copy aside buffer, no memory\n"));
+
+ newsymsize = numnewsyms * sizeof(struct nlist);
+ file->fStringBase += newsymsize;
+ file->fSymtab->stroff += newsymsize;
+
+ last = file->fSymtab->nsyms - numnewsyms;
+ newstrsize = 0;
+ DataAppendBytes(newStrings, &newstrsize, 4); // Leading nuls
+ sym = file->fSymbolBase;
+
+ // Pre-compute an already offset new symbol pointer. The offset is the
+ // orignal symbol table.
+ symp -= last;
+ for (i = 0; i < file->fSymtab->nsyms; i++, sym++) {
+ const char *str = symNameByIndex(file, i);
+ int len = strlen(str) + 1;
+ unsigned int strx;
+
+ // Rebase sym in the new symbol region
+ if (i >= last)
+ sym = symp[i];
+
+ if (sym->n_un.n_strx < 0 && sym->n_type == (N_EXT | N_UNDF)
+ && (unsigned char) -1 == sym->n_sect) {
+ // after patching we find that this symbol is no longer in
+ // use. So invalidate it by converting it into an N_ABS
+ // symbol, remove the external bit and null out the name.
+ bzero(sym, sizeof(*sym));
+ sym->n_type = N_ABS;
+ }
+ else {
+ // Repair the symbol for the getNewSymbol case.
+ if (-1 == sym->n_un.n_strx)
+ sym->n_value = 0;
+
+ // Record the offset of the string in the new table
+ strx = DataGetLength(newStrings);
+ return_if(!DataAppendBytes(newStrings, str, len), false,
+ ("Unable to append string, no memory\n"));
+
+ sym->n_un.n_strx = strx;
+ file->fSymbToStringTable[i] = file->fStringBase + strx;
+ }
+ }
+
+ // Don't need the new strings any more
+ last = DataGetLength(file->fNewStringBlocks) / sizeof(DataRef);
+ stringBlocks = (DataRef *) DataGetPtr(file->fNewStringBlocks);
+ for (i = 0; i < last; i++)
+ DataRelease(stringBlocks[i]);
+
+ DataRelease(file->fNewStringBlocks);
+ file->fNewStringBlocks = 0;
+
+ newstrsize = DataGetLength(newStrings);
+ newstrsize = (newstrsize + 3) & ~3; // Round to nearest word
+ return_if(
+ !growImage(file, newsymsize + newstrsize - file->fSymtab->strsize),
+ false, ("Unable to patch the extension, no memory\n", file->fPath));
+
+ // Push out the new symbol table if necessary
+ if (numnewsyms) {
+ caddr_t base;
+
+ // Append the new symbols to the original symbol table.
+ base = (caddr_t) file->fSymbolBase
+ + (file->fSymtab->nsyms - numnewsyms) * sizeof(struct nlist);
+ symp = (struct nlist **) DataGetPtr(file->fNewSymbols);
+ for (i = 0; i < numnewsyms; i++, base += sizeof(struct nlist), symp++)
+ bcopy(*symp, base, sizeof(struct nlist));
+
+ DataRelease(file->fNewSymbols);
+ file->fNewSymbols = 0;
+ }
+
+ // Push out the new string table if necessary
+ if (newStrings) {
+ unsigned long *base = (unsigned long *) file->fStringBase;
+ unsigned long actuallen = DataGetLength(newStrings);
+
+ // Set the last word in string table to zero before copying data
+ base[(newstrsize / sizeof(unsigned long)) - 1] = 0;
+
+ // Now copy the new strings back to the end of the file
+ bcopy((caddr_t) DataGetPtr(newStrings), file->fStringBase, actuallen);
+
+ file->fSymtab->strsize = newstrsize;
+
+ DataRelease(newStrings);
+ }
+
+ file->fSymbolsDirty = false;
+
+ return true;
+}
+
+Boolean
+#if KERNEL
+kld_file_map(const char *pathName,
+ unsigned char *map,
+ size_t mapSize,
+ Boolean isKmem)
+#else
+kld_file_map(const char *pathName)
+#endif /* KERNEL */
+{
+ struct fileRecord file, *fp = 0;
+
+ // Already done no need to repeat
+ fp = getFile(pathName);
+ if (fp)
+ return true;
+
+ bzero(&file, sizeof(file));
+
+#if KERNEL
+ file.fMap = map;
+ file.fMapSize = mapSize;
+ file.fIsKmem = isKmem;
+#else
+ if (!mapObjectFile(&file, pathName))
+ return false;
+#endif /* KERNEL */
+
+ do {
+ const struct machOMapping {
+ struct mach_header h;
+ struct load_command c[1];
+ } *machO;
+ const struct load_command *cmd;
+ int i;
+
+ if (!findBestArch(&file, pathName))
+ break;
+
+ machO = (const struct machOMapping *) file.fMachO;
+ if (file.fMachOSize < machO->h.sizeofcmds)
+ break;
+
+ file.fIsKernel = (MH_EXECUTE == machO->h.filetype);
+
+ // If the file type is MH_EXECUTE then this must be a kernel
+ // as all Kernel extensions must be of type MH_OBJECT
+ for (i = 0, cmd = &machO->c[0]; i < machO->h.ncmds; i++) {
+ if (cmd->cmd == LC_SYMTAB)
+ file.fSymtab = (struct symtab_command *) cmd;
+ else if (cmd->cmd == LC_SEGMENT) {
+ struct segment_command *seg = (struct segment_command *) cmd;
+ int nsects = seg->nsects;
+
+ if (nsects)
+ return_if(!parseSegments(&file, seg),
+ false, ("%s isn't a valid mach-o, bad segment",
+ pathName));
+ else if (file.fIsKernel) {
+#if KERNEL
+ // We don't need to look for the LinkEdit segment unless
+ // we are running in the kernel environment.
+ if (!strcmp(kLinkEditSegName, seg->segname))
+ file.fLinkEditSeg = seg;
+#endif
+ }
+ }
+
+ cmd = (struct load_command *) ((UInt8 *) cmd + cmd->cmdsize);
+ }
+ break_if(!file.fSymtab,
+ ("%s isn't a valid mach-o, no symbols\n", pathName));
+
+ if (!parseSymtab(&file, pathName))
+ break;
+
+ fp = addFile(&file, pathName);
+ if (!fp)
+ break;
+
+ if (file.fFoundOSObject && !getMetaClassGraph(fp))
+ break;
+
+ if (file.fIsKernel)
+ sKernelFile = fp;
+
+#if KERNEL
+ // Automatically load the kernel's link edit segment if we are
+ // attempting to load a driver.
+ if (!sKernelFile) {
+ extern struct mach_header _mh_execute_header;
+ extern struct segment_command *getsegbyname(char *seg_name);
+
+ struct segment_command *sg;
+ size_t kernelSize;
+ Boolean ret;
+
+ sg = (struct segment_command *) getsegbyname(kLinkEditSegName);
+ break_if(!sg, ("Can't find kernel link edit segment\n"));
+
+ kernelSize = sg->vmaddr + sg->vmsize - (size_t) &_mh_execute_header;
+ ret = kld_file_map(kld_basefile_name,
+ (unsigned char *) &_mh_execute_header, kernelSize,
+ /* isKmem */ false);
+ break_if(!ret, ("kld can't map kernel file"));
+ }
+#endif /* KERNEL */
+
+ return true;
+ } while(0);
+
+ // Failure path, then clean up
+ if (fp)
+ // @@@ gvdl: for the time being leak the file ref in the file table
+ removeFile(fp);
+ else
+ unmapFile(&file);
+
+ return false;
+}
+
+void *kld_file_getaddr(const char *pathName, long *size)
+{
+ struct fileRecord *file = getFile(pathName);
+
+ if (!file)
+ return 0;
+
+ if (size)
+ *size = file->fMachOSize;
+
+ return file->fMachO;
+}
+
+void *kld_file_lookupsymbol(const char *pathName, const char *symname)
+{
+ struct fileRecord *file = getFile(pathName);
+ const struct nlist *sym;
+ const struct section *section;
+ unsigned char *sectionBase;
+ unsigned char sectind;
+
+ return_if(!file,
+ NULL, ("Unknown file %s\n", pathName));
+
+ sym = findSymbolByName(file, symname);
+
+ // May be a non-extern symbol so look for it there
+ if (!sym) {
+ unsigned int i, nsyms;
+
+ sym = file->fSymbolBase;
+ for (i = 0, nsyms = file->fSymtab->nsyms; i < nsyms; i++, sym++) {
+ if ( (sym->n_type & N_EXT) ) {
+ sym = 0;
+ break; // Terminate search when we hit an extern
+ }
+ if ( (sym->n_type & N_STAB) )
+ continue;
+ if ( !strcmp(symname, symNameByIndex(file, i)) )
+ break;
+ }
+ }
+
+ return_if(!sym,
+ NULL, ("Unknown symbol %s in %s\n", symname, pathName));
+
+ // Is the vtable in a valid section?
+ sectind = sym->n_sect;
+ return_if(sectind == NO_SECT || sectind > file->fNSects, NULL,
+ ("Malformed object file, invalid section reference for %s in %s\n",
+ symname, pathName));
+
+ section = file->fSections[sectind - 1].fSection;
+ sectionBase = file->fMachO + section->offset - section->addr;
+
+ return (void *) (sectionBase + sym->n_value);
+}
+
+Boolean kld_file_merge_OSObjects(const char *pathName)
+{
+ struct fileRecord *file = getFile(pathName);
+
+ return_if(!file,
+ false, ("Internal error - unable to find file %s\n", pathName));
+
+ return mergeOSObjectsForFile(file);
+}
+
+Boolean kld_file_patch_OSObjects(const char *pathName)
+{
+ struct fileRecord *file = getFile(pathName);
+ struct metaClassRecord **classes;
+ unsigned long i, last;
+
+ return_if(!file,
+ false, ("Internal error - unable to find file %s\n", pathName));
+
+ DEBUG_LOG(("Patch file %s\n", pathName)); // @@@ gvdl:
+
+ // If we don't have any classes we can return now.
+ if (!file->fClassList)
+ return true;
+
+ // If we haven't alread merged the kernel then do it now
+ if (!sMergedKernel && sKernelFile)
+ mergeOSObjectsForFile(sKernelFile);
+ return_if(!sMergedKernel, false, ("Internal error no kernel?\n"));
+
+ if (!mergeOSObjectsForFile(file))
+ return false;
+
+ // Patch all of the classes in this executable
+ last = DataGetLength(file->fClassList) / sizeof(void *);
+ classes = (struct metaClassRecord **) DataGetPtr(file->fClassList);
+ for (i = 0; i < last; i++) {
+ if (!patchVTable(classes[i]))
+ return false;
+ }
+
+ return true;
+}
+
+Boolean kld_file_prepare_for_link()
+{
+ if (sMergedFiles) {
+ unsigned long i, nmerged = 0;
+ struct fileRecord **files;
+
+ // Check to see if we have already merged this file
+ nmerged = DataGetLength(sMergedFiles) / sizeof(struct fileRecord *);
+ files = (struct fileRecord **) DataGetPtr(sMergedFiles);
+ for (i = 0; i < nmerged; i++) {
+ if (!prepareFileForLink(files[i]))
+ return false;
+ }
+ }
+
+ // Clear down the meta class table and merged file lists
+ DataRelease(sMergeMetaClasses);
+ DataRelease(sMergedFiles);
+ sMergedFiles = sMergeMetaClasses = NULL;
+ sMergedKernel = false;
+
+ return true;
+}
+
+void kld_file_cleanup_all_resources()
+{
+ unsigned long i, nfiles;
+
+#if KERNEL // @@@ gvdl:
+ // Debugger("kld_file_cleanup_all_resources");
+#endif
+
+ if (!sFilesTable || !(nfiles = DataGetLength(sFilesTable)))
+ return; // Nothing to do just return now
+
+ nfiles /= sizeof(struct fileRecord *);
+ for (i = 0; i < nfiles; i++)
+ removeFile(((void **) DataGetPtr(sFilesTable))[i]);
+
+ DataRelease(sFilesTable);
+ sFilesTable = NULL;
+
+ // Don't really have to clean up anything more as the whole
+ // malloc engine is going to be released and I couldn't be bothered.
+}
+
+
+#if !KERNEL
+#if 0
+static const struct fileRecord *sortFile;
+static int symCompare(const void *vSym1, const void *vSym2)
+{
+ const struct nlist *sym1 = vSym1;
+ const struct nlist *sym2 = vSym2;
+
+ {
+ unsigned int ind1, ind2;
+
+ ind1 = sym1->n_type & N_TYPE;
+ ind2 = sym2->n_type & N_TYPE;
+ if (ind1 != ind2) {
+ // if sym1 is undefined then sym1 must come later than sym2
+ if (ind1 == N_UNDF)
+ return 1;
+ // if sym2 is undefined then sym1 must come earlier than sym2
+ if (ind2 == N_UNDF)
+ return -1;
+ /* drop out if neither are undefined */
+ }
+ }
+
+ {
+ const struct fileRecord *file = sortFile;
+ const char *name1, *name2;
+
+ name1 = file->fStringBase + sym1->n_un.n_strx;
+ name2 = file->fStringBase + sym2->n_un.n_strx;
+ return strcmp(name1, name2);
+ }
+}
+#endif /* 0 */
+
+Boolean kld_file_debug_dump(const char *pathName, const char *outName)
+{
+ const struct fileRecord *file = getFile(pathName);
+ int fd;
+ Boolean ret = false;
+
+ return_if(!file, false, ("Unknown file %s for dumping\n", pathName));
+
+ fd = open(outName, O_WRONLY|O_CREAT|O_TRUNC, 0666);
+ return_if(-1 == fd, false, ("Can't create output file %s - %s(%d)\n",
+ outName, strerror(errno), errno));
+
+ do {
+#if 0
+ // Sorting doesn't work until I fix the relocs too?
+
+ // sort the symbol table appropriately
+ unsigned int nsyms = file->fSymtab->nsyms
+ - (file->fLocalSyms - file->fSymbolBase);
+ sortFile = file;
+ heapsort((void *) file->fLocalSyms, nsyms, sizeof(struct nlist),
+ symCompare);
+#endif
+
+ break_if(-1 == write(fd, file->fMachO, file->fMachOSize),
+ ("Can't dump output file %s - %s(%d)\n",
+ outName, strerror(errno), errno));
+ ret = true;
+ } while(0);
+
+ close(fd);
+
+ return ret;
+}
+
+#endif /* !KERNEL */
+
--- /dev/null
+/*
+ * Copyright (c) 2001 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * History:
+ * 2001-05-30 gvdl Initial implementation of the vtable patcher.
+ */
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#if KERNEL
+extern Boolean kld_file_map(const char *pathName,
+ unsigned char *map, size_t mapSize,
+ Boolean isKmem);
+#else
+extern Boolean kld_file_map(const char *pathName);
+
+extern void *
+ kld_file_lookupsymbol(const char *pathName, const char *symbolname);
+
+Boolean kld_file_debug_dump(const char *pathName, const char *outName);
+#endif /* KERNEL */
+
+extern void *kld_file_getaddr(const char *pathName, long *size);
+
+extern Boolean kld_file_merge_OSObjects(const char *pathName);
+
+extern Boolean kld_file_patch_OSObjects(const char *pathName);
+
+extern Boolean kld_file_prepare_for_link();
+
+extern void kld_file_cleanup_all_resources();
+
+__END_DECLS
--- /dev/null
+.\"
+.\" Copyright (c) 1997 Doug Rabson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: kmodload.8,v 1.4 2002/01/30 22:44:21 lindak Exp $
+.\"
+.Dd April 8, 1999
+.Dt KMODLOAD 8
+.Os FreeBSD
+.Sh NAME
+.Nm kmodload
+.Nd loads and starts a kernel module
+.Sh SYNOPSIS
+.Nm kmodload
+.Op Fl v
+.Op Fl k Ar kernel_file
+.Op Fl d Ar dependency_file
+.Op Fl o Ar symbol_file
+.Ar module_file
+.Sh DESCRIPTION
+.Nm kmodload
+is deprecated; use
+.Xr kextload 8 ,
+instead.
+.Pp
+The
+.Nm kmodload
+command loads the file
+.Ar module_file
+into the kernel and starts its execution.
+.Pp
+The following options are available:
+.Bl -tag -width indent
+.\" ==========
+.It Fl d Ar dependency_file
+Add symbols from
+.Ar dependency_file
+to kernel symbols, prior to linking of
+.Ar module_file .
+The file
+.Ar dependency_file
+must already be loaded.
+.\" ==========
+.It Fl k Ar kernel_file
+Use an alternate file
+.Ar kernel_file ,
+instead of the default file (/mach), for linking
+.Ar module_file .
+.\" ==========
+.It Fl o Ar symbol_file
+Create a file named
+.Ar symbol_file
+that contains statically-linked output suitable
+for remote debugging use with
+.Xr gdb 1 .
+.\" ==========
+.It Fl v
+Be more verbose.
+.El
+.Sh FILES
+.Bl -tag -width /modules -compact
+.It Pa /System/Library/Extensions
+directory containing loadable kernel modules.
+.Sh DIAGNOSTICS
+The
+.Nm kmodload
+utility exits with a status of 0 on success.
+A status of 1 indicates a usage error.
+A status of 2 indicates a indicates a permissions error.
+A status of 3 indicates a problem with linking the module.
+A status of 4 indicates a internal or system error.
+A status of 5 indicates the module has already been loaded.
+.Sh SEE ALSO
+.Xr gdb 1 ,
+.Xr kmodstat 8 ,
+.Xr kmodsyms 8 ,
+.Xr kmodunload 8
+.Sh HISTORY
+The
+.Nm kmodload
+command is based on the command kldload written by
+.An Doug Rabson Aq dfr@FreeBSD.org
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1997 Doug Rabson
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Original code from:
+ * "kldload.c,v 1.5 1998/07/06 06:58:32 charnier Exp"
+ */
+#ifndef lint
+static const char rcsid[] =
+ "$Id: kmodload.c,v 1.14 2002/04/15 20:28:30 lindak Exp $";
+#endif /* not lint */
+
+#include <stdlib.h>
+#include <err.h>
+#include <sys/file.h>
+#include <nlist.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+
+#include <paths.h>
+
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/mach_host.h>
+#include <mach-o/kld.h>
+#include <mach-o/fat.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#include "kld_patch.h"
+#include "vers_rsrc.h"
+
+#define KMOD_ERROR_USAGE 1
+#define KMOD_ERROR_PERMS 2
+#define KMOD_ERROR_LOADING 3
+#define KMOD_ERROR_INTERNAL 4
+#define KMOD_ERROR_ALREADY 5
+
+#define kKMOD_INFO_SYMBOLNAME "_kmod_info"
+#define kKmodsymsName "kmodsyms"
+
+static mach_port_t kernel_port;
+static mach_port_t kernel_priv_port;
+
+static kmod_info_t *module_dependencies = 0;
+static vm_address_t kernel_alloc_address = 0;
+static unsigned long kernel_alloc_size = 0;
+static vm_address_t kernel_load_address = 0;
+static unsigned long kernel_load_size = 0;
+static unsigned long kernel_hdr_size = 0;
+static unsigned long kernel_hdr_pad = 0;
+static unsigned long faked_kernel_load_address = 0;
+
+static kmod_info_t *loaded_modules = 0;
+static int loaded_count = 0;
+
+static char *progname = "program name?";
+static int kmodsyms = 0;
+static int link_addrs_set = 0;
+static int verbose = 0;
+
+static char *debugdumpfile = NULL;
+
+// must not be static; kld library calls
+extern void kld_error_vprintf(const char *format, va_list ap);
+static void e_printf(const char *fmt, ...);
+static void v_printf(const char *fmt, ...);
+
+static void machwarn(int error, const char *message);
+static void macherr(int error, const char *message);
+
+static unsigned long linkedit_address(unsigned long size,
+ unsigned long headers_size);
+static void abort_load(int exitcode, const char *fmt, ...);
+static void map_and_patch(const char *base,
+ const char **library_paths,
+ const char *module);
+static void link_base(const char *base,
+ const char **dependency_paths,
+ const vm_address_t *dependency_addrs);
+static void clear_globals(void);
+static kmod_info_t *map_module(const char *filename);
+static struct mach_header *link_module(const char *filename,
+ const char *output);
+static vm_address_t update_kmod_info(struct mach_header *mach_header);
+static kmod_t load_module(struct mach_header *mach_header,
+ vm_address_t info);
+static void set_module_dependencies(kmod_t id);
+static void start_module(kmod_t id);
+
+static void
+usage(void)
+{
+ if (kmodsyms) {
+ fprintf(stderr, "usage: %s [-v] [-k kernelfile] [-d dependencyfile] -o symbolfile modulefile\n", progname);
+ fprintf(stderr, " %s [-v] -k kernelfile [-d dependencyfile@address] -o symbolfile modulefile@address\n",
+ progname);
+ } else {
+ fprintf(stderr, "usage: %s [-v] [-k kernelfile] [-d dependencyfile] [-o symbolfile] modulefile\n", progname);
+ }
+ fflush(stderr);
+ exit(KMOD_ERROR_USAGE);
+}
+
+int
+main(int argc, char** argv)
+{
+ int c, r, i;
+ char * kernel = _PATH_UNIX;
+ int kernel_set = 0;
+ char * gdbfile = 0;
+#define MAX_DEPENDANCIES 128
+ char * dependencies[MAX_DEPENDANCIES];
+ vm_address_t loaded_addresses[MAX_DEPENDANCIES];
+ int dependency_count = 0;
+ struct mach_header *rld_header;
+
+ char * module_path = "";
+ vm_address_t module_info = 0;
+ vm_address_t module_faked_address = 0;
+ kmod_t module_id = 0;
+ kmod_info_t *file_kinfo;
+
+ if ((progname = strrchr(argv[0], '/')) == NULL)
+ progname = argv[0];
+ else
+ ++progname;
+
+ kmodsyms = !strcmp(progname, kKmodsymsName);
+
+ fprintf(stderr, "%s is deprecated; use kextload(8) instead\n", progname);
+ sleep(5);
+
+ // XXX things to add:
+ // -p data string to send as outofband data on start
+ // -P data file to send as outofband data on start
+
+ while ((c = getopt(argc, argv, "D:d:o:k:v")) != -1)
+ switch (c) {
+ case 'd':
+ dependencies[dependency_count] = optarg;
+ if (kmodsyms) {
+ char *address;
+ if ((address = strrchr(optarg, '@'))) {
+ *address++ = 0;
+ loaded_addresses[dependency_count] = strtoul(address, NULL, 0);
+ link_addrs_set++;
+ } else {
+ loaded_addresses[dependency_count] = 0;
+ }
+ }
+ if (++dependency_count == MAX_DEPENDANCIES) {
+ abort_load(KMOD_ERROR_INTERNAL,
+ "internal error, dependency count overflow.");
+ }
+ break;
+ case 'o':
+ gdbfile = optarg;
+ break;
+ case 'k':
+ kernel_set++;
+ kernel = optarg;
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ case 'D':
+ debugdumpfile = optarg;
+ break;
+ default:
+ usage();
+ }
+ argc -= optind;
+ argv += optind;
+
+ dependencies[dependency_count] = 0;
+ loaded_addresses[dependency_count] = 0;
+
+ if (argc != 1) usage();
+
+ module_path = argv[0];
+
+ if (kmodsyms) {
+ char *address;
+
+ if (!gdbfile) usage();
+
+ // check for @address
+ if ((address = strrchr(module_path, '@'))) {
+ *address++ = 0;
+ module_faked_address = strtoul(address, NULL, 0);
+ link_addrs_set++;
+ } else {
+ module_faked_address = 0;
+ }
+
+ // if any arg uses @address then they all must be and the kernel must be set
+ if (link_addrs_set) {
+ if (!kernel_set) usage();
+ if (!module_faked_address) usage();
+ for (i=0; i < dependency_count; i++) {
+ if (!loaded_addresses[i]) usage();
+ }
+ }
+ }
+
+ // map the module if possible, map_module will fail if there is a problem
+ file_kinfo = map_module(module_path);
+
+ if (!link_addrs_set) {
+ kmod_info_t *k;
+
+ // we only need the kernel port if we need to lookup loaded kmods
+ r = task_for_pid(mach_task_self(), 0, &kernel_port);
+ machwarn(r, "unable to get kernel task port");
+ if (KERN_SUCCESS != r) {
+ abort_load(KMOD_ERROR_PERMS,
+ "You must be running as root to load modules in the kernel.");
+ }
+
+ //get loaded modules
+ r = kmod_get_info(kernel_port, (void *)&loaded_modules, &loaded_count); // never freed
+ macherr(r, "kmod_get_info() failed");
+
+ // check to see if the module has been loaded
+ k = loaded_modules;
+ while (k) {
+ if (!strcmp(k->name, file_kinfo->name)) {
+ if (!kmodsyms) {
+ abort_load(KMOD_ERROR_ALREADY,
+ "the module named '%s' is already loaded.", k->name);
+ } else {
+ module_faked_address = k->address;
+ }
+ break;
+ }
+ k = (k->next) ? (k + 1) : 0;
+ }
+
+ if (kmodsyms && !module_faked_address) {
+ abort_load(KMOD_ERROR_USAGE,
+ "the module named '%s' has not been loaded.", file_kinfo->name);
+ }
+
+ //XXX it would be nice to be able to verify this is the correct kernel
+ //XXX by comparing the kernel version strings (once we have them)
+ }
+
+ map_and_patch(kernel, dependencies, module_path);
+
+ // Tell the kld linker where to get its load address from
+ kld_address_func(linkedit_address);
+
+ // link the kernel along with any dependencies
+ link_base(kernel, dependencies, loaded_addresses);
+
+ if (kmodsyms) {
+ faked_kernel_load_address = module_faked_address;
+
+ if (!faked_kernel_load_address) {
+ abort_load(KMOD_ERROR_INTERNAL,
+ "internal error, fell thru without setting module load address.");
+ }
+ }
+
+ rld_header = link_module(module_path, gdbfile);
+ module_info = update_kmod_info(rld_header);
+
+ if (debugdumpfile)
+ kld_file_debug_dump(module_path, debugdumpfile);
+
+ if (kmodsyms) return 0;
+
+ // we need the priv port to load modules into the kernel
+ kernel_priv_port = mach_host_self(); /* if we are privileged */
+
+ module_id = load_module(rld_header, module_info);
+ set_module_dependencies(module_id);
+ start_module(module_id);
+
+ return 0;
+}
+
+static void
+machwarn(int error, const char *message)
+{
+ if (KERN_SUCCESS != error)
+ e_printf("%s: %s", message, mach_error_string(error));
+}
+
+static void
+macherr(int error, const char *message)
+{
+ if (KERN_SUCCESS != error)
+ abort_load(KMOD_ERROR_INTERNAL,
+ "%s: %s", message, mach_error_string(error));
+}
+
+static kmod_info_t *map_module(const char *filename)
+{
+ kmod_info_t *file_kinfo;
+
+ if (!kld_file_map(filename))
+ exit(KMOD_ERROR_LOADING);
+
+ file_kinfo = kld_file_lookupsymbol(filename, kKMOD_INFO_SYMBOLNAME);
+ if (!file_kinfo) {
+ abort_load(KMOD_ERROR_USAGE,
+ "%s is not a valid kernel module.", filename);
+ }
+
+ return file_kinfo;
+}
+
+static void
+map_and_patch(const char *base, const char **library_paths, const char *module)
+{
+ if (!kld_file_map(base))
+ exit(KMOD_ERROR_INTERNAL);
+ if (!kld_file_merge_OSObjects(base))
+ abort_load(KMOD_ERROR_LOADING, NULL);
+
+ if (*library_paths) {
+ char **library;
+ for (library = library_paths; *library; library++) {
+ map_module(*library);
+ if (!kld_file_patch_OSObjects(*library))
+ abort_load(KMOD_ERROR_LOADING, NULL);
+ }
+ }
+
+ // Patch the vtables of the object module we are about to load
+ // The module has already been mapped in the main() routine as part
+ // of validation
+ if (!kld_file_patch_OSObjects(module))
+ abort_load(KMOD_ERROR_LOADING, NULL);
+
+ // During the patch up process the mapped images were modified
+ // to avoid having to allocate more data than necessary.
+ // Now we have to give the patcher a chance to clean up after itself.
+ if (!kld_file_prepare_for_link())
+ abort_load(KMOD_ERROR_LOADING, NULL);
+}
+
+static void
+link_base(const char *base,
+ const char **dependency_paths,
+ const vm_address_t *dependency_addrs)
+{
+ struct mach_header *rld_header;
+ char *base_addr;
+ long base_size;
+ int ok;
+
+ // Get the address and size of the base, usually the kernel
+ base_addr = kld_file_getaddr(base, &base_size);
+ if (!base_addr)
+ exit(KMOD_ERROR_INTERNAL); // Error reported by kld library.
+
+ ok = kld_load_basefile_from_memory(base, base_addr, base_size);
+ fflush(stdout);
+ if (!ok)
+ abort_load(KMOD_ERROR_LOADING, "kld_load_basefile(%s) failed.", base);
+
+ if (*dependency_paths) {
+ char **dependency = dependency_paths;
+ const vm_address_t *load_addr = dependency_addrs;
+
+ while (*dependency) {
+ kmod_info_t *file_kinfo;
+
+ // Find the kmod_info structure in the image.
+ file_kinfo =
+ kld_file_lookupsymbol(*dependency, kKMOD_INFO_SYMBOLNAME);
+ if (!file_kinfo) {
+ abort_load(KMOD_ERROR_USAGE,
+ "%s is not a valid kernel module.", *dependency);
+ }
+
+ // find the address that this dependency is loaded at
+ if (kmodsyms && *load_addr) {
+ faked_kernel_load_address = *load_addr;
+ } else {
+ kmod_info_t *k;
+ kmod_info_t *tmp;
+ int found_it = 0;
+
+ // match up file version of kmod_info with kernel version
+ k = loaded_modules;
+ while (k) {
+ if (!strcmp(k->name, file_kinfo->name)) {
+ UInt32 kernel_kmod_version;
+ UInt32 file_kmod_version;
+
+ if (!VERS_parse_string(k->version, &kernel_kmod_version)) {
+ e_printf("can't parse version string \"%s\" in kernel kmod",
+ k->version);
+ abort_load(KMOD_ERROR_LOADING,
+ "can't parse kernel kmod version string \"%s\"", k->version);
+ }
+
+ if (!VERS_parse_string(file_kinfo->version, & file_kmod_version)) {
+ e_printf("can't parse version string \"%s\" in kmod file %s",
+ file_kinfo->version, *dependency);
+ abort_load(KMOD_ERROR_LOADING,
+ "can't parse version string \"%s\" in kmod file %s",
+ file_kinfo->version, *dependency);
+ }
+
+ if (kernel_kmod_version != file_kmod_version) {
+ e_printf("loaded kernel module '%s' version differs.", *dependency);
+ abort_load(KMOD_ERROR_LOADING,
+ "loaded version '%s', file version '%s'.",
+ k->version, file_kinfo->version);
+ }
+ found_it++;
+ break;
+ }
+ k = (k->next) ? (k + 1) : 0;
+ }
+ if (!found_it) {
+ abort_load(KMOD_ERROR_USAGE,
+ "kernel module '%s' is not loaded.", *dependency);
+ }
+
+ tmp = malloc(sizeof(kmod_info_t));
+ if (!tmp)
+ abort_load(KMOD_ERROR_LOADING, "no memory.");
+
+ *tmp = *k;
+ tmp->next = module_dependencies;
+ module_dependencies = tmp;
+
+ faked_kernel_load_address = k->address;
+ }
+
+ rld_header = link_module(*dependency, 0);
+
+ (void) update_kmod_info(rld_header);
+
+ dependency++; load_addr++;
+ }
+ /* make sure we clear these so clean up does the right thing. */
+ clear_globals();
+ }
+}
+
+#if !defined(page_round)
+#define page_trunc(p) ((int)(p)&~(vm_page_size-1))
+#define page_round(p) page_trunc((int)(p)+vm_page_size-1)
+#endif
+
+static unsigned long
+linkedit_address(unsigned long size, unsigned long headers_size)
+{
+ int r;
+ unsigned long round_segments_size;
+ unsigned long round_headers_size;
+ unsigned long round_size;
+
+ kernel_load_size = size; // The actual size allocated by kld_load...
+
+ round_headers_size = page_round(headers_size);
+ round_segments_size = page_round(size - headers_size);
+ round_size = round_headers_size + round_segments_size;
+
+ kernel_alloc_size = round_size;
+ kernel_hdr_size = headers_size; // will need to be rounded to page *after* link.
+ kernel_hdr_pad = round_headers_size - headers_size;
+
+ if (faked_kernel_load_address) {
+ kernel_load_address = faked_kernel_load_address + kernel_hdr_pad;
+ v_printf("Returning fake load address of 0x%8x", kernel_load_address);
+ return kernel_load_address;
+ }
+ if (kmodsyms) {
+ abort_load(KMOD_ERROR_INTERNAL,
+ "internal error, almost tried to alloc kernel memory.");
+ }
+
+ r = vm_allocate(kernel_port, &kernel_alloc_address,
+ kernel_alloc_size, TRUE);
+ macherr(r, "unable to allocate kernel memory");
+
+ v_printf("allocated %ld bytes in kernel space at 0x%8x",
+ kernel_alloc_size, kernel_alloc_address);
+
+ kernel_load_address = kernel_alloc_address + kernel_hdr_pad;
+
+ v_printf("Returning load address of 0x%x", kernel_load_address);
+
+ return kernel_load_address;
+}
+
+static void
+clear_globals(void)
+{
+ faked_kernel_load_address = 0;
+ kernel_alloc_address = 0;
+ kernel_alloc_size = 0;
+ kernel_load_address = 0;
+ kernel_load_size = 0;
+ kernel_hdr_size = 0;
+ kernel_hdr_pad = 0;
+ return;
+}
+
+static struct mach_header *
+link_module(const char *filename, const char *output)
+{
+ struct mach_header *rld_header;
+ char *object_addr;
+ long object_size;
+ int ok;
+
+ // Get the address of the thined MachO image.
+ object_addr = kld_file_getaddr(filename, &object_size);
+ if (!object_addr)
+ abort_load(KMOD_ERROR_LOADING, NULL);
+
+ ok = kld_load_from_memory(&rld_header, filename,
+ object_addr, object_size, output);
+ fflush(stdout);
+ if (!ok)
+ abort_load(KMOD_ERROR_LOADING, "kld_load() failed.");
+
+ return rld_header;
+}
+
+// Update the kmod_info_t structure in the image to be laoded
+// Side effect of removing the kKMOD_INFO_SYMBOLNAME from the
+// loaded symbol name space, otherwise we would have a duplicate
+// defined symbol failure
+vm_address_t
+update_kmod_info(struct mach_header *mach_header)
+{
+ char * symbol = kKMOD_INFO_SYMBOLNAME;
+ kmod_info_t *info;
+ unsigned long value;
+ int ok;
+
+ ok = kld_lookup(symbol, &value); fflush(stdout);
+ if (!ok)
+ abort_load(KMOD_ERROR_LOADING, "kld_lookup(%s) failed.", symbol);
+
+ ok = kld_forget_symbol(symbol); fflush(stdout);
+ if (!ok)
+ abort_load(KMOD_ERROR_LOADING, "kld_forget_symbol(%s) failed.", symbol);
+
+ /* Get the kmod info by translating from the kernel address at value.
+ */
+ info = (kmod_info_t *)(value - (unsigned long)kernel_load_address + (unsigned long)mach_header);
+ v_printf("kmod name: %s", info->name);
+ v_printf("kmod start @ 0x%x", (vm_address_t)info->start);
+ v_printf("kmod stop @ 0x%x", (vm_address_t)info->stop);
+
+ /* Record link info in kmod info struct, rounding the hdr_size to fit
+ * the adjustment that was made.
+ */
+ info->address = kernel_alloc_address;
+ info->size = kernel_alloc_size;
+ info->hdr_size = page_round(kernel_hdr_size);
+
+ if (!info->start)
+ abort_load(KMOD_ERROR_LOADING, "invalid start address?");
+ else if (!info->stop)
+ abort_load(KMOD_ERROR_LOADING, "invalid stop address?");
+
+ return (vm_address_t)value;
+}
+
+static kmod_t
+load_module(struct mach_header *mach_header, vm_address_t info)
+{
+ int r;
+ kmod_t id;
+ vm_address_t vm_buffer = 0;
+
+ r = vm_allocate(mach_task_self(), &vm_buffer,
+ kernel_alloc_size, TRUE);
+ macherr(r, "unable to vm_allocate() copy buffer");
+
+ /* Copy the linked segment data into the page-aligned buffer.
+ * Do not round the header size here.
+ */
+ bzero((void *)vm_buffer, kernel_alloc_size);
+ memcpy((void *)vm_buffer, mach_header, kernel_hdr_size);
+ memcpy((void *)vm_buffer + page_round(kernel_hdr_size),
+ (void *)((unsigned long)mach_header + kernel_hdr_size),
+ kernel_load_size - kernel_hdr_size);
+
+ // copy linked header into kernel address space
+ r = vm_write(kernel_port, kernel_alloc_address,
+ vm_buffer, kernel_alloc_size);
+ macherr(r, "unable to write module into kernel memory");
+
+ // let the kernel know about it
+ r = kmod_create(kernel_priv_port, info, &id);
+ macherr(r, "unable to register module with kernel");
+
+ v_printf("kmod id %d successfully created at 0x%x size %ld.\n",
+ id, kernel_alloc_address, kernel_alloc_size);
+
+ // FIXME: make sure this happens even on failure
+
+ vm_deallocate(mach_task_self(), vm_buffer, kernel_alloc_size);
+ return id;
+}
+
+static void
+set_module_dependencies(kmod_t id)
+{
+ int r;
+ void * args = 0;
+ int argsCount= 0;
+ kmod_info_t *module = module_dependencies;
+
+ while (module) {
+
+ r = kmod_control(kernel_priv_port, KMOD_PACK_IDS(id, module->id), KMOD_CNTL_RETAIN, &args, &argsCount);
+ machwarn(r, "kmod_control(retain) failed");
+ if (r) {
+ clear_globals();
+ r = kmod_destroy(kernel_priv_port, id);
+ macherr(r, "kmod_destroy failed");
+ }
+
+ v_printf("kmod id %d reference count was sucessfully incremented.", module->id);
+
+ module = module->next;
+ }
+}
+
+static void
+start_module(kmod_t id)
+{
+ int r;
+ void * args = 0;
+ int argsCount= 0;
+
+ r = kmod_control(kernel_priv_port, id, KMOD_CNTL_START, &args, &argsCount);
+ machwarn(r, "kmod_control(start) failed");
+ if (r) {
+ clear_globals();
+ kmod_destroy(kernel_priv_port, id);
+ macherr(r, "kmod_destroy failed");
+ }
+
+ v_printf("kmod id %d successfully started.", id);
+}
+
+static void e_printf(const char *fmt, ...)
+{
+ va_list ap;
+ char msg[1024];
+
+ va_start(ap, fmt);
+ vsnprintf(msg, sizeof(msg), fmt, ap);
+ va_end(ap);
+
+ fprintf(stderr, "%s: %s\n", progname, msg);
+}
+
+static void v_printf(const char *fmt, ...)
+{
+ va_list ap;
+ char msg[1024];
+
+ if (!verbose) return;
+
+ va_start(ap, fmt);
+ vsnprintf(msg, sizeof(msg), fmt, ap);
+ va_end(ap);
+
+ printf("%s: %s\n", progname, msg);
+}
+
+static void abort_load(int exitcode, const char *fmt, ...)
+{
+ if (fmt) {
+ va_list ap;
+ char msg[1024];
+
+ va_start(ap, fmt);
+ vsnprintf(msg, sizeof(msg), fmt, ap);
+ va_end(ap);
+
+ fprintf(stderr, "%s: %s\n", progname, msg);
+ }
+
+ if (!faked_kernel_load_address
+ && (kernel_alloc_address || kernel_alloc_size)) {
+ int r;
+
+ v_printf("freeing %ld bytes in kernel space at 0x%x",
+ kernel_alloc_size, kernel_alloc_address);
+ r = vm_deallocate(kernel_port, kernel_alloc_address, kernel_alloc_size);
+ machwarn(r, "unable to cleanup kernel memory");
+ }
+
+ exit(exitcode);
+}
+
+__private_extern__ void
+kld_error_vprintf(const char *fmt, va_list ap)
+{
+ vfprintf(stderr, fmt, ap);
+ fflush(stderr);
+}
--- /dev/null
+.\"
+.\" Copyright (c) 1997 Doug Rabson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: kmodsyms.8,v 1.3 2002/04/15 20:28:31 lindak Exp $
+.\"
+.Dd April 8, 1999
+.Dt KMODSYMS 8
+.Os FreeBSD
+.Sh NAME
+.Nm kmodsyms
+.Nd creates a statically-linked symbol file for remote debugging
+.Sh SYNOPSIS
+.Nm kmodsyms
+.Op Fl v
+.Op Fl k Ar kernel_file
+.Op Fl d Ar dependency_file
+.Fl o Ar symbol_file
+.Ar module_file
+.Nm kmodsyms
+.Op Fl v
+.Fl k Ar kernel_file
+.Op Fl d Ar dependency_file@address
+.Fl o Ar symbol_file
+.Ar module_file@address
+.Sh DESCRIPTION
+.Nm kmodsyms
+is deprecated; use
+.Xr kextload 8 ,
+instead.
+.Pp
+The
+.Nm kmodsyms
+creates a statically-linked symbol file for remote debugging using
+.Ar module_file[@address] .
+If an address is specified for either the
+.Ar module_file
+or
+.Ar dependency_file
+they both must have the address tag.
+If addresses are specified,
+it is assumed that the command is being run on a different machine
+with a potentially different kernel.
+Thus, the
+.Ar kernel_file
+argument is also required.
+If addresses are not specified,
+they taken from the currently running host machine.
+.Pp
+The following options are available:
+.Bl -tag -width indent
+.\" ==========
+.It Fl d Ar dependency_file[@address]
+Add symbols from
+.Ar dependency_file
+to kernel symbols prior to linking of
+.Ar module_file .
+The file
+.Ar dependency_file
+must already be loaded.
+.\" ==========
+.It Fl k Ar kernel_file
+Use an alternate file
+.Ar kernel_file ,
+instead of the default file (/mach) for linking
+.Ar module_file .
+.\" ==========
+.It Fl o Ar symbol_file
+Creates file named
+.Ar symbol_file
+that contains statically linked output suitable
+for remote debugging use with
+.Xr gdb 1 .
+.\" ==========
+.It Fl v
+Be more verbose.
+.El
+.Sh FILES
+.Bl -tag -width /modules -compact
+.It Pa /System/Library/Extensions
+directory containing loadable kernel modules.
+.Sh DIAGNOSTICS
+The
+.Nm kmodsyms
+utility exits with a status of 0 on success.
+A status of 1 indicates a usage error.
+A status of 2 indicates a indicates a permissions error.
+A status of 3 indicates a problem with linking the module.
+A status of 4 indicates a internal or system error.
+.Sh SEE ALSO
+.Xr kmodload 8 ,
+.Xr kmodstat 8 ,
+.Xr kmodunload 8
+.Sh HISTORY
+The
+.Nm kmodsyms
+command is based on the command kldload, written by
+.An Doug Rabson Aq dfr@FreeBSD.org
--- /dev/null
+#include "vers_rsrc.h"
+
+int vers_isdigit(char c) {
+ return (c == '0' ||
+ c == '1' || c == '2' || c == '3' ||
+ c == '4' || c == '5' || c == '6' ||
+ c == '7' || c == '8' || c == '9');
+}
+
+int vers_isspace(char c) {
+ return (c == ' ' ||
+ c == '\t' ||
+ c == '\r' ||
+ c == '\n');
+}
+
+
+int isreleasestate(char c) {
+ return (c == 'd' || c == 'a' || c == 'b' || c == 'f');
+}
+
+
+UInt8 BCD_digit_for_char(char c) {
+ switch (c) {
+ case '0': return 0; break;
+ case '1': return 1; break;
+ case '2': return 2; break;
+ case '3': return 3; break;
+ case '4': return 4; break;
+ case '5': return 5; break;
+ case '6': return 6; break;
+ case '7': return 7; break;
+ case '8': return 8; break;
+ case '9': return 9; break;
+ default: return BCD_illegal; break;
+ }
+ return BCD_illegal;
+}
+
+
+char BCD_char_for_digit(UInt8 digit) {
+ switch (digit) {
+ case 0: return '0'; break;
+ case 1: return '1'; break;
+ case 2: return '2'; break;
+ case 3: return '3'; break;
+ case 4: return '4'; break;
+ case 5: return '5'; break;
+ case 6: return '6'; break;
+ case 7: return '7'; break;
+ case 8: return '8'; break;
+ case 9: return '9'; break;
+ default: return '?'; break;
+ }
+ return '?';
+}
+
+
+VERS_revision VERS_revision_for_string(char ** string_p) {
+ char * string;
+
+ if (!string_p || !*string_p) {
+ return VERS_invalid;
+ }
+
+ string = *string_p;
+
+ if (vers_isspace(string[0]) || string[0] == '\0') {
+ return VERS_release;
+ } else {
+ switch (string[0]) {
+ case 'd':
+ if (vers_isdigit(string[1])) {
+ *string_p = &string[1];
+ return VERS_development;
+ }
+ break;
+ case 'a':
+ if (vers_isdigit(string[1])) {
+ *string_p = &string[1];
+ return VERS_alpha;
+ }
+ break;
+ case 'b':
+ if (vers_isdigit(string[1])) {
+ *string_p = &string[1];
+ return VERS_beta;
+ }
+ break;
+ case 'f':
+ if (vers_isdigit(string[1])) {
+ *string_p = &string[1];
+ return VERS_candidate;
+ } else if (string[1] == 'c' && vers_isdigit(string[2])) {
+ *string_p = &string[2];
+ return VERS_candidate;
+ } else {
+ return VERS_invalid;
+ }
+ break;
+ default:
+ return VERS_invalid;
+ break;
+ }
+ }
+
+ return VERS_invalid;
+}
+
+
+int VERS_parse_string(char * vers_string, UInt32 * version_num) {
+ int result = 1;
+ VERS_version vers;
+ char * current_char_p;
+ UInt8 scratch;
+
+ if (!vers_string || *vers_string == '\0') {
+ return 0;
+ }
+
+ vers.vnum = 0;
+
+ current_char_p = &vers_string[0];
+
+
+ /*****
+ * Check for an initial digit of the major release number.
+ */
+ vers.bytes[0] = BCD_digit_for_char(*current_char_p);
+ if (vers.bytes[0] == BCD_illegal) {
+ return 0;
+ }
+
+ current_char_p++;
+
+
+ /*****
+ * Check for a second digit of the major release number.
+ */
+ if (*current_char_p == '\0') {
+ vers.bytes[2] = VERS_release;
+ vers.bytes[3] = 0xff;
+ goto finish;
+ } else if (vers_isdigit(*current_char_p)) {
+ scratch = BCD_digit_for_char(*current_char_p);
+ if (scratch == BCD_illegal) {
+ return 0;
+ }
+ vers.bytes[0] = BCD_combine(vers.bytes[0], scratch);
+ current_char_p++;
+
+ if (*current_char_p == '\0') {
+ vers.bytes[2] = VERS_release;
+ vers.bytes[3] = 0xff;
+ goto finish;
+ } else if (isreleasestate(*current_char_p)) {
+ goto release_state;
+ } else if (*current_char_p == '.') {
+ current_char_p++;
+ } else {
+ return 0;
+ }
+ } else if (isreleasestate(*current_char_p)) {
+ goto release_state;
+ } else if (*current_char_p == '.') {
+ current_char_p++;
+ } else {
+ return 0;
+ }
+
+
+ /*****
+ * Check for the minor release number.
+ */
+ if (*current_char_p == '\0') {
+ vers.bytes[2] = VERS_release;
+ vers.bytes[3] = 0xff;
+ goto finish;
+ } else if (vers_isdigit(*current_char_p)) {
+ vers.bytes[1] = BCD_digit_for_char(*current_char_p);
+ if (vers.bytes[1] == BCD_illegal) {
+ return 0;
+ }
+
+ // Make sure its the first nibble of byte 1!
+ vers.bytes[1] = BCD_combine(vers.bytes[1], 0);
+
+ current_char_p++;
+
+ if (*current_char_p == '\0') {
+ vers.bytes[2] = VERS_release;
+ vers.bytes[3] = 0xff;
+ goto finish;
+ } else if (isreleasestate(*current_char_p)) {
+ goto release_state;
+ } else if (*current_char_p == '.') {
+ current_char_p++;
+ } else {
+ return 0;
+ }
+ } else {
+ return 0;
+ }
+
+
+ /*****
+ * Check for the bugfix number.
+ */
+ if (*current_char_p == '\0') {
+ vers.bytes[2] = VERS_release;
+ vers.bytes[3] = 0xff;
+ goto finish;
+ } else if (vers_isdigit(*current_char_p)) {
+ scratch = BCD_digit_for_char(*current_char_p);
+ if (scratch == BCD_illegal) {
+ return 0;
+ }
+
+ /* vers.bytes[1] has its left nibble set already */
+ vers.bytes[1] = vers.bytes[1] | scratch;
+
+ current_char_p++;
+
+ if (*current_char_p == '\0') {
+ vers.bytes[2] = VERS_release;
+ vers.bytes[3] = 0xff;
+ goto finish;
+ } else if (isreleasestate(*current_char_p)) {
+ goto release_state;
+ } else {
+ return 0;
+ }
+ } else {
+ return 0;
+ }
+
+
+release_state:
+
+ /*****
+ * Check for the release state.
+ */
+ if (*current_char_p == '\0') {
+ vers.bytes[2] = VERS_release;
+ vers.bytes[3] = 0xff;
+ goto finish;
+ } else {
+ vers.bytes[2] = VERS_revision_for_string(¤t_char_p);
+ if (vers.bytes[2] == VERS_invalid) {
+ return 0;
+ }
+ }
+
+
+ /*****
+ * Get the nonrelease revision number (0..255).
+ */
+ if (vers.bytes[2] != VERS_release) {
+ UInt32 revision_num = 0;
+ int i;
+
+ if (*current_char_p == '\0' || !vers_isdigit(*current_char_p)) {
+ return 0;
+ }
+ for (i = 0; i < 3 && *current_char_p != '\0'; i++, current_char_p++) {
+ UInt8 scratch_digit;
+ scratch_digit = BCD_digit_for_char(*current_char_p);
+ if (scratch_digit == BCD_illegal) {
+ return 0;
+ }
+ revision_num *= 10;
+ revision_num += scratch_digit;
+ }
+ if (vers_isdigit(*current_char_p) || revision_num > 255) {
+ return 0;
+ }
+ vers.bytes[3] = (UInt8)revision_num;
+ }
+
+ if (vers.bytes[2] == VERS_release) {
+ vers.bytes[3] = 0xff;
+ } else {
+ if (vers.bytes[2] == VERS_candidate) {
+ if (vers.bytes[3] == 0) {
+ return 0;
+ } else {
+ vers.bytes[2] = VERS_release;
+ vers.bytes[3]--;
+ }
+ }
+ }
+
+finish:
+ *version_num = CFSwapInt32BigToHost(vers.vnum);
+ return result;
+}
+
+
+#define VERS_STRING_MAX_LEN (12)
+
+int VERS_string(char * buffer, UInt32 length, UInt32 vers) {
+ VERS_version version;
+ int cpos = 0;
+ int result = 1; // assume success
+
+ char major1;
+ char major2;
+ char minor;
+ char bugfix;
+
+ version.vnum = CFSwapInt32HostToBig(vers);
+
+ /* No buffer or length less than longest possible vers string,
+ * return 0.
+ */
+ if (!buffer || length < VERS_STRING_MAX_LEN) {
+ result = 0;
+ goto finish;
+ }
+
+ bzero(buffer, length * sizeof(char));
+
+
+ /*****
+ * Major version number.
+ */
+ major1 = BCD_char_for_digit(BCD_get_left(version.bytes[0]));
+ if (major1 == '?') {
+ result = 0;
+ } /* this is not an 'else' situation */
+ if (major1 != '0') {
+ buffer[cpos] = major1;
+ cpos++;
+ }
+
+ major2 = BCD_char_for_digit(BCD_get_right(version.bytes[0]));
+ if (major2 == '?') {
+ result = 0;
+ }
+
+ buffer[cpos] = major2;
+ cpos++;
+
+
+ /*****
+ * Minor & bug-fix version numbers.
+ */
+ minor = BCD_char_for_digit(BCD_get_left(version.bytes[1]));
+ if (minor == '?') {
+ result = 0;
+ }
+ bugfix = BCD_char_for_digit(BCD_get_right(version.bytes[1]));
+ if (bugfix == '?') {
+ result = 0;
+ }
+
+
+ /* Always display the minor version number.
+ */
+ buffer[cpos] = '.';
+ cpos++;
+ buffer[cpos] = minor;
+ cpos++;
+
+
+ /* Only display the bugfix version number if it's nonzero.
+ */
+ if (bugfix != '0') {
+ buffer[cpos] = '.';
+ cpos++;
+ buffer[cpos] = bugfix;
+ cpos++;
+ }
+
+
+ /* If the release state is final, we're done!
+ */
+ if (version.bytes[2] == VERS_release && version.bytes[3] == 255) {
+ goto finish;
+ }
+
+
+ /*****
+ * Do the release state and update level.
+ */
+ switch (version.bytes[2]) {
+ case VERS_development:
+ buffer[cpos] = 'd';
+ cpos++;
+ break;
+ case VERS_alpha:
+ buffer[cpos] = 'a';
+ cpos++;
+ break;
+ case VERS_beta:
+ buffer[cpos] = 'b';
+ cpos++;
+ break;
+ case VERS_release:
+ if (version.bytes[3] < 255) {
+ buffer[cpos] = 'f';
+ buffer[cpos+1] = 'c';
+ cpos += 2;
+ } else {
+ goto finish;
+ }
+ break;
+ default:
+ result = 0;
+ buffer[cpos] = '?';
+ cpos++;
+ break;
+ }
+
+ if (version.bytes[2] != VERS_release) {
+ sprintf(&buffer[cpos], "%d", version.bytes[3]);
+ } else {
+ if (version.bytes[3] < 255) {
+ sprintf(&buffer[cpos], "%d", version.bytes[3] + 1);
+ }
+ }
+
+finish:
+ return result;
+}
--- /dev/null
+#ifndef _LIBSA_VERS_H_
+#define _LIBSA_VERS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/types.h>
+#include <libc.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+
+typedef union {
+ UInt32 vnum;
+ UInt8 bytes[4];
+} VERS_version;
+
+typedef enum {
+ VERS_development = 0x20,
+ VERS_alpha = 0x40,
+ VERS_beta = 0x60,
+ VERS_candidate = 0x70, // for interim usage only!
+ VERS_release = 0x80,
+ VERS_invalid = 0xff
+} VERS_revision;
+
+#define BCD_combine(l, r) ( (((l) & 0xf) << 4) | ((r) & 0xf) )
+#define BCD_get_left(p) ( ((p) >> 4) & 0xf )
+#define BCD_get_right(p) ( (p) & 0xf )
+
+#define BCD_illegal (0xff) // full byte, 11111111
+
+int VERS_parse_string(char * vers_string, UInt32 * version_num);
+int VERS_string(char * buffer, UInt32 length, UInt32 vers);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif _LIBSA_VERS_H_
--- /dev/null
+#
+# Generated by the NeXT Project Builder.
+#
+# NOTE: Do NOT change this file -- Project Builder maintains it.
+#
+# Put all of your customizations in files called Makefile.preamble
+# and Makefile.postamble (both optional), and Makefile will include them.
+#
+
+NAME = kmodstat
+
+PROJECTVERSION = 2.8
+PROJECT_TYPE = Tool
+
+CFILES = kmodstat.c
+
+OTHERSRCS = Makefile.preamble Makefile Makefile.postamble kmodstat.8
+
+
+MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
+CODE_GEN_STYLE = DYNAMIC
+MAKEFILE = tool.make
+NEXTSTEP_INSTALLDIR = /usr/sbin
+WINDOWS_INSTALLDIR = /Library/Executables
+PDO_UNIX_INSTALLDIR = /bin
+LIBS =
+DEBUG_LIBS = $(LIBS)
+PROF_LIBS = $(LIBS)
+
+
+
+
+NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
+WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
+PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
+NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
+WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
+PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
+
+include $(MAKEFILEDIR)/platform.make
+
+-include Makefile.preamble
+
+include $(MAKEFILEDIR)/$(MAKEFILE)
+
+-include Makefile.postamble
+
+-include Makefile.dependencies
--- /dev/null
+.\"
+.\" Copyright (c) 1997 Doug Rabson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: kmodstat.8,v 1.2 2002/04/18 18:48:42 lindak Exp $
+.\"
+.Dd April 17, 2002
+.Dt KMODSTAT 8
+.Os FreeBSD
+.Sh NAME
+.Nm kmodstat
+.Nd display status of dynamically-loaded kernel modules
+.Sh SYNOPSIS
+.Nm kmodstat
+.Op Fl i Ar id
+.Op Fl n Ar name
+.Sh DESCRIPTION
+.Nm kmodstat
+is deprecated; use
+.Xr kextstat 8 ,
+instead.
+.Pp
+The
+.Nm kmodstat
+utility displays the status of any kernel modules
+that are dynamically linked into the kernel.
+.Pp
+The following options are available:
+.Bl -tag -width indentXX
+.\" ==========
+.It Fl i Ar id
+Display the status of only the kernel module with this ID.
+.\" ==========
+.It Fl n Ar name
+Display the status of only the kernel module with this name.
+.El
+.Sh DIAGNOSTICS
+The
+.Nm kmodstat
+utility exits with a status of 0 on success
+and with a nonzero status if an error occurs.
+.Sh SEE ALSO
+.Xr kmodload 8 ,
+.Xr kmodsyms 8 ,
+.Xr kmodunload 8
+.Sh HISTORY
+The
+.Nm kmodstat
+command is based on the command kldstat, written by
+.An Doug Rabson Aq dfr@FreeBSD.org
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1997 Doug Rabson
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Original code from:
+ * "kldstat.c,v 1.5 1998/11/07 00:29:09 des Exp";
+ */
+
+#ifndef lint
+static const char rcsid[] =
+ "$Id: kmodstat.c,v 1.4 2002/04/18 18:48:42 lindak Exp $";
+#endif /* not lint */
+
+#include <err.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/param.h>
+
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/mach_host.h>
+
+static void
+machwarn(int error, const char *message)
+{
+ if (error == KERN_SUCCESS) return;
+ fprintf(stderr, "kmodstat: %s: %s\n", message, mach_error_string(error));
+}
+
+static void
+macherr(int error, const char *message)
+{
+ if (error == KERN_SUCCESS) return;
+ fprintf(stderr, "kmodstat: %s: %s\n", message, mach_error_string(error));
+ exit(1);
+}
+
+static int
+kmod_compare(const void *a, const void *b)
+{
+ return (((kmod_info_t *)a)->id - ((kmod_info_t *)b)->id);
+}
+
+static void
+usage(void)
+{
+ fprintf(stderr, "usage: kmodstat [-i id] [-n name]\n");
+ exit(1);
+}
+
+int
+main(int argc, char** argv)
+{
+ int c, idset = 0, id = 0;
+ char* name = 0;
+ kmod_info_t *info, *k;
+ kmod_reference_t *r;
+ int i, j, rc, foundit, count, rcount;
+ mach_port_t kernel_port;
+
+ fprintf(stderr, "%s is deprecated; use kextstat(8) instead\n", argv[0]);
+ sleep(5);
+
+ while ((c = getopt(argc, argv, "i:n:")) != -1)
+ switch (c) {
+ case 'i':
+ idset++;
+ id = atoi(optarg);
+ break;
+ case 'n':
+ name = optarg;
+ break;
+ default:
+ usage();
+ }
+ argc -= optind;
+ argv += optind;
+
+ if (!idset && !name && (argc == 1)) {
+ name = *argv;
+ argc--;
+ }
+
+ if (argc != 0) usage();
+
+ rc = task_for_pid(mach_task_self(), 0, &kernel_port);
+ machwarn(rc, "unable to get kernel task port");
+ if (rc) {
+ fprintf(stderr, "kmodstat: Are you running as root?\n");
+ exit(1);
+ }
+
+ rc= kmod_get_info(kernel_port, (void *)&info, &count);
+ macherr(rc, "kmod_get_info() failed");
+
+ k = info; count = 0;
+ while (k) {
+ count++;
+ k = (k->next) ? (k + 1) : 0;
+ }
+
+ k = info; r = (kmod_reference_t *)(info + count);
+ while (k) {
+ if ((rcount = (int)k->reference_list)) {
+ k->reference_list = r;
+ for (i=0; i < rcount; i++) {
+ foundit = 0;
+ for (j=0; j < count; j++) {
+ if (r->info == info[j].next) {
+ r->info = (kmod_info_t *)info[j].id;
+ foundit++;
+ break;
+ }
+ }
+ // force the id in here, the sorting below messes up the pointers
+ if (!foundit) r->info = (kmod_info_t *)info[count - 1].id;
+ r->next = r + 1;
+ r++;
+ }
+ k->reference_list[rcount - 1].next = 0;
+ }
+ k = (k->next) ? (k + 1) : 0;
+ }
+
+ printf("Id Refs Address Size Wired Name (Version) <Linked Against>\n");
+
+ if (!count) return 0;
+
+ qsort(info, count, sizeof(kmod_info_t), kmod_compare);
+
+ if (idset || name) {
+ kmod_info_t *k = info;
+ int match_count = 0;
+ for (i=0; i < count; i++, k++) {
+ if ((idset && id == k->id) || (name && !strcmp(k->name, name))) {
+ info[match_count++] = *k;
+ }
+ }
+ count = match_count;
+ }
+ for (i=0; i < count; i++, info++) {
+ printf("%2d %4d %-10p %-10p %-10p %s (%s)",
+ info->id, info->reference_count, (void *)info->address,
+ (void *)info->size, (void *)(info->size - info->hdr_size),
+ info->name, info->version);
+
+ if ((r = info->reference_list)) {
+ printf(" <%d", (int)r->info);
+ r = r->next;
+ while (r) {
+ printf(" %d", (int)r->info);
+ r = r->next;
+ }
+ printf(">");
+ }
+ printf("\n");
+ }
+
+ return 0;
+}
--- /dev/null
+#
+# Generated by the NeXT Project Builder.
+#
+# NOTE: Do NOT change this file -- Project Builder maintains it.
+#
+# Put all of your customizations in files called Makefile.preamble
+# and Makefile.postamble (both optional), and Makefile will include them.
+#
+
+NAME = kmodunload
+
+PROJECTVERSION = 2.8
+PROJECT_TYPE = Tool
+
+CFILES = kmodunload.c
+
+OTHERSRCS = Makefile.preamble Makefile Makefile.postamble kmodunload.8
+
+
+MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
+CODE_GEN_STYLE = DYNAMIC
+MAKEFILE = tool.make
+NEXTSTEP_INSTALLDIR = /sbin
+WINDOWS_INSTALLDIR = /Library/Executables
+PDO_UNIX_INSTALLDIR = /bin
+LIBS =
+DEBUG_LIBS = $(LIBS)
+PROF_LIBS = $(LIBS)
+
+
+
+
+NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
+WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
+PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
+NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
+WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
+PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
+
+include $(MAKEFILEDIR)/platform.make
+
+-include Makefile.preamble
+
+include $(MAKEFILEDIR)/$(MAKEFILE)
+
+-include Makefile.postamble
+
+-include Makefile.dependencies
--- /dev/null
+.\"
+.\" Copyright (c) 1997 Doug Rabson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: kmodunload.8,v 1.2 2002/04/15 20:28:33 lindak Exp $
+.\"
+.Dd April 8, 1999
+.Dt KMODUNLOAD 8
+.Os FreeBSD
+.Sh NAME
+.Nm kmodunload
+.Nd stops and unloads a kernel module
+.Sh SYNOPSIS
+.Nm kmodunload
+.Op Fl v
+.Fl i Ar id
+.Nm kmodunload
+.Op Fl v
+.Fl n Ar name
+.Sh DESCRIPTION
+.Nm kmodunload
+is deprecated; use
+.Xr kextunload 8 ,
+instead.
+.Pp
+The
+.Nm kmodunload
+utility stops and unloads a kernel module which was previously loaded with
+.Xr kmodload 8 .
+.Pp
+The following options are available:
+.Bl -tag -width indentXX
+.\" ==========
+.It Fl i Ar id
+Unload the kernel module with this ID.
+.\" ==========
+.It Fl n Ar name
+Unload the kernel module with this name.
+.\" ==========
+.It Fl v
+Be more verbose.
+.El
+.Sh DIAGNOSTICS
+The
+.Nm kmodunload
+utility exits with a status of 0 on success
+and with a nonzero status if an error occurs.
+.Sh SEE ALSO
+.Xr kmodload 8 ,
+.Xr kmodstat 8 ,
+.Xr kmodsyms 8
+.Sh HISTORY
+The
+.Nm kmodunload
+command is based on the command kldunload, written by
+.An Doug Rabson Aq dfr@FreeBSD.org
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1997 Doug Rabson
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Original code from:
+ * "kldunload.c,v 1.7 1998/11/07 00:42:52 des Exp"
+ */
+
+#ifndef lint
+static const char rcsid[] =
+ "$Id: kmodunload.c,v 1.5 2002/04/24 20:03:48 lindak Exp $";
+#endif /* not lint */
+
+#include <err.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/mach_host.h>
+
+static int verbose = 0;
+#define v_printf if (verbose) printf
+
+static void
+machwarn(int error, const char *message)
+{
+ if (error == KERN_SUCCESS) return;
+ fprintf(stderr, "kmodunload: %s: %s\n", message, mach_error_string(error));
+}
+
+static void
+macherr(int error, const char *message)
+{
+ if (error == KERN_SUCCESS) return;
+ fprintf(stderr, "kmodunload: %s: %s\n", message, mach_error_string(error));
+ exit(1);
+}
+
+static mach_port_t kernel_priv_port;
+
+static void
+stop_module(kmod_t id)
+{
+ int r;
+ void * args = 0;
+ int argsCount= 0;
+
+ r = kmod_control(kernel_priv_port, id, KMOD_CNTL_STOP, &args, &argsCount);
+ macherr(r, "kmod_control(stop) failed");
+
+ v_printf("kmodunload: kmod id %d successfully stopped.\n", id);
+}
+
+static void
+unload_module(kmod_t id)
+{
+ int r;
+
+ r = kmod_destroy(kernel_priv_port, id);
+ macherr(r, "kmod_destroy() failed");
+
+ v_printf("kmodunload: kmod id %d successfully unloaded.\n", id);
+}
+
+static void
+usage(void)
+{
+ fprintf(stderr, "usage: kmodunload [-v] -i id\n");
+ fprintf(stderr, " kmodunload [-v] -n name\n");
+ exit(1);
+}
+
+int
+main(int argc, char** argv)
+{
+ int c;
+ int id = 0;
+ char* name = 0;
+ kmod_info_t *info;
+ int r;
+ int count;
+ mach_port_t kernel_port;
+
+ fprintf(stderr, "%s is deprecated; use kextunload(8) instead\n", argv[0]);
+ sleep(5);
+
+ while ((c = getopt(argc, argv, "i:n:v")) != -1)
+ switch (c) {
+ case 'i':
+ id = atoi(optarg);
+ break;
+ case 'n':
+ name = optarg;
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ default:
+ usage();
+ }
+ argc -= optind;
+ argv += optind;
+
+ if (!id && !name && (argc == 1)) {
+ name = *argv;
+ argc--;
+ }
+
+ if ((argc != 0) || (id && name))
+ usage();
+
+ if ((id == 0) && (name == 0))
+ usage();
+
+ r = task_for_pid(mach_task_self(), 0, &kernel_port);
+ machwarn(r, "unable to get kernel task port");
+ if (r) {
+ fprintf(stderr, "kmodunload: Are you running as root?\n");
+ exit(1);
+ }
+
+ r = kmod_get_info(kernel_port, (void *)&info, &count);
+ macherr(r, "kmod_get_info() failed");
+
+ if (count < 1) {
+ fprintf(stderr, "kmodunload: there is nothing to unload?\n");
+ exit(1);
+ }
+
+ if (name) {
+ kmod_info_t *k = info;
+ while (k) {
+ if (!strcmp(k->name, name)) {
+ id = k->id;
+ break;
+ }
+ k = (k->next) ? (k + 1) : 0;
+ }
+ if (!k) {
+ fprintf(stderr, "kmodunload: can't kmod named: %s.\n", name);
+ exit(1);
+ }
+ } else {
+ kmod_info_t *k = info;
+ while (k) {
+ if (id == k->id) {
+ name = k->name;
+ break;
+ }
+ k = (k->next) ? (k + 1) : 0;
+ }
+ if (!name) {
+ fprintf(stderr, "kmodunload: can't find kmod id %d.\n", id);
+ exit(1);
+ }
+ }
+
+ v_printf("kmodunload: found kmod %s, id %d.\n", name, id);
+ kernel_priv_port = mach_host_self(); /* if we are privileged */
+
+ stop_module(id);
+ unload_module(id);
+
+ return 0;
+}
+
--- /dev/null
+#
+# Generated by the NeXT Project Builder.
+#
+# NOTE: Do NOT change this file -- Project Builder maintains it.
+#
+# Put all of your customizations in files called Makefile.preamble
+# and Makefile.postamble (both optional), and Makefile will include them.
+#
+
+NAME = kvm_mkdb
+
+PROJECTVERSION = 2.6
+PROJECT_TYPE = Tool
+LANGUAGE = English
+
+HFILES = extern.h
+
+CFILES = kvm_mkdb.c nlist.c testdb.c
+
+OTHERSRCS = Makefile.preamble Makefile Makefile.postamble kvm_mkdb.8
+
+
+MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
+CODE_GEN_STYLE = DYNAMIC
+MAKEFILE = tool.make
+NEXTSTEP_INSTALLDIR = /usr/sbin
+WINDOWS_INSTALLDIR = /usr/sbin
+PDO_UNIX_INSTALLDIR = /usr/sbin
+LIBS =
+DEBUG_LIBS = $(LIBS)
+PROF_LIBS = $(LIBS)
+
+
+
+
+include $(MAKEFILEDIR)/platform.make
+
+-include Makefile.preamble
+
+include $(MAKEFILEDIR)/$(MAKEFILE)
+
+-include Makefile.postamble
+
+-include Makefile.dependencies
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)extern.h 8.1 (Berkeley) 6/6/93
+ */
+
+void create_knlist __P((char *, DB *));
+void error __P((char *));
+int testdb __P(());
--- /dev/null
+.\" Copyright (c) 1989, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)kvm_mkdb.8 8.1 (Berkeley) 6/9/93
+.\"
+.Dd June 9, 1993
+.Dt KVM_MKDB 8
+.Os
+.Sh NAME
+.Nm kvm_mkdb
+.Nd create kernel database
+.Sh SYNOPSIS
+.Nm kvm_mkdb
+.Op file
+.Sh DESCRIPTION
+.Nm Kvm_mkdb
+creates a database in
+.Pa /var/db ,
+containing information about the specified file.
+If no file is specified,
+.Pa /vmunix
+is used by default.
+The file is named ``kvm_filename.db'', where ``filename'' is the
+name of the file read.
+Various library routines consult this database.
+.Pp
+The only information currently stored is the kernel namelist, which is
+used by the
+.Xr kvm_nlist 3
+function, however, in the future the database may contain other static
+information about the current system.
+.Sh FILES
+.Bl -tag -width /var/db/kvm_vmunix.db -compact
+.It Pa /vmunix
+.It Pa /var/db/kvm_vmunix.db
+.El
+.Sh SEE ALSO
+.Xr kvm_nlist 3
+.Sh HISTORY
+The
+.Nm kvm_mkdb
+utility first appeared in 4.4BSD.
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef lint
+static char copyright[] =
+"@(#) Copyright (c) 1990, 1993\n\
+ The Regents of the University of California. All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)kvm_mkdb.c 8.3 (Berkeley) 5/4/95";
+#endif /* not lint */
+
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#include <db.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <paths.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "extern.h"
+
+static void usage __P((void));
+
+HASHINFO openinfo = {
+ 4096, /* bsize */
+ 128, /* ffactor */
+ 1024, /* nelem */
+ 2048 * 1024, /* cachesize */
+ NULL, /* hash() */
+ 0 /* lorder */
+};
+
+int
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ DB *db;
+ int ch;
+ char *p, *nlistpath, *nlistname, dbtemp[MAXPATHLEN], dbname[MAXPATHLEN];
+
+ while ((ch = getopt(argc, argv, "")) != EOF)
+ switch (ch) {
+ case '?':
+ default:
+ usage();
+ }
+ argc -= optind;
+ argv += optind;
+
+ if (argc > 1)
+ usage();
+
+ /* If the existing db file matches the currently running kernel, exit */
+ if (testdb())
+ exit(0);
+
+#define basename(cp) ((p = rindex((cp), '/')) != NULL ? p + 1 : (cp))
+ nlistpath = argc > 0 ? argv[0] : _PATH_UNIX;
+ nlistname = basename(nlistpath);
+
+ (void)snprintf(dbtemp, sizeof(dbtemp), "%skvm_%s.tmp",
+ _PATH_VARDB, nlistname);
+ (void)snprintf(dbname, sizeof(dbname), "%skvm_%s.db",
+ _PATH_VARDB, nlistname);
+ (void)umask(0);
+ db = dbopen(dbtemp, O_CREAT | O_EXLOCK | O_TRUNC | O_RDWR,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, DB_HASH, &openinfo);
+ if (db == NULL)
+ err(1, "%s", dbtemp);
+ create_knlist(nlistpath, db);
+ if (db->close(db))
+ err(1, "%s", dbtemp);
+ if (rename(dbtemp, dbname))
+ err(1, "rename %s to %s", dbtemp, dbname);
+ exit(0);
+}
+
+void
+usage()
+{
+ (void)fprintf(stderr, "usage: kvm_mkdb [file]\n");
+ exit(1);
+}
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/6/93";
+#endif /* not lint */
+
+#include <sys/param.h>
+
+#ifdef __APPLE__
+#include <machine/exec.h>
+#include <machine/param.h>
+#define _AOUT_INCLUDE_
+#else
+#include <a.out.h>
+#endif /* NeXT */
+#include <db.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <kvm.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "extern.h"
+
+typedef struct nlist NLIST;
+#define _strx n_un.n_strx
+#define _name n_un.n_name
+
+#define badfmt(str) errx(1, "%s: %s: %s", kfile, str, strerror(EFTYPE))
+
+static void badread __P((int, char *));
+
+static char *kfile;
+
+void
+create_knlist(name, db)
+ char *name;
+ DB *db;
+{
+ register int nsyms;
+ struct exec ebuf;
+ FILE *fp;
+ NLIST nbuf;
+ DBT data, key;
+ int fd, nr, strsize;
+ char *strtab, buf[1024];
+
+ kfile = name;
+ if ((fd = open(name, O_RDONLY, 0)) < 0)
+ err(1, "%s", name);
+
+ /* Read in exec structure. */
+ nr = read(fd, &ebuf, sizeof(struct exec));
+ if (nr != sizeof(struct exec))
+ badfmt("no exec header");
+
+ /* Check magic number and symbol count. */
+ if (N_BADMAG(ebuf))
+ badfmt("bad magic number");
+ if (!ebuf.a_syms)
+ badfmt("stripped");
+
+ /* Seek to string table. */
+ if (lseek(fd, N_STROFF(ebuf), SEEK_SET) == -1)
+ badfmt("corrupted string table");
+
+ /* Read in the size of the symbol table. */
+ nr = read(fd, (char *)&strsize, sizeof(strsize));
+ if (nr != sizeof(strsize))
+ badread(nr, "no symbol table");
+
+ /* Read in the string table. */
+ strsize -= sizeof(strsize);
+ if (!(strtab = malloc(strsize)))
+ err(1, NULL);
+ if ((nr = read(fd, strtab, strsize)) != strsize)
+ badread(nr, "corrupted symbol table");
+
+ /* Seek to symbol table. */
+ if (!(fp = fdopen(fd, "r")))
+ err(1, "%s", name);
+ if (fseek(fp, N_SYMOFF(ebuf), SEEK_SET) == -1)
+ err(1, "%s", name);
+
+ data.data = (u_char *)&nbuf;
+ data.size = sizeof(NLIST);
+
+ /* Read each symbol and enter it into the database. */
+ nsyms = ebuf.a_syms / sizeof(struct nlist);
+ while (nsyms--) {
+ if (fread((char *)&nbuf, sizeof (NLIST), 1, fp) != 1) {
+ if (feof(fp))
+ badfmt("corrupted symbol table");
+ err(1, "%s", name);
+ }
+ if (!nbuf._strx || nbuf.n_type&N_STAB)
+ continue;
+
+ key.data = (u_char *)strtab + nbuf._strx - sizeof(long);
+ key.size = strlen((char *)key.data);
+ if (db->put(db, &key, &data, 0))
+ err(1, "record enter");
+
+ if (strcmp((char *)key.data, VRS_SYM) == 0) {
+ long cur_off, voff;
+#ifndef KERNTEXTOFF
+#define KERNTEXTOFF KERNBASE
+#endif
+ /*
+ * Calculate offset relative to a normal (non-kernel)
+ * a.out. KERNTEXTOFF is where the kernel is really
+ * loaded; N_TXTADDR is where a normal file is loaded.
+ * From there, locate file offset in text or data.
+ */
+ voff = nbuf.n_value - KERNTEXTOFF + N_TXTADDR(ebuf);
+ if ((nbuf.n_type & N_TYPE) == N_TEXT)
+ voff += N_TXTOFF(ebuf) - N_TXTADDR(ebuf);
+ else
+ voff += N_DATOFF(ebuf) - N_DATADDR(ebuf);
+ cur_off = ftell(fp);
+ if (fseek(fp, voff, SEEK_SET) == -1)
+ badfmt("corrupted string table");
+
+ /*
+ * Read version string up to, and including newline.
+ * This code assumes that a newline terminates the
+ * version line.
+ */
+ if (fgets(buf, sizeof(buf), fp) == NULL)
+ badfmt("corrupted string table");
+
+ key.data = (u_char *)VRS_KEY;
+ key.size = sizeof(VRS_KEY) - 1;
+ data.data = (u_char *)buf;
+ data.size = strlen(buf);
+ if (db->put(db, &key, &data, 0))
+ err(1, "record enter");
+
+ /* Restore to original values. */
+ data.data = (u_char *)&nbuf;
+ data.size = sizeof(NLIST);
+ if (fseek(fp, cur_off, SEEK_SET) == -1)
+ badfmt("corrupted string table");
+ }
+ }
+ (void)fclose(fp);
+}
+
+static void
+badread(nr, p)
+ int nr;
+ char *p;
+{
+ if (nr < 0)
+ err(1, "%s", kfile);
+ badfmt(p);
+}
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*-
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)testdb.c 8.1 (Berkeley) 6/6/93";
+#endif /* not lint */
+
+#include <sys/param.h>
+#include <sys/file.h>
+#include <errno.h>
+#include <limits.h>
+#include <kvm.h>
+#include <db.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <paths.h>
+
+#include "extern.h"
+
+/* Return true if the db file is valid, else false */
+int
+testdb()
+{
+ register DB *db;
+ register int cc, kd, ret, dbversionlen;
+ register char *cp, *uf;
+ DBT rec;
+ struct nlist nitem;
+ char dbname[MAXPATHLEN], dbversion[_POSIX2_LINE_MAX];
+ char kversion[_POSIX2_LINE_MAX];
+
+ ret = 0;
+ db = NULL;
+
+ if ((kd = open(_PATH_KMEM, O_RDONLY, 0)) < 0)
+ goto close;
+
+ uf = _PATH_UNIX;
+ if ((cp = rindex(uf, '/')) != 0)
+ uf = cp + 1;
+ (void) snprintf(dbname, sizeof(dbname), "%skvm_%s.db", _PATH_VARDB, uf);
+ if ((db = dbopen(dbname, O_RDONLY, 0, DB_HASH, NULL)) == NULL)
+ goto close;
+
+ /* Read the version out of the database */
+ rec.data = VRS_KEY;
+ rec.size = sizeof(VRS_KEY) - 1;
+ if ((db->get)(db, &rec, &rec, 0))
+ goto close;
+ if (rec.data == 0 || rec.size > sizeof(dbversion))
+ goto close;
+ bcopy(rec.data, dbversion, rec.size);
+ dbversionlen = rec.size;
+
+ /* Read version string from kernel memory */
+ rec.data = VRS_SYM;
+ rec.size = sizeof(VRS_SYM) - 1;
+ if ((db->get)(db, &rec, &rec, 0))
+ goto close;
+ if (rec.data == 0 || rec.size != sizeof(struct nlist))
+ goto close;
+ bcopy(rec.data, &nitem, sizeof(nitem));
+ /*
+ * Theoretically possible for lseek to be seeking to -1. Not
+ * that it's something to lie awake nights about, however.
+ */
+ errno = 0;
+ if (lseek(kd, (off_t)nitem.n_value, SEEK_SET) == -1 && errno != 0)
+ goto close;
+ cc = read(kd, kversion, sizeof(kversion));
+ if (cc < 0 || cc != sizeof(kversion))
+ goto close;
+
+ /* If they match, we win */
+ ret = bcmp(dbversion, kversion, dbversionlen) == 0;
+
+close: if (kd >= 0)
+ (void)close(kd);
+ if (db)
+ (void)(db->close)(db);
+ return (ret);
+}
-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = latency
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = latency
+Install_Dir = /usr/bin
CFILES = latency.c
+MANPAGES = latency.1
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble latency.1
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /Library/Executables
-PDO_UNIX_INSTALLDIR = /bin
-LIBS = -lcurses
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-HEADER_PATHS = -I$(NEXT_ROOT)/System/Library/System.framework/\
- -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders\
- -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd\
- -I$(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders/bsd
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
+Extra_LD_Flags = -lcurses
--include Makefile.postamble
+Extra_CC_Flags = -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders\
+ -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS = 4555
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-
-install-man-page:
- install -d $(DSTROOT)/usr/share/man/man1
- install -c -m 444 latency.1 $(DSTROOT)/usr/share/man/man1/latency.1
-
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-# Before the main makefile is included for this project, you may set:
-#
-# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
-# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
-
-# Compiler/linker flags added to the defaults: The OTHER_* variables will be
-# inherited by all nested sub-projects, but the LOCAL_ versions of the same
-# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
-# Build Attributes inspector if at all possible. To override the default flags
-# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
-# variables below are *inputs* to the build process and distinct from the override
-# settings done (less often) in the Makefile.postamble.
-#
-# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
-# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
-# .cc, .cxx, .C, and .M files. There is no need to respecify the
-# flags in OTHER_MFLAGS, etc.
-# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
-# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
-# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
-# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
-# precompiling header files
-# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
-# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
-# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
-# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
-# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-# AFTER_INSTALL: targets to build after installing the product
-# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
-# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
-#
-# BEFORE_INSTALLHDRS: targets to build before installing headers for a
-# subproject
-# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
-# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
-# AFTER_INSTALLSRC: targets to build after installing source for a subproject
-#
-# BEFORE_DEPEND: targets to build before building dependencies for a
-# subproject
-# AFTER_DEPEND: targets to build after building dependencies for a
-# subproject
-#
-# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
-# updated every time the project is built. If NO, the dependency
-# file is only built when the depend target is invoked.
-
-# Framework-related variables:
-# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the framework's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-
-# Library-related variables:
-# PUBLIC_HEADER_DIR: Determines where public exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically. For library projects you should
-# set this to something like /Developer/Headers/$(NAME). Do not set
-# this variable for framework projects unless you do not want the
-# header files included in the framework.
-# PRIVATE_HEADER_DIR: Determines where private exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
-# whether the libraries produced are statically linked when they
-# are used or if they are dynamically loadable. This defaults to
-# DYNAMIC.
-# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the library's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-#
-# INSTALL_AS_USER: owner of the intalled products (default root)
-# INSTALL_AS_GROUP: group of the installed products (default wheel)
-# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
-#
-# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
-# passed on the command line to recursive invocations of make. Note that
-# the values in OTHER_*FLAGS are inherited by subprojects automatically --
-# you do not have to (and shouldn't) add OTHER_*FLAGS to
-# OTHER_RECURSIVE_VARIABLES.
-
-# Additional headers to export beyond those in the PB.project:
-# OTHER_PUBLIC_HEADERS
-# OTHER_PROJECT_HEADERS
-# OTHER_PRIVATE_HEADERS
-
-# Additional files for the project's product: <<path relative to proj?>>
-# OTHER_RESOURCES: (non-localized) resources for this project
-# OTHER_OFILES: relocatables to be linked into this project
-# OTHER_LIBS: more libraries to link against
-# OTHER_PRODUCT_DEPENDS: other dependencies of this project
-# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
-# OTHER_GARBAGE: additional files to be removed by `make clean'
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-# BUILD_OFILES_LIST_ONLY
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Uncomment to suppress generation of a KeyValueCoding index when installing
-# frameworks (This index is used by WOB and IB to determine keys available
-# for an object). Set to YES by default.
-# PREINDEX_FRAMEWORK = NO
-
-# Change this definition to install projects somewhere other than the
-# standard locations. NEXT_ROOT defaults to "C:/Apple" on Windows systems
-# and "" on other systems.
-DSTROOT = $(HOME)
-
-AFTER_INSTALL += install-man-page
-
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- HEADERSEARCH = (
- "$(NEXT_ROOT)/System/Library/System.framework/",
- "$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders",
- "$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd",
- "$(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders/bsd"
- );
- H_FILES = ();
- OTHER_LINKED = (latency.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, latency.1);
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_INSTALLDIR = /bin;
- PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = latency;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_INSTALLDIR = /Library/Executables;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
+Project = login
+Install_Dir = /usr/bin
-NAME = login
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
-
-Embedded=$(shell tconf --test TARGET_OS_EMBEDDED)
HFILES = pathnames.h
-
CFILES = klogin.c login.c
+MANPAGES = login.1
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble login.1
-
+Embedded=$(shell tconf --test TARGET_OS_EMBEDDED)
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /usr/bin
-PDO_UNIX_INSTALLDIR = /usr/bin
ifeq "$(Embedded)" "NO"
-LIBS = -lbsm -lpam -lpam_misc
+Extra_LD_Flags = -lbsm -lpam -lpam_misc
+Extra_CC_Flags = -DUSE_PAM -DUSE_BSM -no-cpp-precomp
endif
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
--include Makefile.postamble
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.dependencies
+Install_Program_Mode = 04555
+++ /dev/null
-INSTALL_AS_USER = root
-INSTALL_PERMISSIONS = 4555
-
-after_install:
- mkdir -p "$(DSTROOT)/usr/share/man/man1"
- install -c -m 644 login.1 "$(DSTROOT)/usr/share/man/man1/login.1"
+++ /dev/null
-CLEAN_ALL_SUBPROJECTS = YES
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-ifeq "$(shell tconf --test TARGET_OS_EMBEDDED)" "NO"
-OTHER_CFLAGS = -DUSE_PAM -DUSE_BSM -no-cpp-precomp
-endif
-
-AFTER_INSTALL = after_install
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- C_FILES = ();
- H_FILES = (pathnames.h);
- OTHER_LIBS = (bsm, pam, "pam_misc");
- OTHER_LINKED = (klogin.c, login.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, login.1);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /usr/bin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = login;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /usr/bin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = makekey
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = makekey
+Install_Dir = /usr/libexec
CFILES = makekey.c
+MANPAGES = makekey.8
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble makekey.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/libexec
-WINDOWS_INSTALLDIR = /usr/libexec
-PDO_UNIX_INSTALLDIR = /usr/libexec
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of the directory to which resources are copied.
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# ENGLISH - boolean flag set iff $(LANGUAGE) = "English"
-# JAPANESE - boolean flag set iff $(LANGUAGE) = "Japanese"
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder that output Makefile
-# APPICON - application icon file
-# DOCICONS - dock icon files
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-#
-###############################################################################
-
-
-# Change defaults assumed by the standard makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Versioning of frameworks, libraries, bundles, and palettes:
-#CURRENTLY_ACTIVE_VERSION = YES # Set to "NO" to produce a compatibility binary
-#DEPLOY_WITH_VERSION_NAME = A
-#COMPATIBILITY_PROJECT_VERSION = 1
-
-# Some compiler flags can be easily overridden here, but onlytake effect at
-# the top-level:
-#OPTIMIZATION_CFLAG = -O
-#DEBUG_SYMBOLS_CFLAG = -g
-#WARNING_CFLAGS = -Wall
-#DEBUG_BUILD_CFLAGS = -DDEBUG
-#PROFILE_BUILD_CFLAGS = -pg -DPROFILE
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Library and Framework projects only:
-# 1. If you want something other than the default .dylib name, override it here
-#DYLIB_INSTALL_NAME = lib$(NAME).dylib
-
-# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all.
-#DYLIB_INSTALL_DIR = $(INSTALLDIR)
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root # User/group ownership
-#INSTALL_AS_GROUP = wheel # (probably want to set both of these)
-#INSTALL_PERMISSIONS = # If set, 'install' chmod's executable to this
-
-# Options to strip for various project types. Note: -S strips debugging symbols
-# (executables can be stripped down further with -x or, if they load no bundles, with no
-# options at all).
-#APP_STRIP_OPTS = -S
-#TOOL_STRIP_OPTS = -S
-#LIBRARY_STRIP_OPTS = -S # for .a archives
-#DYNAMIC_STRIP_OPTS = -S # for bundles and shared libraries
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. "Official"
-# user-defined rules are:
-# * before_install
-# * after_install
-# * after_installhdrs
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-
-after_install:
- mkdir -p $(DSTROOT)/usr/share/man/man8
- install -c -m 444 makekey.8 $(DSTROOT)/usr/share/man/man8
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project. Each node in a project
-# tree of sub-projects, tools, etc. should have its own Makefile.preamble and
-# Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags in ProjectBuilder's Build Options inspector if at all possible.
-## To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-# Flags passed to libtool when building libraries
-OTHER_LIBTOOL_FLAGS =
-# For ordering named sections on NEXTSTEP (see ld(1))
-SECTORDER_FLAGS =
-
-# Stuff related to exporting headers from this project that isn't already
-# handled by PB.
-OTHER_PUBLIC_HEADERS =
-OTHER_PROJECT_HEADERS =
-OTHER_PRIVATE_HEADERS =
-
-# Set all three of these if you want a precomp to be built as part of
-# installation. The cc -precomp will be run in the specified dir on the
-# specified public header files with the specified additional flags. Don't put
-# $(DSTROOT) in PUBLIC_HEADER_DIR; this is done for you.
-PUBLIC_HEADER_DIR =
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-PRIVATE_HEADER_DIR =
-
-# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR#
-# (say, to add a subdirectory like "/sys"), you can use:
-PUBLIC_HEADER_DIR_SUFFIX =
-PRIVATE_HEADER_DIR_SUFFIX =
-
-# Additional (non-localized) resources for this project, which can be generated
-OTHER_RESOURCES =
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-BUILD_OFILES_LIST_ONLY =
-
-# Additional relocatables to be linked into this project
-OTHER_OFILES =
-# Additional libraries to link against
-OTHER_LIBS =
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-## Configure how things get built here. Additional dependencies, source files,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-
-# Targets to build before installation
-OTHER_INSTALL_DEPENDS =
-
-# A virtual root directory (other than /) to be prepended to the $(INSTALLDIR)
-# passed from ProjectBuilder.
-DSTROOT =
-
-# More obscure flags you might want to set for pswrap, yacc, lex, etc.
-PSWFLAGS =
-YFLAGS =
-LFLAGS =
-
-## Delete this line if you want fast and loose cleans that will not remove
-## things like precomps and user-defined OTHER_GARBAGE in subprojects.
-CLEAN_ALL_SUBPROJECTS = YES
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# After you have saved your project using the 4.0 PB, you will automatically
-# start using the makefiles in $(SYSTEM_DEVELOPER_DIR)/Makefiles/project. If you should
-# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to
-# be $(SYSTEM_DEVELOPER_DIR)/Makefiles/app.
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
-
+++ /dev/null
-{
- FILESTABLE = {
- C_FILES = ();
- H_FILES = ();
- M_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (makekey.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, makekey.8);
- SUBPROJECTS = ();
- };
- GENERATEMAIN = YES;
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_DOCUMENTEXTENSIONS = ();
- NEXTSTEP_INSTALLDIR = /usr/libexec;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/libexec;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = makekey;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/libexec;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = mkfile
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = mkfile
+Install_Dir = /usr/sbin
CFILES = mkfile.c
+MANPAGES = mkfile.8
-OTHERSRCS = Makefile.preamble Makefile.postamble mkfile.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /usr/sbin
-PDO_UNIX_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-after_install:
- install -d $(DSTROOT)/usr/share/man/man8
- install -c -m 444 mkfile.8 $(DSTROOT)/usr/share/man/man8
+++ /dev/null
-CLEAN_ALL_SUBPROJECTS = YES
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
+++ /dev/null
-{
- FILESTABLE = {
- C_FILES = ();
- H_FILES = ();
- M_FILES = ();
- OTHER_LINKED = (mkfile.c);
- OTHER_SOURCES = (Makefile.preamble);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = mkfile;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = newgrp
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = newgrp
+Install_Dir = /usr/bin
CFILES = newgrp.c
+MANPAGES = newgrp.1
-OTHERSRCS = Makefile Makefile.preamble Makefile.postamble newgrp.1
-
-NEXTSTEP_PB_CFLAGS += -D__FBSDID=__RCSID
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/$(NAME)/Build
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
+Extra_CC_Flags = -D__FBSDID=__RCSID
--include Makefile.postamble
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.dependencies
+Install_Program_Mode = 04555
+++ /dev/null
-INSTALL_AS_USER = root
-INSTALL_PERMISSIONS = 4555
-
-after_install:
- mkdir -p "$(DSTROOT)/usr/share/man/man1"
- install -c -m 644 newgrp.1 "$(DSTROOT)/usr/share/man/man1/newgrp.1"
+++ /dev/null
-
-AFTER_INSTALL = after_install
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- FRAMEWORKS = ();
- H_FILES = ();
- OTHER_LINKED = (newgrp.c);
- OTHER_SOURCES = (Makefile, Makefile.preamble, Makefile.postamble, newgrp.1);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDDIR = "/tmp/$(NAME)/Build";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = newgrp;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
+Project = nologin
+Install_Dir = /sbin
-NAME = nologin
+MANPAGES = nologin.8
-PROJECTVERSION = 2.6
-PROJECT_TYPE = Legacy
-LANGUAGE = English
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble Makefile.dist\
- nologin.8 nologin.sh
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = common.make
-NEXTSTEP_INSTALLDIR = /sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /$(USER)/BUILD
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+after_install:
+ $(INSTALL_SCRIPT) nologin.sh $(DSTROOT)/$(Install_Dir)/nologin
+++ /dev/null
-# @(#)Makefile 8.2 (Berkeley) 4/22/94
-
-MAN8= nologin.0
-
-nologin clean depend lint tags:
-
-beforeinstall:
- install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${.CURDIR}/nologin.sh ${DESTDIR}/sbin/nologin
-
-cleandir:
- rm -f nologin.0
-
-.include <bsd.prog.mk>
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of the directory to which resources are copied.
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0)
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-#
-###############################################################################
-
-
-# Change defaults assumed by the standard makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Versioning of frameworks, libraries, bundles, and palettes:
-#CURRENTLY_ACTIVE_VERSION = YES
- # Set to "NO" to produce a compatibility binary
-#DEPLOY_WITH_VERSION_NAME = A
- # This should be incremented as your API changes.
-#COMPATIBILITY_PROJECT_VERSION = 1
- # This should be incremented as your API grows.
-#CURRENT_PROJECT_VERSION = 1
- # Defaults to using the "vers_string" hack.
-
-# Some compiler flags can be easily overridden here, but onlytake effect at
-# the top-level:
-#OPTIMIZATION_CFLAG = -O
-#DEBUG_SYMBOLS_CFLAG = -g
-#WARNING_CFLAGS = -Wmost
-#DEBUG_BUILD_CFLAGS = -DDEBUG
-#PROFILE_BUILD_CFLAGS = -pg -DPROFILE
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Library and Framework projects only:
-# 1. If you want something other than the default .dylib name, override it here
-#DYLIB_INSTALL_NAME = lib$(NAME).dylib
-
-# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all.
-#DYLIB_INSTALL_DIR = $(INSTALLDIR)
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-# Options to strip for various project types. Note: -S strips debugging symbols
-# (executables can be stripped down further with -x or, if they load no bundles, with no
-# options at all).
-#APP_STRIP_OPTS = -S
-#TOOL_STRIP_OPTS = -S
-#LIBRARY_STRIP_OPTS = -S
- # for .a archives
-#DYNAMIC_STRIP_OPTS = -S
- # for bundles and shared libraries
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. "Official"
-# user-defined rules are:
-# * before_install
-# * after_install
-# * after_installhdrs
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-# Note: on MS Windows, executables, have an extension, so rules and dependencies
-# for generated tools should use $(EXECUTABLE_EXT) on the end.
-
-SHAREDIR = /usr/share
-MANDIR = $(SHAREDIR)/man/man8
-MANPAGE = nologin.8
-
-nologin: nologin.sh
- $(CP) nologin.sh ${SYM_DIR}/nologin
-
-after_install::
- $(CP) -p ${SYM_DIR}/nologin $(DSTROOT)$(INSTALLDIR)/nologin
- $(CHMOD) 555 $(DSTROOT)$(INSTALLDIR)/nologin
- $(MKDIRS) $(DSTROOT)$(MANDIR)
- $(CP) -f $(MANPAGE) $(DSTROOT)$(MANDIR)/$(MANPAGE)
- $(CHMOD) og-w $(DSTROOT)$(MANDIR)/$(MANPAGE)
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project. Each node in a project
-# tree of sub-projects, tools, etc. should have its own Makefile.preamble and
-# Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags in ProjectBuilder's Build Options inspector if at all possible.
-## To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-# Flags passed to libtool when building libraries
-OTHER_LIBTOOL_FLAGS =
-# For ordering named sections on NEXTSTEP (see ld(1))
-SECTORDER_FLAGS =
-
-# If you do not want any headers exported before compilations begin,
-# uncomment the following line. This can be a big time saver.
-#SKIP_EXPORTING_HEADERS = YES
-
-# Stuff related to exporting headers from this project that isn't already
-# handled by PB.
-OTHER_PUBLIC_HEADERS =
-OTHER_PROJECT_HEADERS =
-OTHER_PRIVATE_HEADERS =
-
-# Set these two macros if you want a precomp to be built as part of
-# installation. The cc -precomp will be run in the public header directory
-# on the specified public header files with the specified additional flags.
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-# Set this for library projects if you want to publish header files. If your
-# app or tool project exports headers Don't
-# include $(DSTROOT); this is added for you automatically.
-PUBLIC_HEADER_DIR =
-PRIVATE_HEADER_DIR =
-
-# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR#
-# (say, to add a subdirectory like "/sys"), you can use:
-PUBLIC_HEADER_DIR_SUFFIX =
-PRIVATE_HEADER_DIR_SUFFIX =
-
-# Set this for dynamic library projects on platforms where code which references
-# a dynamic library must link against an import library (i.e., Windows NT)
-# Don't include $(DSTROOT); this is added for you automatically.
-IMPORT_LIBRARY_DIR =
-
-# Additional (non-localized) resources for this project, which can be generated
-OTHER_RESOURCES =
-
-# Uncomment this to produce a static archive-style (.a) library
-#LIBRARY_STYLE = STATIC
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-BUILD_OFILES_LIST_ONLY =
-
-# Additional relocatables to be linked into this project
-OTHER_OFILES =
-# Additional libraries to link against
-OTHER_LIBS =
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-## Configure how things get built here. Additional dependencies, source files,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-
-# Targets to build before installation
-OTHER_INSTALL_DEPENDS =
-
-# More obscure flags you might want to set for pswrap, yacc, lex, etc.
-PSWFLAGS =
-YFLAGS =
-LFLAGS =
-
-## Delete this line if you want fast and loose cleans that will not remove
-## things like precomps and user-defined OTHER_GARBAGE in subprojects.
-CLEAN_ALL_SUBPROJECTS = YES
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-# .x files that should have rpcgen run on them
-RPCFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# After you have saved your project using the 4.0 PB, you will automatically
-# start using the makefiles in $(SYSTEM_DEVELOPER_DIR)/Makefiles/project. If you should
-# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to
-# be $(SYSTEM_DEVELOPER_DIR)/Makefiles/app.
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
--include ../Makefile.include
-OTHER_INITIAL_TARGETS = nologin
+++ /dev/null
-{
- APPCLASS = NSApplication;
- FILESTABLE = {
- FRAMEWORKS = ();
- M_FILES = ();
- OTHER_LINKED = ();
- OTHER_SOURCES = (
- Makefile.preamble,
- Makefile,
- Makefile.postamble,
- Makefile.dist,
- nologin.sh,
- nologin.8
- );
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_INSTALLDIR = "# Set in Makefile";
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_MAINNIB = nologin;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = "# Set in Makefile";
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_MAINNIB = nologin;
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = nologin;
- PROJECTTYPE = Legacy;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = "# Set in Makefile";
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_MAINNIB = nologin;
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = nvram
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = nvram
+Install_Dir = /usr/sbin
CFILES = nvram.c
+MANPAGES = nvram.8
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble nvram.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-FRAMEWORKS = -framework CoreFoundation -framework IOKit
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
+Extra_Frameworks = -framework CoreFoundation -framework IOKit
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of the directory to which resources are copied.
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0)
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-#
-###############################################################################
-
-
-# Change defaults assumed by the standard makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Versioning of frameworks, libraries, bundles, and palettes:
-#CURRENTLY_ACTIVE_VERSION = YES
- # Set to "NO" to produce a compatibility binary
-#DEPLOY_WITH_VERSION_NAME = A
- # This should be incremented as your API changes.
-#COMPATIBILITY_PROJECT_VERSION = 1
- # This should be incremented as your API grows.
-#CURRENT_PROJECT_VERSION = 1
- # Defaults to using the "vers_string" hack.
-
-# Some compiler flags can be easily overridden here, but onlytake effect at
-# the top-level:
-#OPTIMIZATION_CFLAG = -O
-#DEBUG_SYMBOLS_CFLAG = -g
-#WARNING_CFLAGS = -Wmost
-#DEBUG_BUILD_CFLAGS = -DDEBUG
-#PROFILE_BUILD_CFLAGS = -pg -DPROFILE
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Library and Framework projects only:
-# 1. If you want something other than the default .dylib name, override it here
-#DYLIB_INSTALL_NAME = lib$(NAME).dylib
-
-# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all.
-#DYLIB_INSTALL_DIR = $(INSTALLDIR)
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-# Options to strip for various project types. Note: -S strips debugging symbols
-# (executables can be stripped down further with -x or, if they load no bundles, with no
-# options at all).
-#APP_STRIP_OPTS = -S
-#TOOL_STRIP_OPTS = -S
-#LIBRARY_STRIP_OPTS = -S
- # for .a archives
-#DYNAMIC_STRIP_OPTS = -S
- # for bundles and shared libraries
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. "Official"
-# user-defined rules are:
-# * before_install
-# * after_install
-# * after_installhdrs
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-# Note: on MS Windows, executables, have an extension, so rules and dependencies
-# for generated tools should use $(EXECUTABLE_EXT) on the end.
-
-# Don't use IMPLICIT_SOURCE_FILES since that will get the CVS directory
-# too. Instead, list the files in that directory in the OTHERSRCS line
-#IMPLICIT_SOURCE_FILES += nvram
-
-PAX = /bin/pax
-SHAREDIR = /usr/share
-MANDIR = $(SHAREDIR)/man/man8
-MANPAGE = nvram.8
-
-after_install::
- $(MKDIRS) $(DSTROOT)$(MANDIR)
- $(CP) -f $(MANPAGE) $(DSTROOT)$(MANDIR)/$(MANPAGE)
- $(CHMOD) og-w $(DSTROOT)$(MANDIR)/$(MANPAGE)
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project. Each node in a project
-# tree of sub-projects, tools, etc. should have its own Makefile.preamble and
-# Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags in ProjectBuilder's Build Options inspector if at all possible.
-## To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-# Flags passed to libtool when building libraries
-OTHER_LIBTOOL_FLAGS =
-# For ordering named sections on NEXTSTEP (see ld(1))
-SECTORDER_FLAGS =
-
-# If you do not want any headers exported before compilations begin,
-# uncomment the following line. This can be a big time saver.
-#SKIP_EXPORTING_HEADERS = YES
-
-# Stuff related to exporting headers from this project that isn't already
-# handled by PB.
-OTHER_PUBLIC_HEADERS =
-OTHER_PROJECT_HEADERS =
-OTHER_PRIVATE_HEADERS =
-
-# Set these two macros if you want a precomp to be built as part of
-# installation. The cc -precomp will be run in the public header directory
-# on the specified public header files with the specified additional flags.
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-# Set this for library projects if you want to publish header files. If your
-# app or tool project exports headers Don't
-# include $(DSTROOT); this is added for you automatically.
-PUBLIC_HEADER_DIR =
-PRIVATE_HEADER_DIR =
-
-# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR#
-# (say, to add a subdirectory like "/sys"), you can use:
-PUBLIC_HEADER_DIR_SUFFIX =
-PRIVATE_HEADER_DIR_SUFFIX =
-
-# Set this for dynamic library projects on platforms where code which references
-# a dynamic library must link against an import library (i.e., Windows NT)
-# Don't include $(DSTROOT); this is added for you automatically.
-IMPORT_LIBRARY_DIR =
-
-# Additional (non-localized) resources for this project, which can be generated
-OTHER_RESOURCES =
-
-# Uncomment this to produce a static archive-style (.a) library
-#LIBRARY_STYLE = STATIC
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-BUILD_OFILES_LIST_ONLY =
-
-# Additional relocatables to be linked into this project
-OTHER_OFILES =
-# Additional libraries to link against
-OTHER_LIBS =
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-## Configure how things get built here. Additional dependencies, source files,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-
-# Targets to build before installation
-OTHER_INSTALL_DEPENDS =
-
-# More obscure flags you might want to set for pswrap, yacc, lex, etc.
-PSWFLAGS =
-YFLAGS =
-LFLAGS =
-
-## Delete this line if you want fast and loose cleans that will not remove
-## things like precomps and user-defined OTHER_GARBAGE in subprojects.
-CLEAN_ALL_SUBPROJECTS = YES
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-# .x files that should have rpcgen run on them
-RPCFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# After you have saved your project using the 4.0 PB, you will automatically
-# start using the makefiles in $(SYSTEM_DEVELOPER_DIR)/Makefiles/project. If you should
-# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to
-# be $(SYSTEM_DEVELOPER_DIR)/Makefiles/app.
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- BUNDLES = ();
- FRAMEWORKS = (CoreFoundation.framework, IOKit.framework);
- H_FILES = ();
- LIBS = ();
- OTHER_LINKED = (nvram.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, nvram.8);
- SUBPROJECTS = ();
- TOOLS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDDIR = "/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = nvram;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
+Project = pagesize
+Install_Dir = /usr/bin
-NAME = pagesize
+MANPAGES = pagesize.1
-PROJECTVERSION = 2.6
-PROJECT_TYPE = Legacy
-LANGUAGE = English
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble Makefile.dist\
- pagesize.1 pagesize.sh
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = common.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /$(USER)/BUILD
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+after_install:
+ $(INSTALL_SCRIPT) pagesize.sh $(DSTROOT)/$(Install_Dir)/pagesize
+++ /dev/null
-# @(#)Makefile 8.2 (Berkeley) 4/3/94
-
-MAN1= pagesize.0
-
-all pagesize: ${MAN1}
-
-clean depend lint tags:
-
-cleandir:
- rm -f ${MAN1}
-
-install: maninstall
- install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${.CURDIR}/pagesize.sh ${DESTDIR}/${BINDIR}/pagesize
-
-.include <bsd.prog.mk>
-.include <bsd.man.mk>
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of the directory to which resources are copied.
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0)
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-#
-###############################################################################
-
-
-# Change defaults assumed by the standard makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Versioning of frameworks, libraries, bundles, and palettes:
-#CURRENTLY_ACTIVE_VERSION = YES
- # Set to "NO" to produce a compatibility binary
-#DEPLOY_WITH_VERSION_NAME = A
- # This should be incremented as your API changes.
-#COMPATIBILITY_PROJECT_VERSION = 1
- # This should be incremented as your API grows.
-#CURRENT_PROJECT_VERSION = 1
- # Defaults to using the "vers_string" hack.
-
-# Some compiler flags can be easily overridden here, but onlytake effect at
-# the top-level:
-#OPTIMIZATION_CFLAG = -O
-#DEBUG_SYMBOLS_CFLAG = -g
-#WARNING_CFLAGS = -Wmost
-#DEBUG_BUILD_CFLAGS = -DDEBUG
-#PROFILE_BUILD_CFLAGS = -pg -DPROFILE
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Library and Framework projects only:
-# 1. If you want something other than the default .dylib name, override it here
-#DYLIB_INSTALL_NAME = lib$(NAME).dylib
-
-# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all.
-#DYLIB_INSTALL_DIR = $(INSTALLDIR)
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-# Options to strip for various project types. Note: -S strips debugging symbols
-# (executables can be stripped down further with -x or, if they load no bundles, with no
-# options at all).
-#APP_STRIP_OPTS = -S
-#TOOL_STRIP_OPTS = -S
-#LIBRARY_STRIP_OPTS = -S
- # for .a archives
-#DYNAMIC_STRIP_OPTS = -S
- # for bundles and shared libraries
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. "Official"
-# user-defined rules are:
-# * before_install
-# * after_install
-# * after_installhdrs
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-# Note: on MS Windows, executables, have an extension, so rules and dependencies
-# for generated tools should use $(EXECUTABLE_EXT) on the end.
-
-pagesize: pagesize.sh
- $(CP) pagesize.sh ${SYM_DIR}/pagesize
-
-after_install::
- $(CP) -p ${SYM_DIR}/pagesize $(DSTROOT)$(INSTALLDIR)/pagesize
- $(CHMOD) 555 $(DSTROOT)$(INSTALLDIR)/pagesize
- mkdir -p $(DSTROOT)/usr/share/man/man1
- install -c -m 444 pagesize.1 $(DSTROOT)/usr/share/man/man1
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project. Each node in a project
-# tree of sub-projects, tools, etc. should have its own Makefile.preamble and
-# Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags in ProjectBuilder's Build Options inspector if at all possible.
-## To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-# Flags passed to libtool when building libraries
-OTHER_LIBTOOL_FLAGS =
-# For ordering named sections on NEXTSTEP (see ld(1))
-SECTORDER_FLAGS =
-
-# If you do not want any headers exported before compilations begin,
-# uncomment the following line. This can be a big time saver.
-#SKIP_EXPORTING_HEADERS = YES
-
-# Stuff related to exporting headers from this project that isn't already
-# handled by PB.
-OTHER_PUBLIC_HEADERS =
-OTHER_PROJECT_HEADERS =
-OTHER_PRIVATE_HEADERS =
-
-# Set these two macros if you want a precomp to be built as part of
-# installation. The cc -precomp will be run in the public header directory
-# on the specified public header files with the specified additional flags.
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-# Set this for library projects if you want to publish header files. If your
-# app or tool project exports headers Don't
-# include $(DSTROOT); this is added for you automatically.
-PUBLIC_HEADER_DIR =
-PRIVATE_HEADER_DIR =
-
-# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR#
-# (say, to add a subdirectory like "/sys"), you can use:
-PUBLIC_HEADER_DIR_SUFFIX =
-PRIVATE_HEADER_DIR_SUFFIX =
-
-# Set this for dynamic library projects on platforms where code which references
-# a dynamic library must link against an import library (i.e., Windows NT)
-# Don't include $(DSTROOT); this is added for you automatically.
-IMPORT_LIBRARY_DIR =
-
-# Additional (non-localized) resources for this project, which can be generated
-OTHER_RESOURCES =
-
-# Uncomment this to produce a static archive-style (.a) library
-#LIBRARY_STYLE = STATIC
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-BUILD_OFILES_LIST_ONLY =
-
-# Additional relocatables to be linked into this project
-OTHER_OFILES =
-# Additional libraries to link against
-OTHER_LIBS =
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-## Configure how things get built here. Additional dependencies, source files,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-
-# Targets to build before installation
-OTHER_INSTALL_DEPENDS =
-
-# More obscure flags you might want to set for pswrap, yacc, lex, etc.
-PSWFLAGS =
-YFLAGS =
-LFLAGS =
-
-## Delete this line if you want fast and loose cleans that will not remove
-## things like precomps and user-defined OTHER_GARBAGE in subprojects.
-CLEAN_ALL_SUBPROJECTS = YES
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-# .x files that should have rpcgen run on them
-RPCFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# After you have saved your project using the 4.0 PB, you will automatically
-# start using the makefiles in $(SYSTEM_DEVELOPER_DIR)/Makefiles/project. If you should
-# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to
-# be $(SYSTEM_DEVELOPER_DIR)/Makefiles/app.
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
--include ../Makefile.include
-OTHER_INITIAL_TARGETS = pagesize
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- CLASSES = ();
- H_FILES = ();
- OTHER_LINKED = ();
- OTHER_SOURCES = (
- Makefile.preamble,
- Makefile,
- Makefile.postamble,
- Makefile.dist,
- pagesize.sh,
- pagesize.1
- );
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_DOCUMENTEXTENSIONS = ();
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /usr/bin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = pagesize;
- PROJECTTYPE = Legacy;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /usr/bin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = passwd
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = passwd
+Install_Dir = /usr/bin
HFILES = stringops.h
+CFILES = passwd.c file_passwd.c stringops.c
+MANPAGES = passwd.1
-CFILES = nis_passwd.c file_passwd.c od_passwd.c passwd.c\
- stringops.c
-
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble passwd.1
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /usr/bin
-PDO_UNIX_INSTALLDIR = /usr/bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-FRAMEWORK_PATHS = -F/System/Library/PrivateFrameworks
-FRAMEWORKS = -framework OpenDirectory -framework CoreFoundation
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
+Embedded=$(shell tconf --test TARGET_OS_EMBEDDED)
-include $(MAKEFILEDIR)/$(MAKEFILE)
+ifeq ($(Embedded),NO)
+CFILES += nis_passwd.c od_passwd.c
+Extra_Frameworks = -F/System/Library/PrivateFrameworks -framework OpenDirectory -framework CoreFoundation
+Extra_CC_Flags = -F/System/Library/PrivateFrameworks
+endif
--include Makefile.postamble
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.dependencies
+Install_Program_Mode = 04555
+++ /dev/null
-VPATH += :../chpass.tproj:../vipw.tproj
-
-INSTALL_AS_USER = root
-INSTALL_PERMISSIONS = 4555
-#CHFLAGS = /usr/bin/chflags
-
-#after_install::
-# $(CHFLAGS) schg $(DSTROOT)$(INSTALLDIR)/$(NAME)
-
-install-man-page:
- install -d $(DSTROOT)/usr/share/man/man1
- install -c -m 444 passwd.1 $(DSTROOT)/usr/share/man/man1/passwd.1
+++ /dev/null
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-CLEAN_ALL_SUBPROJECTS = YES
-AFTER_INSTALL += install-man-page
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- CLASSES = ();
- C_FILES = ();
- H_FILES = (stringops.h);
- OTHER_LIBS = ();
- OTHER_LINKED = (nis_passwd.c, file_passwd.c, passwd.c, stringops.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, passwd.1);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /usr/bin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = passwd;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /usr/bin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
#include <TargetConditionals.h>
#define INFO_FILE 1
-#define INFO_NIS 2
#if !TARGET_OS_EMBEDDED
+#define INFO_NIS 2
#define INFO_OPEN_DIRECTORY 3
#endif
case 'i':
if (!strcasecmp(optarg, "file")) {
infosystem = INFO_FILE;
+#ifdef INFO_NIS
} else if (!strcasecmp(optarg, "NIS")) {
infosystem = INFO_NIS;
} else if (!strcasecmp(optarg, "YP")) {
infosystem = INFO_NIS;
+#endif
#ifdef INFO_OPEN_DIRECTORY
} else if (!strcasecmp(optarg, "opendirectory")) {
infosystem = INFO_OPEN_DIRECTORY;
case INFO_FILE:
file_passwd(user, locn);
break;
+#ifdef INFO_NIS
case INFO_NIS:
nis_passwd(user, locn);
break;
+#endif
#ifdef INFO_OPEN_DIRECTORY
case INFO_OPEN_DIRECTORY:
od_passwd(user, locn, auth);
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = pwd_mkdb
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = pwd_mkdb
+Install_Dir = /usr/sbin
HFILES = pw_scan.h
-
CFILES = pwd_mkdb.c pw_scan.c
-
OTHERSRCS = Makefile.preamble Makefile Makefile.postamble pwd_mkdb.8
+MANPAGES = pwd_mkdb.8
+Extra_CC_Flags = -D_PW_NAME_LEN=MAXLOGNAME -D_PW_YPTOKEN=\"__YP!\"
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /usr/sbin
-PDO_UNIX_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of top-level app-wrapper (e.g., Webster.app)
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# ENGLISH - boolean flag set iff $(LANGUAGE) = "English"
-# JAPANESE - boolean flag set iff $(LANGUAGE) = "Japanese"
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder that output Makefile
-# APPICON - application icon file
-# DOCICONS - dock icon files
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-
-
-# Change defaults assumed by the standard app makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Add Makefile.preamble, Makefile.postamble, and Makefile.dependencies here if
-# you would like changes to them to invalidate previous builds. The project
-# depends on $(MAKEFILES) so that changes to Makefiles will trigger a re-build.
-#MAKEFILES = Makefile
-
-# Optimization flag passed to compiler:
-#OPTIMIZATION_CFLAG = -O
-
-# Flags always passed to compiler:
-#COMMON_CFLAGS = $(PROJECT_SPECIFIC_CFLAGS) -g -Wall
-
-# Flags passed to compiler in normal 'app' compiles:
-#NORMAL_CFLAGS = $(COMMON_CFLAGS) $(OPTIMIZATION_CFLAG)
-
-# Flags passed to compiler in 'debug' compiles:
-#DEBUG_CFLAGS = $(COMMON_CFLAGS) -DDEBUG
-
-# Flags passed to compiler in 'profile' compiles
-#PROFILE_CFLAGS = $(COMMON_CFLAGS) -pg $(OPTIMIZATION_CFLAG) -DPROFILE
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root # User to chown app to
-#INSTALL_AS_GROUP = wheel # Group to chgrp app to
-#INSTALL_PERMISSIONS = # If set, 'install' chmod's executable to this
-
-# Options to strip for bundles, apps with bundles, and apps without bundles,
-# respectively.
-#RELOCATABLE_STRIP_OPTS = -x -u
-#DYLD_APP_STRIP_OPTS = -A -n
-#APP_STRIP_OPTS =
-#TOOL_STRIP_OPTS =
-#LIBRARY_STRIP_OPTS = -x -S # Note: -S strips debugging symbols
-# (Note: APP_STRIP_OPTS and TOOL_STRIP_OPTS default to empty, but
-# developers doing their own dynamic loading should set this to
-# $(DYLD_APP_STRIP_OPTS)).
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Typical
-# user-defined rules are before_install and after_install (please don't
-# redefine things like install or app, as they are owned by the top-level
-# Makefile API), which are rules that get invoked before and after the install
-# target runs. Such rules should be specified with the '::' syntax rather than
-# a single colon.
-
-install-man-page:
- install -d $(DSTROOT)/usr/share/man/man8
- install -c -m 444 pwd_mkdb.8 $(DSTROOT)/usr/share/man/man8/pwd_mkdb.8
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags here. To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS = -D_PW_NAME_LEN=MAXLOGNAME -D_PW_YPTOKEN=\"__YP!\"
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-
-BUNDLELDFLAGS = # use iff project is a bundle
-PALETTELDFLAGS = # use iff project is a palette
-
-## Specify which headers in this project should be published to the outside
-## world in a flat header directory given in PUBLIC_HEADER_DIR (which will be
-## prepended by DSTROOT, below. Any subset of these public headers can be
-## precompiled automatically after installation, with extra user-defined flags.
-PUBLIC_HEADER_DIR =
-PUBLIC_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-## Configure what is linked in at each level here. Libraries are only used in
-## the final 'app' linking step. Final 'app' linking is only done via the
-## 'app', 'debug', and 'profile' targets when they are invoked for
-## the top-level app.
-
-# Additional relocatables to be linked in at this level
-OTHER_OFILES =
-# Additional libs to link apps against ('app' target)
-#OTHER_LIBS =
-# Additional libs to link apps against ('debug' target)
-OTHER_DEBUG_LIBS =
-# Additional libs to link apps against ('profile' target)
-OTHER_PROF_LIBS =
-
-# More 'app' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_LIBS =
-# More 'debug' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_DEBUG_LIBS =
-# More 'profile' libs when $(JAPANESE) = "YES"
-OTHER_JAPANESE_PROF_LIBS =
-
-# If this is a bundle, and you *know* the enclosing application will not
-# be linking with a library which you require in your bundle code, then
-# mention it here so that it gets linked into the bundle. Note that this
-# is wasteful but sometimes necessary.
-BUNDLE_LIBS =
-
-## Configure how things get built here. Additional dependencies, sourcefiles,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-# Precompiled headers to be built before any compilation occurs (e.g., draw.p)
-PRECOMPS =
-
-# Targets to be built before installation
-OTHER_INSTALL_DEPENDS =
-
-# A virtual root directory (other than /) to be prepended to the $(INSTALLDIR)
-# passed from ProjectBuilder.
-DSTROOT =
-
-# Set the following to "YES" if you want the old behavior of recursively
-# cleaning all nested subprojects during 'make clean'.
-CLEAN_ALL_SUBPROJECTS =
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-AFTER_INSTALL += install-man-page
-
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- C_FILES = ();
- H_FILES = (pw_scan.h);
- OTHER_LIBS = ();
- OTHER_LINKED = (pwd_mkdb.c, pw_scan.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, pwd_mkdb.8);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- GENERATEMAIN = YES;
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = pwd_mkdb;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = reboot
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = reboot
+Install_Dir = /sbin
CFILES = reboot.c
-DEFSFILES = kextmanager.defs
-
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble Makefile.dist\
- boot_hp300.8 boot_i386.8 boot_sparc.8 boot_tahoe.8\
- boot_vax.8 reboot.8 $(DEFSFILES)
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /sbin
-WINDOWS_INSTALLDIR = /sbin
-PDO_UNIX_INSTALLDIR = /sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
+MANPAGES = reboot.8
-include $(MAKEFILEDIR)/$(MAKEFILE)
+Embedded = $(shell tconf --test TARGET_OS_EMBEDDED)
+ifeq ($(Embedded),NO)
+USERDEFS = kextmanager.defs
+endif
--include Makefile.postamble
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.dependencies
+after_install:
+ $(LN) $(DSTROOT)/$(Install_Dir)/reboot $(DSTROOT)$(Install_Dir)/halt
+ $(LN) -fs reboot.8 $(DSTROOT)/usr/share/man/man8/halt.8
+++ /dev/null
-# @(#)Makefile 8.1 (Berkeley) 6/5/93
-
-PROG= reboot
-DPADD= ${LIBUTIL}
-LDADD= -lutil
-MAN8= reboot.0 boot_hp300.0 boot_i386.0 boot_sparc.0 boot_tahoe.0 boot_vax.0
-MLINKS= reboot.8 halt.8
-LINKS= ${BINDIR}/reboot ${BINDIR}/halt
-
-afterinstall:
- ${MINSTALL} boot_hp300.0 ${DESTDIR}${MANDIR}8/hp300/boot.0
- ${MINSTALL} boot_i386.0 ${DESTDIR}${MANDIR}8/i386/boot.0
- ${MINSTALL} boot_sparc.0 ${DESTDIR}${MANDIR}8/sparc/boot.0
- ${MINSTALL} boot_tahoe.0 ${DESTDIR}${MANDIR}8/tahoe/boot.0
- ${MINSTALL} boot_vax.0 ${DESTDIR}${MANDIR}8/vax/boot.0
-
-.include <bsd.man.mk>
-.include <bsd.prog.mk>
+++ /dev/null
-after_install::
- $(LN) $(INSTALLED_PRODUCTS) $(DSTROOT)$(INSTALLDIR)/halt
- mkdir -p $(DSTROOT)/usr/share/man/man8
- install -c -m 444 reboot.8 $(DSTROOT)/usr/share/man/man8/
- ln $(DSTROOT)/usr/share/man/man8/reboot.8 $(DSTROOT)/usr/share/man/man8/halt.8
+++ /dev/null
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-OTHER_OFILES = kextmanagerUser.o
-# OTHER_CFLAGS += -O0
+++ /dev/null
-{
- APPCLASS = NSApplication;
- FILESTABLE = {
- FRAMEWORKS = ();
- H_FILES = ();
- M_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (reboot.c);
- OTHER_SOURCES = (
- Makefile.preamble,
- Makefile,
- Makefile.postamble,
- Makefile.dist,
- boot_hp300.8,
- boot_i386.8,
- boot_sparc.8,
- boot_tahoe.8,
- boot_vax.8,
- reboot.8
- );
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_INSTALLDIR = /sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_MAINNIB = reboot;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_MAINNIB = reboot;
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = reboot;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_MAINNIB = reboot;
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
#include <unistd.h>
#ifdef __APPLE__
+#include <TargetConditionals.h>
+#if !TARGET_OS_EMBEDDED
#include "kextmanager.h"
#include <IOKit/kext/kextmanager_types.h>
+#endif
#include <mach/mach_port.h> // allocate
#include <mach/mach.h> // task_self, etc
#include <servers/bootstrap.h> // bootstrap
void usage(void);
u_int get_pageins(void);
-#ifdef __APPLE__
+#if defined(__APPLE__) && !TARGET_OS_EMBEDDED
int reserve_reboot(void);
#endif
break;
case 'q':
qflag = 1;
+ howto |= RB_QUICK;
break;
case '?':
default:
err(1, NULL);
}
-#ifdef __APPLE__
+#if defined(__APPLE__) && !TARGET_OS_EMBEDDED
if (!lflag) { // shutdown(8) has already checked w/kextd
if ((errno = reserve_reboot()) && !qflag)
err(1, "couldn't lock for reboot");
#endif
if (qflag) {
+ #ifdef __APPLE__
+ // launchd(8) handles reboot. This call returns NULL on success.
+ exit(reboot2(howto) == NULL ? EXIT_SUCCESS : EXIT_FAILURE);
+ #else /* __APPLE__ */
reboot(howto);
+ #endif /* __APPLE__ */
err(1, NULL);
}
return pageins;
}
-#ifdef __APPLE__
+#if defined(__APPLE__) && !TARGET_OS_EMBEDDED
// XX this routine is also in shutdown.tproj; it would be nice to share
#define WAITFORLOCK 1
-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = sa
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = sa
+Install_Dir = /usr/sbin
CFILES = main.c pdb.c usrdb.c
+MANPAGES = sa.8
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble extern.h pathnames.h \
- sa.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /Library/Executables
-PDO_UNIX_INSTALLDIR = /bin
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-HEADER_PATHS = -I$(NEXT_ROOT)/System/Library/System.framework/\
- -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders\
- -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd\
- -I$(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders/bsd
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS = 4555
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-
-install-man-page:
- install -d $(DSTROOT)/usr/share/man/man8
- install -c -m 444 sa.8 $(DSTROOT)/usr/share/man/man8/sa.8
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-# Before the main makefile is included for this project, you may set:
-#
-# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
-# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
-
-# Compiler/linker flags added to the defaults: The OTHER_* variables will be
-# inherited by all nested sub-projects, but the LOCAL_ versions of the same
-# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
-# Build Attributes inspector if at all possible. To override the default flags
-# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
-# variables below are *inputs* to the build process and distinct from the override
-# settings done (less often) in the Makefile.postamble.
-#
-# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
-# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
-# .cc, .cxx, .C, and .M files. There is no need to respecify the
-# flags in OTHER_MFLAGS, etc.
-# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
-# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
-# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
-# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
-# precompiling header files
-# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
-# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
-# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
-# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
-# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-# AFTER_INSTALL: targets to build after installing the product
-# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
-# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
-#
-# BEFORE_INSTALLHDRS: targets to build before installing headers for a
-# subproject
-# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
-# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
-# AFTER_INSTALLSRC: targets to build after installing source for a subproject
-#
-# BEFORE_DEPEND: targets to build before building dependencies for a
-# subproject
-# AFTER_DEPEND: targets to build after building dependencies for a
-# subproject
-#
-# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
-# updated every time the project is built. If NO, the dependency
-# file is only built when the depend target is invoked.
-
-# Framework-related variables:
-# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the framework's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-
-# Library-related variables:
-# PUBLIC_HEADER_DIR: Determines where public exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically. For library projects you should
-# set this to something like /Developer/Headers/$(NAME). Do not set
-# this variable for framework projects unless you do not want the
-# header files included in the framework.
-# PRIVATE_HEADER_DIR: Determines where private exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
-# whether the libraries produced are statically linked when they
-# are used or if they are dynamically loadable. This defaults to
-# DYNAMIC.
-# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the library's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-#
-# INSTALL_AS_USER: owner of the intalled products (default root)
-# INSTALL_AS_GROUP: group of the installed products (default wheel)
-# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
-#
-# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
-# passed on the command line to recursive invocations of make. Note that
-# the values in OTHER_*FLAGS are inherited by subprojects automatically --
-# you do not have to (and shouldn't) add OTHER_*FLAGS to
-# OTHER_RECURSIVE_VARIABLES.
-
-# Additional headers to export beyond those in the PB.project:
-# OTHER_PUBLIC_HEADERS
-# OTHER_PROJECT_HEADERS
-# OTHER_PRIVATE_HEADERS
-
-# Additional files for the project's product: <<path relative to proj?>>
-# OTHER_RESOURCES: (non-localized) resources for this project
-# OTHER_OFILES: relocatables to be linked into this project
-# OTHER_LIBS: more libraries to link against
-# OTHER_PRODUCT_DEPENDS: other dependencies of this project
-# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
-# OTHER_GARBAGE: additional files to be removed by `make clean'
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-# BUILD_OFILES_LIST_ONLY
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Uncomment to suppress generation of a KeyValueCoding index when installing
-# frameworks (This index is used by WOB and IB to determine keys available
-# for an object). Set to YES by default.
-# PREINDEX_FRAMEWORK = NO
-
-# Change this definition to install projects somewhere other than the
-# standard locations. NEXT_ROOT defaults to "C:/Apple" on Windows systems
-# and "" on other systems.
-DSTROOT = $(HOME)
-
-AFTER_INSTALL += install-man-page
-
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- HEADERSEARCH = ("$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd");
- OTHER_LINKED = (main.c, pdb.c, usrdb.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, sa.8, extern.h, pathnames.h);
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_COMPILEROPTIONS = "-DKERNEL_PRIVATE";
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_INSTALLDIR = /bin;
- PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = sa;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_INSTALLDIR = /Library/Executables;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = sadc
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = sadc
+Install_Dir = /usr/lib/sa
HFILES = sadc.h
-
CFILES = sadc.c
+MANPAGES = sa1.8 sa2.8 sadc.8
OTHERSRCS = Makefile.preamble Makefile Makefile.postamble sa1.8 sa1.sh\
sa2.8 sa2.sh sadc.8
+Extra_CC_Flags = -I.
+Extra_Frameworks = -framework CoreFoundation -framework IOKit
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/lib/sa
-WINDOWS_INSTALLDIR = /Library/Executables
-PDO_UNIX_INSTALLDIR = /bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-FRAMEWORKS = -framework CoreFoundation -framework IOKit
-
-PROJECT_HEADERS = sadc.h
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.postamble
+Install_Program_Mode = 04555
--include Makefile.dependencies
+after_install:
+ $(INSTALL_DIRECTORY) $(DSTROOT)/private/var/log/sa
+ $(INSTALL_DIRECTORY) $(DSTROOT)/$(Install_Dir)
+ $(INSTALL_FILE) sa1.sh $(DSTROOT)$(Install_Dir)/sa1
+ $(CHMOD) 0555 $(DSTROOT)$(Install_Dir)/sa1
+ $(INSTALL_FILE) sa2.sh $(DSTROOT)$(Install_Dir)/sa2
+ $(CHMOD) 0555 $(DSTROOT)$(Install_Dir)/sa2
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-
-WARNING_CFLAGS = -Wall
-
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-
-INSTALL_AS_USER = root
-INSTALL_PERMISSIONS = 4555
-INSTALLDIR = /usr/lib/sa
-LOGDIR = /private/var/log/sa
-SHAREDIR = /usr/share
-MANDIR = $(SHAREDIR)/man/man8
-
-
-sa1: sa1.sh
- $(CP) sa1.sh ${SYM_DIR}/sa1
-
-sa2: sa2.sh
- $(CP) sa2.sh ${SYM_DIR}/sa2
-
-install-shell-scripts:
- $(MKDIRS) $(DSTROOT)/$(LOGDIR)
- $(MKDIRS) $(DSTROOT)/$(INSTALLDIR)
- $(CP) -p ${SYM_DIR}/sa1 $(DSTROOT)$(INSTALLDIR)/sa1
- $(CHMOD) 555 $(DSTROOT)$(INSTALLDIR)/sa1
- $(CP) -p ${SYM_DIR}/sa2 $(DSTROOT)$(INSTALLDIR)/sa2
- $(CHMOD) 555 $(DSTROOT)$(INSTALLDIR)/sa2
-
-install-man-pages:
- $(MKDIRS) $(DSTROOT)$(MANDIR)
- install -c -m 444 sadc.8 $(DSTROOT)$(MANDIR)/sadc.8
- install -c -m 444 sa1.8 $(DSTROOT)$(MANDIR)/sa1.8
- install -c -m 444 sa2.8 $(DSTROOT)$(MANDIR)/sa2.8
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-# Before the main makefile is included for this project, you may set:
-#
-# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
-# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
-
-# Compiler/linker flags added to the defaults: The OTHER_* variables will be
-# inherited by all nested sub-projects, but the LOCAL_ versions of the same
-# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
-# Build Attributes inspector if at all possible. To override the default flags
-# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
-# variables below are *inputs* to the build process and distinct from the override
-# settings done (less often) in the Makefile.postamble.
-#
-# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
-# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
-# .cc, .cxx, .C, and .M files. There is no need to respecify the
-# flags in OTHER_MFLAGS, etc.
-# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
-# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
-# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
-# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
-# precompiling header files
-# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
-# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
-# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
-# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
-# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-
-BEFORE_INSTALL += sa1 sa2
-
-# AFTER_INSTALL: targets to build after installing the product
-
-AFTER_INSTALL += install-shell-scripts install-man-pages
-
-# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
-# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
-#
-# BEFORE_INSTALLHDRS: targets to build before installing headers for a
-# subproject
-# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
-# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
-# AFTER_INSTALLSRC: targets to build after installing source for a subproject
-#
-# BEFORE_DEPEND: targets to build before building dependencies for a
-# subproject
-# AFTER_DEPEND: targets to build after building dependencies for a
-# subproject
-#
-# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
-# updated every time the project is built. If NO, the dependency
-# file is only built when the depend target is invoked.
-
-# Framework-related variables:
-# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the framework's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-
-# Library-related variables:
-# PUBLIC_HEADER_DIR: Determines where public exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically. For library projects you should
-# set this to something like /Developer/Headers/$(NAME). Do not set
-# this variable for framework projects unless you do not want the
-# header files included in the framework.
-# PRIVATE_HEADER_DIR: Determines where private exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
-# whether the libraries produced are statically linked when they
-# are used or if they are dynamically loadable. This defaults to
-# DYNAMIC.
-# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the library's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-#
-# INSTALL_AS_USER: owner of the intalled products (default root)
-# INSTALL_AS_GROUP: group of the installed products (default wheel)
-# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
-#
-# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
-# passed on the command line to recursive invocations of make. Note that
-# the values in OTHER_*FLAGS are inherited by subprojects automatically --
-# you do not have to (and shouldn't) add OTHER_*FLAGS to
-# OTHER_RECURSIVE_VARIABLES.
-
-# Additional headers to export beyond those in the PB.project:
-# OTHER_PUBLIC_HEADERS
-# OTHER_PROJECT_HEADERS
-# OTHER_PRIVATE_HEADERS
-
-# Additional files for the project's product: <<path relative to proj?>>
-# OTHER_RESOURCES: (non-localized) resources for this project
-# OTHER_OFILES: relocatables to be linked into this project
-# OTHER_LIBS: more libraries to link against
-# OTHER_PRODUCT_DEPENDS: other dependencies of this project
-# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
-# OTHER_GARBAGE: additional files to be removed by `make clean'
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-# BUILD_OFILES_LIST_ONLY
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Uncomment to suppress generation of a KeyValueCoding index when installing
-# frameworks (This index is used by WOB and IB to determine keys available
-# for an object). Set to YES by default.
-# PREINDEX_FRAMEWORK = NO
-
-# Change this definition to install projects somewhere other than the
-# standard locations. NEXT_ROOT defaults to "C:/Apple" on Windows systems
-# and "" on other systems.
-DSTROOT = $(HOME)
+++ /dev/null
-{
- "DYNAMIC_CODE_GEN" = YES;
- FILESTABLE = {
- FRAMEWORKS = ("CoreFoundation.framework", "IOKit.framework");
- FRAMEWORKSEARCH = ();
- "H_FILES" = ("sadc.h");
- LIBRARYSEARCH = ();
- "OTHER_LINKED" = ("sadc.c");
- "OTHER_SOURCES" = (
- "Makefile.preamble",
- Makefile,
- "Makefile.postamble",
- "sa1.8",
- "sa1.sh",
- "sa2.8",
- "sa2.sh",
- "sadc.8"
- );
- "PROJECT_HEADERS" = ("sadc.h");
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- "NEXTSTEP_BUILDTOOL" = "/usr/bin/gnumake";
- "NEXTSTEP_INSTALLDIR" = "/usr/lib/sa";
- "NEXTSTEP_JAVA_COMPILER" = "/usr/bin/javac";
- "NEXTSTEP_OBJCPLUS_COMPILER" = "/usr/bin/cc";
- "PDO_UNIX_BUILDTOOL" = "$NEXT_ROOT/Developer/bin/make";
- "PDO_UNIX_INSTALLDIR" = "/bin";
- "PDO_UNIX_JAVA_COMPILER" = "$(JDKBINDIR)/javac";
- "PDO_UNIX_OBJCPLUS_COMPILER" = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = sadc;
- PROJECTTYPE = Tool;
- PROJECTVERSION = "2.8";
- "WINDOWS_BUILDTOOL" = "$NEXT_ROOT/Developer/Executables/make";
- "WINDOWS_INSTALLDIR" = "/Library/Executables";
- "WINDOWS_JAVA_COMPILER" = "$(JDKBINDIR)/javac.exe";
- "WINDOWS_OBJCPLUS_COMPILER" = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = sar
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = sar
+Install_Dir = /usr/bin
HFILES = sar.h
-
CFILES = sar.c
+MANPAGES = sar.1
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble sar.1
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /Library/Executables
-PDO_UNIX_INSTALLDIR = /bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-HEADER_PATHS = -I.
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
+Extra_CC_Flags = -I. -I../sadc.tproj
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-
-WARNING_CFLAGS = -Wall -Wno-long-double
-
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-
-SHAREDIR = /usr/share
-MANDIR = $(SHAREDIR)/man/man1
-
-install-man-pages:
- $(MKDIRS) $(DSTROOT)$(MANDIR)
- install -c -m 444 sar.1 $(DSTROOT)$(MANDIR)/sar.1
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-# Before the main makefile is included for this project, you may set:
-#
-# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
-# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
-
-# Compiler/linker flags added to the defaults: The OTHER_* variables will be
-# inherited by all nested sub-projects, but the LOCAL_ versions of the same
-# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
-# Build Attributes inspector if at all possible. To override the default flags
-# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
-# variables below are *inputs* to the build process and distinct from the override
-# settings done (less often) in the Makefile.postamble.
-#
-# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
-# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
-# .cc, .cxx, .C, and .M files. There is no need to respecify the
-# flags in OTHER_MFLAGS, etc.
-# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
-# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
-# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
-# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
-# precompiling header files
-# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
-# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
-# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
-# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
-# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-# AFTER_INSTALL: targets to build after installing the product
-
-AFTER_INSTALL += install-man-pages
-
-# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
-# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
-#
-# BEFORE_INSTALLHDRS: targets to build before installing headers for a
-# subproject
-# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
-# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
-# AFTER_INSTALLSRC: targets to build after installing source for a subproject
-#
-# BEFORE_DEPEND: targets to build before building dependencies for a
-# subproject
-# AFTER_DEPEND: targets to build after building dependencies for a
-# subproject
-#
-# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
-# updated every time the project is built. If NO, the dependency
-# file is only built when the depend target is invoked.
-
-# Framework-related variables:
-# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the framework's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-
-# Library-related variables:
-# PUBLIC_HEADER_DIR: Determines where public exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically. For library projects you should
-# set this to something like /Developer/Headers/$(NAME). Do not set
-# this variable for framework projects unless you do not want the
-# header files included in the framework.
-# PRIVATE_HEADER_DIR: Determines where private exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
-# whether the libraries produced are statically linked when they
-# are used or if they are dynamically loadable. This defaults to
-# DYNAMIC.
-# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the library's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-#
-# INSTALL_AS_USER: owner of the intalled products (default root)
-# INSTALL_AS_GROUP: group of the installed products (default wheel)
-# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
-#
-# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
-# passed on the command line to recursive invocations of make. Note that
-# the values in OTHER_*FLAGS are inherited by subprojects automatically --
-# you do not have to (and shouldn't) add OTHER_*FLAGS to
-# OTHER_RECURSIVE_VARIABLES.
-
-# Additional headers to export beyond those in the PB.project:
-# OTHER_PUBLIC_HEADERS
-# OTHER_PROJECT_HEADERS
-# OTHER_PRIVATE_HEADERS
-
-# Additional files for the project's product: <<path relative to proj?>>
-# OTHER_RESOURCES: (non-localized) resources for this project
-# OTHER_OFILES: relocatables to be linked into this project
-# OTHER_LIBS: more libraries to link against
-# OTHER_PRODUCT_DEPENDS: other dependencies of this project
-# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
-# OTHER_GARBAGE: additional files to be removed by `make clean'
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-# BUILD_OFILES_LIST_ONLY
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Uncomment to suppress generation of a KeyValueCoding index when installing
-# frameworks (This index is used by WOB and IB to determine keys available
-# for an object). Set to YES by default.
-# PREINDEX_FRAMEWORK = NO
-
-# Change this definition to install projects somewhere other than the
-# standard locations. NEXT_ROOT defaults to "C:/Apple" on Windows systems
-# and "" on other systems.
-DSTROOT = $(HOME)
+++ /dev/null
-{
- "DYNAMIC_CODE_GEN" = YES;
- FILESTABLE = {
- FRAMEWORKS = ("Foundation.framework");
- HEADERSEARCH = (".");
- "H_FILES" = ("sar.h");
- "OTHER_LINKED" = ("sar.c");
- "OTHER_SOURCES" = ("Makefile.preamble", Makefile, "Makefile.postamble", "sar.1");
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- "NEXTSTEP_BUILDTOOL" = "/usr/bin/gnumake";
- "NEXTSTEP_INSTALLDIR" = "/usr/bin";
- "NEXTSTEP_JAVA_COMPILER" = "/usr/bin/javac";
- "NEXTSTEP_OBJCPLUS_COMPILER" = "/usr/bin/cc";
- "PDO_UNIX_BUILDTOOL" = "$NEXT_ROOT/Developer/bin/make";
- "PDO_UNIX_INSTALLDIR" = "/bin";
- "PDO_UNIX_JAVA_COMPILER" = "$(JDKBINDIR)/javac";
- "PDO_UNIX_OBJCPLUS_COMPILER" = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = sar;
- PROJECTTYPE = Tool;
- PROJECTVERSION = "2.8";
- "WINDOWS_BUILDTOOL" = "$NEXT_ROOT/Developer/Executables/make";
- "WINDOWS_INSTALLDIR" = "/Library/Executables";
- "WINDOWS_JAVA_COMPILER" = "$(JDKBINDIR)/javac.exe";
- "WINDOWS_OBJCPLUS_COMPILER" = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the Apple Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = sc_usage
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = sc_usage
+Install_Dir = /usr/bin
CFILES = sc_usage.c
+MANPAGES = sc_usage.1
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble sc_usage.1\
- trace.codes
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /Library/Executables
-PDO_UNIX_INSTALLDIR = /bin
-LIBS = -lcurses
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-HEADER_PATHS = -I$(NEXT_ROOT)/System/Library/System.framework/\
- -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders\
- -I$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd\
- -I$(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders/bsd
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
+Extra_LD_Flags = -lcurses
--include Makefile.preamble
+Extra_CC_Flags = -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders\
+ -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd
-include $(MAKEFILEDIR)/$(MAKEFILE)
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.postamble
+after_install:
+ $(INSTALL_DIRECTORY) $(DSTROOT)/usr/share/misc
+ $(INSTALL_FILE) trace.codes $(DSTROOT)/usr/share/misc
--include Makefile.dependencies
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-ifeq "$(shell tconf --test TARGET_OS_EMBEDDED)" "YES"
-OPTIMIZE_BUILD_CFLAGS = -O
-endif
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS = 4555
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-
-install-man-page:
- install -d $(DSTROOT)/usr/share/man/man1
- install -c -m 444 sc_usage.1 $(DSTROOT)/usr/share/man/man1/sc_usage.1
-
-after_install::
- install -d $(DSTROOT)/usr/share/misc
- install -c -m 444 trace.codes $(DSTROOT)/usr/share/misc
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-# Before the main makefile is included for this project, you may set:
-#
-# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
-# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
-
-# Compiler/linker flags added to the defaults: The OTHER_* variables will be
-# inherited by all nested sub-projects, but the LOCAL_ versions of the same
-# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
-# Build Attributes inspector if at all possible. To override the default flags
-# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
-# variables below are *inputs* to the build process and distinct from the override
-# settings done (less often) in the Makefile.postamble.
-#
-# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
-# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
-# .cc, .cxx, .C, and .M files. There is no need to respecify the
-# flags in OTHER_MFLAGS, etc.
-# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
-# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
-# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
-# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
-# precompiling header files
-# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
-# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
-# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
-# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
-# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-# AFTER_INSTALL: targets to build after installing the product
-# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
-# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
-#
-# BEFORE_INSTALLHDRS: targets to build before installing headers for a
-# subproject
-# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
-# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
-# AFTER_INSTALLSRC: targets to build after installing source for a subproject
-#
-# BEFORE_DEPEND: targets to build before building dependencies for a
-# subproject
-# AFTER_DEPEND: targets to build after building dependencies for a
-# subproject
-#
-# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
-# updated every time the project is built. If NO, the dependency
-# file is only built when the depend target is invoked.
-
-# Framework-related variables:
-# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the framework's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-
-# Library-related variables:
-# PUBLIC_HEADER_DIR: Determines where public exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically. For library projects you should
-# set this to something like /Developer/Headers/$(NAME). Do not set
-# this variable for framework projects unless you do not want the
-# header files included in the framework.
-# PRIVATE_HEADER_DIR: Determines where private exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
-# whether the libraries produced are statically linked when they
-# are used or if they are dynamically loadable. This defaults to
-# DYNAMIC.
-# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the library's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-#
-# INSTALL_AS_USER: owner of the intalled products (default root)
-# INSTALL_AS_GROUP: group of the installed products (default wheel)
-# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
-#
-# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
-# passed on the command line to recursive invocations of make. Note that
-# the values in OTHER_*FLAGS are inherited by subprojects automatically --
-# you do not have to (and shouldn't) add OTHER_*FLAGS to
-# OTHER_RECURSIVE_VARIABLES.
-
-# Additional headers to export beyond those in the PB.project:
-# OTHER_PUBLIC_HEADERS
-# OTHER_PROJECT_HEADERS
-# OTHER_PRIVATE_HEADERS
-
-# Additional files for the project's product: <<path relative to proj?>>
-# OTHER_RESOURCES: (non-localized) resources for this project
-# OTHER_OFILES: relocatables to be linked into this project
-# OTHER_LIBS: more libraries to link against
-# OTHER_PRODUCT_DEPENDS: other dependencies of this project
-# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
-# OTHER_GARBAGE: additional files to be removed by `make clean'
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-# BUILD_OFILES_LIST_ONLY
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Uncomment to suppress generation of a KeyValueCoding index when installing
-# frameworks (This index is used by WOB and IB to determine keys available
-# for an object). Set to YES by default.
-# PREINDEX_FRAMEWORK = NO
-
-# Change this definition to install projects somewhere other than the
-# standard locations. NEXT_ROOT defaults to "C:/Apple" on Windows systems
-# and "" on other systems.
-DSTROOT = $(HOME)
-
-AFTER_INSTALL += install-man-page
-
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- HEADERSEARCH = ("$(NEXT_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/bsd");
- OTHER_LINKED = (sc_usage.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, sc_usage.1, trace.codes);
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_COMPILEROPTIONS = "-DKERNEL_PRIVATE";
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_INSTALLDIR = /bin;
- PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = sc_usage;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_INSTALLDIR = /Library/Executables;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = shutdown
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project= shutdown
+Install_Dir = /sbin
HFILES = pathnames.h
-
CFILES = shutdown.c
-DEFSFILES = kextmanager.defs
-
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble Makefile.dist\
- shutdown.8 $(DEFSFILES)
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /sbin
-WINDOWS_INSTALLDIR = /sbin
-PDO_UNIX_INSTALLDIR = /sbin
-LIBS = -lbsm
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-FRAMEWORKS = -framework IOKit
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
+USERDEFS = kextmanager.defs
+MANPAGES = shutdown.8
--include Makefile.postamble
+Extra_Frameworks = -framework IOKit
+Extra_LD_Flags = -lbsm
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-# @(#)Makefile 8.1 (Berkeley) 6/5/93
-
-PROG= shutdown
-MAN8= shutdown.0
-BINOWN= root
-BINGRP= operator
-BINMODE=4550
-
-.include <bsd.prog.mk>
+++ /dev/null
-INSTALL_AS_GROUP = operator # (probably want to set both of these)
-INSTALL_PERMISSIONS = 0555 # If set, 'install' chmod's executable to this
-
-after_install:
- mkdir -p $(DSTROOT)/usr/share/man/man8
- install -c -m 444 shutdown.8 $(DSTROOT)/usr/share/man/man8
+++ /dev/null
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-OTHER_OFILES = kextmanagerUser.o
-# OTHER_CFLAGS += -O0
+++ /dev/null
-{
- APPCLASS = NSApplication;
- FILESTABLE = {
- FRAMEWORKS = (IOKit.framework);
- H_FILES = (pathnames.h);
- M_FILES = ();
- OTHER_LIBS = (bsm);
- OTHER_LINKED = (shutdown.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, Makefile.dist, shutdown.8);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_INSTALLDIR = /sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_MAINNIB = shutdown;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_MAINNIB = shutdown;
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = shutdown;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_MAINNIB = shutdown;
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = sync
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = sync
+Install_Dir = /bin
CFILES = sync.c
+MANPAGES = sync.8
-OTHERSRCS = Makefile.preamble Makefile Makefile.dist sync.8 Makefile.postamble
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /bin
-WINDOWS_INSTALLDIR = /bin
-PDO_UNIX_INSTALLDIR = /bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-# @(#)Makefile 8.1 (Berkeley) 5/31/93
-
-PROG= sync
-MAN8= sync.0
-
-.include <bsd.prog.mk>
+++ /dev/null
-after_install:
- mkdir -p $(DSTROOT)/usr/share/man/man8
- install -c -m 444 sync.8 $(DSTROOT)/usr/share/man/man8
+++ /dev/null
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
+++ /dev/null
-{
- APPCLASS = NSApplication;
- FILESTABLE = {
- FRAMEWORKS = ();
- H_FILES = ();
- M_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (sync.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.dist, sync.8);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "/tmp/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_MAINNIB = sync;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_INSTALLDIR = /bin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_MAINNIB = sync;
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = sync;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_INSTALLDIR = /bin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_MAINNIB = sync;
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = sysctl
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = sysctl
+Install_Dir = /usr/sbin
CFILES = sysctl.c
+MANPAGES = sysctl.8 sysctl.conf.5
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble sysctl.8 sysctl.conf.5
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /usr/sbin
-PDO_UNIX_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of top-level app-wrapper (e.g., Webster.app)
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# ENGLISH - boolean flag set iff $(LANGUAGE) = "English"
-# JAPANESE - boolean flag set iff $(LANGUAGE) = "Japanese"
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder that output Makefile
-# APPICON - application icon file
-# DOCICONS - dock icon files
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-
-
-# Change defaults assumed by the standard app makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Add Makefile.preamble, Makefile.postamble, and Makefile.dependencies here if
-# you would like changes to them to invalidate previous builds. The project
-# depends on $(MAKEFILES) so that changes to Makefiles will trigger a re-build.
-#MAKEFILES = Makefile
-
-# Optimization flag passed to compiler:
-#OPTIMIZATION_CFLAG = -O
-
-# Flags always passed to compiler:
-#COMMON_CFLAGS = $(PROJECT_SPECIFIC_CFLAGS) -g -Wall
-
-# Flags passed to compiler in normal 'app' compiles:
-#NORMAL_CFLAGS = $(COMMON_CFLAGS) $(OPTIMIZATION_CFLAG)
-
-# Flags passed to compiler in 'debug' compiles:
-#DEBUG_CFLAGS = $(COMMON_CFLAGS) -DDEBUG
-
-# Flags passed to compiler in 'profile' compiles
-#PROFILE_CFLAGS = $(COMMON_CFLAGS) -pg $(OPTIMIZATION_CFLAG) -DPROFILE
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root # User to chown app to
-#INSTALL_AS_GROUP = wheel # Group to chgrp app to
-#INSTALL_PERMISSIONS = # If set, 'install' chmod's executable to this
-
-# Options to strip for bundles, apps with bundles, and apps without bundles,
-# respectively.
-#RELOCATABLE_STRIP_OPTS = -x -u
-#DYLD_APP_STRIP_OPTS = -A -n
-#APP_STRIP_OPTS =
-#TOOL_STRIP_OPTS =
-#LIBRARY_STRIP_OPTS = -x -S # Note: -S strips debugging symbols
-# (Note: APP_STRIP_OPTS and TOOL_STRIP_OPTS default to empty, but
-# developers doing their own dynamic loading should set this to
-# $(DYLD_APP_STRIP_OPTS)).
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Typical
-# user-defined rules are before_install and after_install (please don't
-# redefine things like install or app, as they are owned by the top-level
-# Makefile API), which are rules that get invoked before and after the install
-# target runs. Such rules should be specified with the '::' syntax rather than
-# a single colon.
-
-after_install:
- mkdir -p "$(DSTROOT)/usr/share/man/man8"
- install -c -m 644 sysctl.8 "$(DSTROOT)/usr/share/man/man8/sysctl.8"
- mkdir -p "$(DSTROOT)/usr/share/man/man5"
- install -c -m 644 sysctl.conf.5 "$(DSTROOT)/usr/share/man/man5/sysctl.conf.5"
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags here. To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-
-BUNDLELDFLAGS = # use iff project is a bundle
-PALETTELDFLAGS = # use iff project is a palette
-
-## Specify which headers in this project should be published to the outside
-## world in a flat header directory given in PUBLIC_HEADER_DIR (which will be
-## prepended by DSTROOT, below. Any subset of these public headers can be
-## precompiled automatically after installation, with extra user-defined flags.
-PUBLIC_HEADER_DIR =
-PUBLIC_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-## Configure what is linked in at each level here. Libraries are only used in
-## the final 'app' linking step. Final 'app' linking is only done via the
-## 'app', 'debug', and 'profile' targets when they are invoked for
-## the top-level app.
-
-# Additional relocatables to be linked in at this level
-OTHER_OFILES =
-# Additional libs to link apps against ('app' target)
-#OTHER_LIBS =
-# Additional libs to link apps against ('debug' target)
-OTHER_DEBUG_LIBS =
-# Additional libs to link apps against ('profile' target)
-OTHER_PROF_LIBS =
-
-# More 'app' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_LIBS =
-# More 'debug' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_DEBUG_LIBS =
-# More 'profile' libs when $(JAPANESE) = "YES"
-OTHER_JAPANESE_PROF_LIBS =
-
-# If this is a bundle, and you *know* the enclosing application will not
-# be linking with a library which you require in your bundle code, then
-# mention it here so that it gets linked into the bundle. Note that this
-# is wasteful but sometimes necessary.
-BUNDLE_LIBS =
-
-## Configure how things get built here. Additional dependencies, sourcefiles,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-# Precompiled headers to be built before any compilation occurs (e.g., draw.p)
-PRECOMPS =
-
-# Targets to be built before installation
-OTHER_INSTALL_DEPENDS =
-
-# A virtual root directory (other than /) to be prepended to the $(INSTALLDIR)
-# passed from ProjectBuilder.
-DSTROOT =
-
-# Set the following to "YES" if you want the old behavior of recursively
-# cleaning all nested subprojects during 'make clean'.
-CLEAN_ALL_SUBPROJECTS =
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-AFTER_INSTALL = after_install
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- C_FILES = ();
- H_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = (sysctl.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, sysctl.8);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- GENERATEMAIN = YES;
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = sysctl;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
--- /dev/null
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License'). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef lint
+static char copyright[] =
+"@(#) Copyright (c) 1993\n\
+ The Regents of the University of California. All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)pathconf.c 8.1 (Berkeley) 6/6/93";
+#endif /* not lint */
+
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/unistd.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define PC_NAMES { \
+ { 0, 0 }, \
+ { "link_max", CTLTYPE_INT }, \
+ { "max_canon", CTLTYPE_INT }, \
+ { "max_input", CTLTYPE_INT }, \
+ { "name_max", CTLTYPE_INT }, \
+ { "path_max", CTLTYPE_INT }, \
+ { "pipe_buf", CTLTYPE_INT }, \
+ { "chown_restricted", CTLTYPE_INT }, \
+ { "no_trunc", CTLTYPE_INT }, \
+ { "vdisable", CTLTYPE_INT }, \
+}
+#define PC_MAXID 10
+
+struct ctlname pcnames[] = PC_NAMES;
+char names[BUFSIZ];
+
+struct list {
+ struct ctlname *list;
+ int size;
+};
+struct list pclist = { pcnames, PC_MAXID };
+
+int Aflag, aflag, nflag, wflag, stdinflag;
+
+int
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ extern char *optarg;
+ extern int optind;
+ char *path;
+ int ch;
+
+ while ((ch = getopt(argc, argv, "Aan")) != EOF) {
+ switch (ch) {
+
+ case 'A':
+ Aflag = 1;
+ break;
+
+ case 'a':
+ aflag = 1;
+ break;
+
+ case 'n':
+ nflag = 1;
+ break;
+
+ default:
+ usage();
+ }
+ }
+ argc -= optind;
+ argv += optind;
+
+ if (argc == 0)
+ usage();
+ path = *argv++;
+ if (strcmp(path, "-") == 0)
+ stdinflag = 1;
+ argc--;
+ if (Aflag || aflag) {
+ listall(path, &pclist);
+ exit(0);
+ }
+ if (argc == 0)
+ usage();
+ while (argc-- > 0)
+ parse(path, *argv, 1);
+ exit(0);
+}
+
+/*
+ * List all variables known to the system.
+ */
+listall(path, lp)
+ char *path;
+ struct list *lp;
+{
+ int lvl2;
+
+ if (lp->list == 0)
+ return;
+ for (lvl2 = 0; lvl2 < lp->size; lvl2++) {
+ if (lp->list[lvl2].ctl_name == 0)
+ continue;
+ parse(path, lp->list[lvl2].ctl_name, Aflag);
+ }
+}
+
+/*
+ * Parse a name into an index.
+ * Lookup and print out the attribute if it exists.
+ */
+parse(pathname, string, flags)
+ char *pathname;
+ char *string;
+ int flags;
+{
+ int indx, value;
+ char *bufp, buf[BUFSIZ];
+
+ bufp = buf;
+ snprintf(buf, BUFSIZ, "%s", string);
+ if ((indx = findname(string, "top", &bufp, &pclist)) == -1)
+ return;
+ if (bufp) {
+ fprintf(stderr, "name %s in %s is unknown\n", *bufp, string);
+ return;
+ }
+ if (stdinflag)
+ value = fpathconf(0, indx);
+ else
+ value = pathconf(pathname, indx);
+ if (value == -1) {
+ if (flags == 0)
+ return;
+ switch (errno) {
+ case ENOTSUP:
+ fprintf(stderr, "%s: value is not available\n", string);
+ return;
+ case ENOTDIR:
+ fprintf(stderr, "%s: specification is incomplete\n",
+ string);
+ return;
+ case ENOMEM:
+ fprintf(stderr, "%s: type is unknown to this program\n",
+ string);
+ return;
+ default:
+ perror(string);
+ return;
+ }
+ }
+ if (!nflag)
+ fprintf(stdout, "%s = ", string);
+ fprintf(stdout, "%d\n", value);
+}
+
+/*
+ * Scan a list of names searching for a particular name.
+ */
+findname(string, level, bufp, namelist)
+ char *string;
+ char *level;
+ char **bufp;
+ struct list *namelist;
+{
+ char *name;
+ int i;
+
+ if (namelist->list == 0 || (name = strsep(bufp, ".")) == NULL) {
+ fprintf(stderr, "%s: incomplete specification\n", string);
+ return (-1);
+ }
+ for (i = 0; i < namelist->size; i++)
+ if (namelist->list[i].ctl_name != NULL &&
+ strcmp(name, namelist->list[i].ctl_name) == 0)
+ break;
+ if (i == namelist->size) {
+ fprintf(stderr, "%s level name %s in %s is invalid\n",
+ level, name, string);
+ return (-1);
+ }
+ return (i);
+}
+
+usage()
+{
+
+ (void)fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n",
+ "pathname [-n] variable ...",
+ "pathname [-n] -a", "pathname [-n] -A");
+ exit(1);
+}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = update
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = update
+Install_Dir = /usr/sbin
CFILES = update.c
-HFILES =
-
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble update.8 \
- com.apple.update.plist update.sb
-
-FRAMEWORKS =
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /usr/sbin
-PDO_UNIX_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
+MANPAGES = update.8
+LAUNCHD_PLISTS = com.apple.update.plist
-include $(MAKEFILEDIR)/$(MAKEFILE)
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
--include Makefile.postamble
+SANDBOX = "$(DSTROOT)/usr/share/sandbox"
--include Makefile.dependencies
+after_install:
+ $(INSTALL_DIRECTORY) $(SANDBOX)
+ $(INSTALL_FILE) update.sb $(SANDBOX)
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of top-level app-wrapper (e.g., Webster.app)
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# ENGLISH - boolean flag set iff $(LANGUAGE) = "English"
-# JAPANESE - boolean flag set iff $(LANGUAGE) = "Japanese"
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder that output Makefile
-# APPICON - application icon file
-# DOCICONS - dock icon files
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-
-
-# Change defaults assumed by the standard app makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Add Makefile.preamble, Makefile.postamble, and Makefile.dependencies here if
-# you would like changes to them to invalidate previous builds. The project
-# depends on $(MAKEFILES) so that changes to Makefiles will trigger a re-build.
-#MAKEFILES = Makefile
-
-# Optimization flag passed to compiler:
-#OPTIMIZATION_CFLAG = -O
-
-# Flags always passed to compiler:
-#COMMON_CFLAGS = $(PROJECT_SPECIFIC_CFLAGS) -g -Wall
-
-# Flags passed to compiler in normal 'app' compiles:
-#NORMAL_CFLAGS = $(COMMON_CFLAGS) $(OPTIMIZATION_CFLAG)
-
-# Flags passed to compiler in 'debug' compiles:
-#DEBUG_CFLAGS = $(COMMON_CFLAGS) -DDEBUG
-
-# Flags passed to compiler in 'profile' compiles
-#PROFILE_CFLAGS = $(COMMON_CFLAGS) -pg $(OPTIMIZATION_CFLAG) -DPROFILE
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root # User to chown app to
-#INSTALL_AS_GROUP = wheel # Group to chgrp app to
-#INSTALL_PERMISSIONS = # If set, 'install' chmod's executable to this
-
-# Options to strip for bundles, apps with bundles, and apps without bundles,
-# respectively.
-#RELOCATABLE_STRIP_OPTS = -x -u
-#DYLD_APP_STRIP_OPTS = -A -n
-#APP_STRIP_OPTS =
-#TOOL_STRIP_OPTS =
-#LIBRARY_STRIP_OPTS = -x -S # Note: -S strips debugging symbols
-# (Note: APP_STRIP_OPTS and TOOL_STRIP_OPTS default to empty, but
-# developers doing their own dynamic loading should set this to
-# $(DYLD_APP_STRIP_OPTS)).
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Typical
-# user-defined rules are before_install and after_install (please don't
-# redefine things like install or app, as they are owned by the top-level
-# Makefile API), which are rules that get invoked before and after the install
-# target runs. Such rules should be specified with the '::' syntax rather than
-# a single colon.
-
-install-man-page:
- mkdir -p "$(DSTROOT)/usr/share/man/man8"
- install -c -m 644 update.8 "$(DSTROOT)/usr/share/man/man8/update.8"
-
-LAUNCHD_PLIST_DIR = $(DSTROOT)/System/Library/LaunchDaemons
-LAUNCHD_PLIST = com.apple.update.plist
-SANDBOX = "$(DSTROOT)/usr/share/sandbox"
-
-install-launchd-plist:
- install -d $(LAUNCHD_PLIST_DIR)
- install -c -m 644 $(LAUNCHD_PLIST) $(LAUNCHD_PLIST_DIR)/$(LAUNCHD_PLIST)
-
-install-sb:
- install -d $(SANDBOX)
- install -c -m 644 update.sb $(SANDBOX)
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags here. To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-
-BUNDLELDFLAGS = # use iff project is a bundle
-PALETTELDFLAGS = # use iff project is a palette
-
-## Specify which headers in this project should be published to the outside
-## world in a flat header directory given in PUBLIC_HEADER_DIR (which will be
-## prepended by DSTROOT, below. Any subset of these public headers can be
-## precompiled automatically after installation, with extra user-defined flags.
-PUBLIC_HEADER_DIR =
-PUBLIC_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-## Configure what is linked in at each level here. Libraries are only used in
-## the final 'app' linking step. Final 'app' linking is only done via the
-## 'app', 'debug', and 'profile' targets when they are invoked for
-## the top-level app.
-
-# Additional relocatables to be linked in at this level
-OTHER_OFILES =
-# Additional libs to link apps against ('app' target)
-#OTHER_LIBS =
-# Additional libs to link apps against ('debug' target)
-OTHER_DEBUG_LIBS =
-# Additional libs to link apps against ('profile' target)
-OTHER_PROF_LIBS =
-
-# More 'app' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_LIBS =
-# More 'debug' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_DEBUG_LIBS =
-# More 'profile' libs when $(JAPANESE) = "YES"
-OTHER_JAPANESE_PROF_LIBS =
-
-# If this is a bundle, and you *know* the enclosing application will not
-# be linking with a library which you require in your bundle code, then
-# mention it here so that it gets linked into the bundle. Note that this
-# is wasteful but sometimes necessary.
-BUNDLE_LIBS =
-
-## Configure how things get built here. Additional dependencies, sourcefiles,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-# Precompiled headers to be built before any compilation occurs (e.g., draw.p)
-PRECOMPS =
-
-# Targets to be built before installation
-OTHER_INSTALL_DEPENDS =
-
-# A virtual root directory (other than /) to be prepended to the $(INSTALLDIR)
-# passed from ProjectBuilder.
-DSTROOT =
-
-# Set the following to "YES" if you want the old behavior of recursively
-# cleaning all nested subprojects during 'make clean'.
-CLEAN_ALL_SUBPROJECTS =
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-AFTER_INSTALL = install-man-page install-launchd-plist install-sb
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- C_FILES = (update.c);
- H_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = ();
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, update.8, com.apple.update.plist);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- FRAMEWORKS = ();
- };
- GENERATEMAIN = YES;
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = update;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = vifs
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = vifs
+Install_Dir = /usr/sbin
CFILES = vifs.c
+MANPAGES = vifs.8
-OTHERSRCS = Makefile Makefile.postamble vifs.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /usr/sbin
-PDO_UNIX_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-after_install::
- mkdir -p $(DSTROOT)/usr/share/man/man8
- cp vifs.8 $(DSTROOT)/usr/share/man/man8/
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- C_FILES = (vifs.c);
- H_FILES = ();
- OTHER_LIBS = ();
- OTHER_LINKED = ();
- OTHER_SOURCES = (Makefile, vifs.8);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = ();
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- GENERATEMAIN = YES;
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = vifs;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = vipw
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = vipw
+Install_Dir = /usr/sbin
HFILES = pw_util.h
-
CFILES = pw_util.c vipw.c
+MANPAGES = vipw.8
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble vipw.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-WINDOWS_INSTALLDIR = /usr/sbin
-PDO_UNIX_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-PROJECT_HEADERS = pw_util.h
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of top-level app-wrapper (e.g., Webster.app)
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# ENGLISH - boolean flag set iff $(LANGUAGE) = "English"
-# JAPANESE - boolean flag set iff $(LANGUAGE) = "Japanese"
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder that output Makefile
-# APPICON - application icon file
-# DOCICONS - dock icon files
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-
-
-# Change defaults assumed by the standard app makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Add Makefile.preamble, Makefile.postamble, and Makefile.dependencies here if
-# you would like changes to them to invalidate previous builds. The project
-# depends on $(MAKEFILES) so that changes to Makefiles will trigger a re-build.
-#MAKEFILES = Makefile
-
-# Optimization flag passed to compiler:
-#OPTIMIZATION_CFLAG = -O
-
-# Flags always passed to compiler:
-#COMMON_CFLAGS = $(PROJECT_SPECIFIC_CFLAGS) -g -Wall
-
-# Flags passed to compiler in normal 'app' compiles:
-#NORMAL_CFLAGS = $(COMMON_CFLAGS) $(OPTIMIZATION_CFLAG)
-
-# Flags passed to compiler in 'debug' compiles:
-#DEBUG_CFLAGS = $(COMMON_CFLAGS) -DDEBUG
-
-# Flags passed to compiler in 'profile' compiles
-#PROFILE_CFLAGS = $(COMMON_CFLAGS) -pg $(OPTIMIZATION_CFLAG) -DPROFILE
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root # User to chown app to
-#INSTALL_AS_GROUP = wheel # Group to chgrp app to
-#INSTALL_PERMISSIONS = # If set, 'install' chmod's executable to this
-
-# Options to strip for bundles, apps with bundles, and apps without bundles,
-# respectively.
-#RELOCATABLE_STRIP_OPTS = -x -u
-#DYLD_APP_STRIP_OPTS = -A -n
-#APP_STRIP_OPTS =
-#TOOL_STRIP_OPTS =
-#LIBRARY_STRIP_OPTS = -x -S # Note: -S strips debugging symbols
-# (Note: APP_STRIP_OPTS and TOOL_STRIP_OPTS default to empty, but
-# developers doing their own dynamic loading should set this to
-# $(DYLD_APP_STRIP_OPTS)).
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Typical
-# user-defined rules are before_install and after_install (please don't
-# redefine things like install or app, as they are owned by the top-level
-# Makefile API), which are rules that get invoked before and after the install
-# target runs. Such rules should be specified with the '::' syntax rather than
-# a single colon.
-
-after_install::
- $(MKDIRS) $(DSTROOT)/usr/share/man/man8
- $(CP) vipw.8 $(DSTROOT)/usr/share/man/man8/
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble Template
-# Copyright 1993, NeXT Computer, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags here. To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-
-BUNDLELDFLAGS = # use iff project is a bundle
-PALETTELDFLAGS = # use iff project is a palette
-
-## Specify which headers in this project should be published to the outside
-## world in a flat header directory given in PUBLIC_HEADER_DIR (which will be
-## prepended by DSTROOT, below. Any subset of these public headers can be
-## precompiled automatically after installation, with extra user-defined flags.
-PUBLIC_HEADER_DIR =
-PUBLIC_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-## Configure what is linked in at each level here. Libraries are only used in
-## the final 'app' linking step. Final 'app' linking is only done via the
-## 'app', 'debug', and 'profile' targets when they are invoked for
-## the top-level app.
-
-# Additional relocatables to be linked in at this level
-OTHER_OFILES =
-# Additional libs to link apps against ('app' target)
-#OTHER_LIBS =
-# Additional libs to link apps against ('debug' target)
-OTHER_DEBUG_LIBS =
-# Additional libs to link apps against ('profile' target)
-OTHER_PROF_LIBS =
-
-# More 'app' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_LIBS =
-# More 'debug' libraries when $(JAPANESE) = "YES"
-OTHER_JAPANESE_DEBUG_LIBS =
-# More 'profile' libs when $(JAPANESE) = "YES"
-OTHER_JAPANESE_PROF_LIBS =
-
-# If this is a bundle, and you *know* the enclosing application will not
-# be linking with a library which you require in your bundle code, then
-# mention it here so that it gets linked into the bundle. Note that this
-# is wasteful but sometimes necessary.
-BUNDLE_LIBS =
-
-## Configure how things get built here. Additional dependencies, sourcefiles,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-# Precompiled headers to be built before any compilation occurs (e.g., draw.p)
-PRECOMPS =
-
-# Targets to be built before installation
-OTHER_INSTALL_DEPENDS =
-
-# A virtual root directory (other than /) to be prepended to the $(INSTALLDIR)
-# passed from ProjectBuilder.
-DSTROOT =
-
-# Set the following to "YES" if you want the old behavior of recursively
-# cleaning all nested subprojects during 'make clean'.
-CLEAN_ALL_SUBPROJECTS =
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
+++ /dev/null
-{
- DOCICONFILES = ();
- FILESTABLE = {
- C_FILES = ();
- H_FILES = (pw_util.h);
- OTHER_LIBS = ();
- OTHER_LINKED = (pw_util.c, vipw.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, vipw.8);
- PRECOMPILED_HEADERS = ();
- PROJECT_HEADERS = (pw_util.h);
- PUBLIC_HEADERS = ();
- SUBPROJECTS = ();
- };
- GENERATEMAIN = YES;
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- NEXTSTEP_BUILDDIR = "";
- NEXTSTEP_BUILDTOOL = /bin/make;
- NEXTSTEP_COMPILEROPTIONS = "";
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_LINKEROPTIONS = "";
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDDIR = "";
- PDO_UNIX_BUILDTOOL = /bin/make;
- PDO_UNIX_COMPILEROPTIONS = "";
- PDO_UNIX_INSTALLDIR = /usr/sbin;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_LINKEROPTIONS = "";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = vipw;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDDIR = "";
- WINDOWS_BUILDTOOL = /bin/make;
- WINDOWS_COMPILEROPTIONS = "";
- WINDOWS_INSTALLDIR = /usr/sbin;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_LINKEROPTIONS = "";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = vm_stat
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = vm_stat
+Install_Dir = /usr/bin
CFILES = vm_stat.c
+MANPAGES = vm_stat.1
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble m.template\
- h.template vm_stat.1
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /Library/Executables
-PDO_UNIX_INSTALLDIR = /bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-after_install:
- install -d $(DSTROOT)/usr/share/man/man1
- install -c -m 444 vm_stat.1 $(DSTROOT)/usr/share/man/man1
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-# Before the main makefile is included for this project, you may set:
-#
-# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
-# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
-
-# Compiler/linker flags added to the defaults: The OTHER_* variables will be
-# inherited by all nested sub-projects, but the LOCAL_ versions of the same
-# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
-# Build Attributes inspector if at all possible. To override the default flags
-# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
-# variables below are *inputs* to the build process and distinct from the override
-# settings done (less often) in the Makefile.postamble.
-#
-# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
-# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
-# .cc, .cxx, .C, and .M files. There is no need to respecify the
-# flags in OTHER_MFLAGS, etc.
-# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
-# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
-# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
-# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
-# precompiling header files
-# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
-# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
-# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
-# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
-# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-# AFTER_INSTALL: targets to build after installing the product
-# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
-# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
-#
-# BEFORE_INSTALLHDRS: targets to build before installing headers for a
-# subproject
-# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
-# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
-# AFTER_INSTALLSRC: targets to build after installing source for a subproject
-#
-# BEFORE_DEPEND: targets to build before building dependencies for a
-# subproject
-# AFTER_DEPEND: targets to build after building dependencies for a
-# subproject
-#
-# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
-# updated every time the project is built. If NO, the dependency
-# file is only built when the depend target is invoked.
-
-# Framework-related variables:
-# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the framework's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-
-# Library-related variables:
-# PUBLIC_HEADER_DIR: Determines where public exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically. For library projects you should
-# set this to something like /Developer/Headers/$(NAME). Do not set
-# this variable for framework projects unless you do not want the
-# header files included in the framework.
-# PRIVATE_HEADER_DIR: Determines where private exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
-# whether the libraries produced are statically linked when they
-# are used or if they are dynamically loadable. This defaults to
-# DYNAMIC.
-# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the library's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-#
-# INSTALL_AS_USER: owner of the intalled products (default root)
-# INSTALL_AS_GROUP: group of the installed products (default wheel)
-# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
-#
-# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
-# passed on the command line to recursive invocations of make. Note that
-# the values in OTHER_*FLAGS are inherited by subprojects automatically --
-# you do not have to (and shouldn't) add OTHER_*FLAGS to
-# OTHER_RECURSIVE_VARIABLES.
-
-# Additional headers to export beyond those in the PB.project:
-# OTHER_PUBLIC_HEADERS
-# OTHER_PROJECT_HEADERS
-# OTHER_PRIVATE_HEADERS
-
-# Additional files for the project's product: <<path relative to proj?>>
-# OTHER_RESOURCES: (non-localized) resources for this project
-# OTHER_OFILES: relocatables to be linked into this project
-# OTHER_LIBS: more libraries to link against
-# OTHER_PRODUCT_DEPENDS: other dependencies of this project
-# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
-# OTHER_GARBAGE: additional files to be removed by `make clean'
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-# BUILD_OFILES_LIST_ONLY
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Uncomment to suppress generation of a KeyValueCoding index when installing
-# frameworks (This index is used by WOB and IB to determine keys available
-# for an object). Set to YES by default.
-# PREINDEX_FRAMEWORK = NO
-
-# Change this definition to install projects somewhere other than the
-# standard locations. NEXT_ROOT defaults to "C:/Apple" on Windows systems
-# and "" on other systems.
-DSTROOT = $(HOME)
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- OTHER_LINKED = (vm_stat.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, m.template, h.template);
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDDIR = "/tmp/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_INSTALLDIR = /bin;
- PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = vm_stat;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_INSTALLDIR = /Library/Executables;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
+++ /dev/null
-$$
-/* $FILENAME$ created by $USERNAME$ on $DATE$ */
-
-#import <Foundation/Foundation.h>
-
-@interface $FILENAMESANSEXTENSION$ : NSObject
-{
-
-}
-
-@end
+++ /dev/null
-$$ Lines starting with $$ are not inserted into newly created files
-$$ The following substitutions are made:
-$$
-$$ $FILENAME$ e.g. foo.m
-$$ $FILENAMESANSEXTENSION$ e.g. foo
-$$ $DIRECTORY$ e.g. /tmp/MyNewApp
-$$ $PROJECTNAME$ e.g. MyNewApp
-$$ $SUBPROJECTNAME$ e.g. TheGoodPart.subproj
-$$ $USERNAME$ e.g. mwagner
-$$ $DATE$ e.g. Jan-1-1994
-$$
-/* $FILENAME$ created by $USERNAME$ on $DATE$ */
-
-#import "$FILENAMESANSEXTENSION$.h"
-
-@implementation $FILENAMESANSEXTENSION$
-
-@end
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = zdump
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = zdump
+Install_Dir = /usr/sbin
CFILES = zdump.c
+MANPAGES = zdump.8
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble zdump.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of the directory to which resources are copied.
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0)
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-#
-###############################################################################
-
-
-# Change defaults assumed by the standard makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Versioning of frameworks, libraries, bundles, and palettes:
-#CURRENTLY_ACTIVE_VERSION = YES
- # Set to "NO" to produce a compatibility binary
-#DEPLOY_WITH_VERSION_NAME = A
- # This should be incremented as your API changes.
-#COMPATIBILITY_PROJECT_VERSION = 1
- # This should be incremented as your API grows.
-#CURRENT_PROJECT_VERSION = 1
- # Defaults to using the "vers_string" hack.
-
-# Some compiler flags can be easily overridden here, but onlytake effect at
-# the top-level:
-#OPTIMIZATION_CFLAG = -O
-#DEBUG_SYMBOLS_CFLAG = -g
-#WARNING_CFLAGS = -Wmost
-#DEBUG_BUILD_CFLAGS = -DDEBUG
-#PROFILE_BUILD_CFLAGS = -pg -DPROFILE
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Library and Framework projects only:
-# 1. If you want something other than the default .dylib name, override it here
-#DYLIB_INSTALL_NAME = lib$(NAME).dylib
-
-# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all.
-#DYLIB_INSTALL_DIR = $(INSTALLDIR)
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-# Options to strip for various project types. Note: -S strips debugging symbols
-# (executables can be stripped down further with -x or, if they load no bundles, with no
-# options at all).
-#APP_STRIP_OPTS = -S
-#TOOL_STRIP_OPTS = -S
-#LIBRARY_STRIP_OPTS = -S
- # for .a archives
-#DYNAMIC_STRIP_OPTS = -S
- # for bundles and shared libraries
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. "Official"
-# user-defined rules are:
-# * before_install
-# * after_install
-# * after_installhdrs
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-# Note: on MS Windows, executables, have an extension, so rules and dependencies
-# for generated tools should use $(EXECUTABLE_EXT) on the end.
-
-
-VPATH += :../zic.tproj
-
-after_install:
- mkdir -p $(DSTROOT)/usr/share/man/man8
- install -c -m 444 zdump.8 $(DSTROOT)/usr/share/man/man8
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project. Each node in a project
-# tree of sub-projects, tools, etc. should have its own Makefile.preamble and
-# Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags in ProjectBuilder's Build Options inspector if at all possible.
-## To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-# Flags passed to libtool when building libraries
-OTHER_LIBTOOL_FLAGS =
-# For ordering named sections on NEXTSTEP (see ld(1))
-SECTORDER_FLAGS =
-
-# If you do not want any headers exported before compilations begin,
-# uncomment the following line. This can be a big time saver.
-#SKIP_EXPORTING_HEADERS = YES
-
-# Stuff related to exporting headers from this project that isn't already
-# handled by PB.
-OTHER_PUBLIC_HEADERS =
-OTHER_PROJECT_HEADERS =
-OTHER_PRIVATE_HEADERS =
-
-# Set these two macros if you want a precomp to be built as part of
-# installation. The cc -precomp will be run in the public header directory
-# on the specified public header files with the specified additional flags.
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-# Set this for library projects if you want to publish header files. If your
-# app or tool project exports headers Don't
-# include $(DSTROOT); this is added for you automatically.
-PUBLIC_HEADER_DIR =
-PRIVATE_HEADER_DIR =
-
-# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR#
-# (say, to add a subdirectory like "/sys"), you can use:
-PUBLIC_HEADER_DIR_SUFFIX =
-PRIVATE_HEADER_DIR_SUFFIX =
-
-# Set this for dynamic library projects on platforms where code which references
-# a dynamic library must link against an import library (i.e., Windows NT)
-# Don't include $(DSTROOT); this is added for you automatically.
-IMPORT_LIBRARY_DIR =
-
-# Additional (non-localized) resources for this project, which can be generated
-OTHER_RESOURCES =
-
-# Uncomment this to produce a static archive-style (.a) library
-#LIBRARY_STYLE = STATIC
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-BUILD_OFILES_LIST_ONLY =
-
-# Additional relocatables to be linked into this project
-OTHER_OFILES =
-# Additional libraries to link against
-OTHER_LIBS =
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-## Configure how things get built here. Additional dependencies, source files,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-
-# Targets to build before installation
-OTHER_INSTALL_DEPENDS =
-
-# More obscure flags you might want to set for pswrap, yacc, lex, etc.
-PSWFLAGS =
-YFLAGS =
-LFLAGS =
-
-## Delete this line if you want fast and loose cleans that will not remove
-## things like precomps and user-defined OTHER_GARBAGE in subprojects.
-CLEAN_ALL_SUBPROJECTS = YES
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-# .x files that should have rpcgen run on them
-RPCFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# After you have saved your project using the 4.0 PB, you will automatically
-# start using the makefiles in $(SYSTEM_DEVELOPER_DIR)/Makefiles/project. If you should
-# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to
-# be $(SYSTEM_DEVELOPER_DIR)/Makefiles/app.
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
-OTHER_OFILES = ialloc.o
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- FRAMEWORKS = ();
- H_FILES = ();
- OTHER_LINKED = (zdump.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, zdump.8);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDDIR = "/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = zdump;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<!-- $FreeBSD: src/usr.sbin/zic/Arts.htm,v 1.2 2000/05/29 20:23:04 charnier Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Time and the Arts</TITLE>
+</HEAD>
+<BODY>
+<H1>Time and the Arts</H1>
+<P>
+<H6>
+@(#)Arts.htm 7.18
+</H6>
+</P>
+<PRE>
+Data on recordings of "Save That Time," Russ Long, Serrob Publishing, BMI:
+--------------------------------------------------------------------------
+Artist: Karrin Allyson
+CD: I Didn't Know About You
+Copyright Date: 1993
+Label: Concord Jazz, Inc.
+ID: CCD-4543
+Track Time: 3:44
+Personnel: Karrin Allyson, vocal
+ Russ Long, piano
+ Gerald Spaits, bass
+ Todd Strait, drums
+Notes: CD notes "additional lyric by Karrin Allyson;
+ arranged by Russ Long and Karrin Allyson"
+ADO Rating: 1 star
+<A HREF="http://205.186.189.2/cgi-win/amg.exe?sql=1A_IDR|||175928">AMG Rating: 3.5 stars</A>
+Penguin Rating: 3.5 stars
+--------------------------------------------------------------------------
+Artist: Kevin Mahogany
+CD: Double Rainbow
+Copyright Date: 1993
+Label: Enja Records
+ID: ENJ-7097 2
+Track Time: 6:27
+Personnel: Kevin Mahogany, vocal
+ Kenny Barron, piano
+ Ray Drummond, bss
+ Ralph Moore, tenor saxophone
+ Lewis Nash, drums
+ADO Rating: 1.5 stars
+<A HREF="http://205.186.189.2/cgi-win/amg.exe?sql=1A_IDR|||262654">AMG Rating: unrated</A>
+Penguin Rating: 3 stars
+--------------------------------------------------------------------------
+Artist: Joe Williams
+CD: Here's to Life
+Copyright Date: 1994
+Label: Telarc International Corporation
+ID: CD-83357
+Track Time: 3:58
+Personnel: Joe Williams, vocal
+ The Robert Farnon [39 piece] Orchestra
+Notes: On-line information and samples available at
+ <A HREF="http://www.telarc.com/telarc/releases/release.req?ID=83357">http://telarc.dmn.com/telarc/releases/release.req?ID=83357</A>
+ADO Rating: black dot
+<A HREF="http://205.186.189.2/cgi-win/amg.exe?sql=1A_IDR|||194434">AMG Rating: 2 stars</A>
+Penguin Rating: 3 stars
+--------------------------------------------------------------------------
+Artist: Charles Fambrough
+CD: Keeper of the Spirit
+Copyright Date: 1995
+Label: AudioQuest Music
+ID: AQ-CD1033
+Track Time: 7:07
+Personnel: Charles Fambrough, bass
+ Joel Levine, tenor recorder
+ Edward Simon, piano
+ Lenny White, drums
+ Marion Simon, percussion
+Notes: On-line information and samples available at
+ <A HREF="http://wwmusic.com/~music/audioq/rel/1033.html">http://wwmusic.com/~music/audioq/rel/1033.html</A>
+ADO Rating: 2 stars
+<A HREF="http://205.186.189.2/cgi-win/AMG.exe?sql=1A_IDR|||224430">AMG Rating: unrated</A>
+Penguin Rating: 3 stars
+==========================================================================
+Also of note:
+--------------------------------------------------------------------------
+Artist: Holly Cole Trio
+CD: Blame It On My Youth
+Copyright Date: 1992
+Label: Manhattan
+ID: CDP 7 97349 2
+Total Time: 37:45
+Personnel: Holly Cole, voice
+ Aaron Davis, piano
+ David Piltch, string bass
+Notes: Lyrical reference to "Eastern Standard Time" in
+ Tom Waits' "Purple Avenue"
+ADO Rating: 2.5 stars
+<A HREF="http://205.186.189.2/cgi-win/AMG.exe?sql=1A_IDR|||157959">AMG Rating: 2 stars</A>
+Penguin Rating: unrated
+--------------------------------------------------------------------------
+Artist: Milt Hinton
+CD: Old Man Time
+Copyright Date: 1990
+Label: Chiaroscuro
+ID: CR(D) 310
+Total Time: 149:38 (two CDs)
+Personnel: Milt Hinton, bass
+ Doc Cheatham, Dizzy Gillespie, Clark Terry, trumpet
+ Al Grey, trombone
+ Eddie Barefield, Joe Camel (Flip Phillips), Buddy Tate,
+ clarinet and saxophone
+ John Bunch, Red Richards, Norman Simmons, Derek Smith,
+ Ralph Sutton, piano
+ Danny Barker, Al Casey, guitar
+ Gus Johnson, Gerryck King, Bob Rosengarden, Jackie Williams,
+ drums
+ Lionel Hampton, vibraphone
+ Cab Calloway, Joe Williams, vocal
+ Buck Clayton, arrangements
+Notes: tunes include Old Man Time, Time After Time,
+ Sometimes I'm Happy,
+ A Hot Time in the Old Town Tonight,
+ Four or Five Times, Now's the Time,
+ Time on My Hands, This Time It's Us,
+ and Good Time Charlie
+ On-line samples available at
+ <A HREF="http://www.globalmusic.com/labels/chiaroscuro/chiaro_cd_gallery.html">http://www.globalmusic.com/labels/chiaroscuro/chiaro_cd_gallery.html</A>
+ADO Rating: 3 stars
+<A HREF="http://205.186.189.2/cgi-win/AMG.exe?sql=1A_IDR|||162344">AMG Rating: 4.5 stars</A>
+Penguin Rating: 3 stars
+--------------------------------------------------------------------------
+Artist: Paul Broadbent
+CD: Pacific Standard Time
+Copyright Date: 1995
+Label: Concord Jazz, Inc.
+ID: CCD-4664
+Total Time: 62:42
+Personnel: Paul Broadbent, piano
+ Putter Smith, Bass
+ Frank Gibson, Jr., drums
+Notes: The CD cover features an analemma for equation of time fans
+ADO Rating: 1 star
+<A HREF="http://205.186.189.2/cgi-win/AMG.exe?sql=1A_IDR|||223722">AMG Rating: 3 stars</A>
+Penguin Rating: 3.5 stars
+--------------------------------------------------------------------------
+Artist: Anthony Braxton/Richard Teitelbaum
+CD: Silence/Time Zones
+Copyright Date: 1996
+Label: Black Lion
+ID: BLCD 760221
+Total Time: 72:58
+Personnel: Anthony Braxton, sopranino and alto saxophones,
+ contrebasse clarinet, miscellaneous instruments
+ Leo Smith, trumpet and miscellaneous instruments
+ Leroy Jenkins, violin and miscellaneous instruments
+ Richard Teitelbaum, modular moog and micromoog synthesizer
+ADO Rating: black dot
+<A HREF="http://205.186.189.2/cg/AMG_.exe?sql=A310757">AMG Rating: unrated</A>
+--------------------------------------------------------------------------
+Artist: Jules Verne
+Book: Le Tour du Monde en Quatre-Vingts Jours
+ (Around the World in Eighty Days)
+Notes: Wall-clock time plays a central role in the plot.
+ European readers of the 1870s clearly held the U.S. press in
+ deep contempt; the protagonists cross the U.S. without once
+ reading a paper.
+ An on-line French-language version of the book
+ "with illustrations from the original 1873 French-language edition"
+ is available at
+ <A HREF="http://fourmilab.ch/etexts/www/tdm80j">http://fourmilab.ch/etexts/www/tdm80j</A>
+ An on-line English-language translation of the book is available at
+ <A HREF="http://www.literature.org/Works/Jules-Verne/eighty">http://www.literature.org/Works/Jules-Verne/eighty</A>
+--------------------------------------------------------------------------
+Film: Bell Science - About Time
+Notes: The Frank Baxter/Richard Deacon extravaganza
+ Information on ordering is available at
+ <A HREF="http://www.videoflicks.com/VF/38/038332.htm">http://www.videoflicks.com/VF/38/038332.htm</A>
+--------------------------------------------------------------------------
+The syndicated comic strip "Dilbert" featured an all-too-rare example of
+time zone humor on 1998-03-14.
+</PRE>
+</BODY>
+</HTML>
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = zic
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = zic
+Install_Dir = /usr/sbin
HFILES = private.h
-
CFILES = ialloc.c scheck.c zic.c
-
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble zic.8
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/sbin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_BUILD_OUTPUT_DIR = /$(USER)/BUILD
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+MANPAGES = zic.8
+
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+
+LOCALTIME= US/Pacific
+POSIXRULES= US/Pacific
+
+Embedded=$(shell tconf --test TARGET_OS_EMBEDDED)
+
+# Embedded zic is probably not built with the same architecture as
+# the build host, so we can't use the recently built copy.
+ifeq "$(Embedded)" "YES"
+ZIC=/usr/sbin/zic
+else
+ZIC=$(DSTROOT)/usr/sbin/zic
+endif
+
+# pacificnew is obsolete and was removed from ZONE_FILES
+ZONE_FILES = africa antarctica asia australasia europe northamerica southamerica etcetera factory backward systemv solar87 solar88 solar89
+ZONEINFO = $(DSTROOT)/usr/share/zoneinfo
+
+# ftp://elsie.nci.nih.gov/pub/tzdata*.tar.gz
+# the tzdata*.tar.gz file is automatically unpacked and a version file created
+# /usr/local/share/tz/tzdata*.tar.gz is installed by the TimeZoneData project
+DATFILES = $(OBJROOT)/datfiles
+TARBALL = $(shell echo /usr/local/share/tz/tzdata*)
+DATVERS = $(shell basename $(TARBALL) | sed -e 's,\..*,,' -e 's/^tzdata//')
+VERSIONFILE = $(ZONEINFO)/+VERSION
+
+after_install:
+ $(MKDIR) $(DATFILES)
+ cd $(DATFILES) && tar xzf $(TARBALL)
+ $(INSTALL_DIRECTORY) $(ZONEINFO)
+ for tz in $(ZONE_FILES); do \
+ if [[ $${tz} = "northamerica" ]]; then \
+ ARG="-p America/New_York" ; \
+ else \
+ ARG="" ; \
+ fi ; \
+ $(ZIC) $${ARG} \
+ -L /dev/null \
+ -d $(ZONEINFO) \
+ -y $(DATFILES)/yearistype.sh \
+ $(DATFILES)/$${tz} ; \
+ done
+ chmod -R og-w $(ZONEINFO)
+ $(INSTALL_FILE) $(DATFILES)/zone.tab $(ZONEINFO)
+ $(INSTALL_FILE) $(DATFILES)/iso3166.tab $(ZONEINFO)
+ifeq "$(Embedded)" "YES"
+ $(INSTALL_DIRECTORY) $(DSTROOT)/private/var/db
+ $(LN) -hfs /usr/share/zoneinfo/$(LOCALTIME) $(DSTROOT)/private/var/db/localtime
+else
+ $(INSTALL_DIRECTORY) $(DSTROOT)/private/etc
+ $(LN) -hfs /usr/share/zoneinfo/$(LOCALTIME) $(DSTROOT)/private/etc/localtime
+endif
+ echo $(DATVERS) > $(VERSIONFILE)
+ chmod 444 $(VERSIONFILE)
+++ /dev/null
-###############################################################################
-# NeXT Makefile.postamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project, sub-project, bundle, or
-# palette. Each node in the project's tree of sub-projects and bundles
-# should have it's own Makefile.preamble and Makefile.postamble. Additional
-# rules (e.g., after_install) that are defined by the developer should be
-# defined in this file.
-#
-###############################################################################
-#
-# Here are the variables exported by the common "app" makefiles that can be
-# used in any customizations you make to the template below:
-#
-# PRODUCT_ROOT - Name of the directory to which resources are copied.
-# OFILE_DIR - Directory into which .o object files are generated.
-# (Note that this name is calculated based on the target
-# architectures specified in Project Builder).
-# DERIVED_SRC_DIR - Directory used for all other derived files
-# ALL_CFLAGS - All the flags passed to the cc(1) driver for compilations
-#
-# NAME - name of application, bundle, subproject, palette, etc.
-# LANGUAGE - langage in which the project is written (default "English")
-# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES - non-localized resources of project
-# PROJECTVERSION - version of ProjectBuilder project (NS3.X = 1.1, NS4.0 = 2.0)
-# ICONSECTIONS - Specifies icon sections when linking executable
-#
-# CLASSES - Class implementation files in project.
-# HFILES - Header files in project.
-# MFILES - Other Objective-C source files in project.
-# CFILES - Other C source files in project.
-# PSWFILES - .psw files in the project
-# PSWMFILES - .pswm files in the project
-# SUBPROJECTS - Subprojects of this project
-# BUNDLES - Bundle subprojects of this project
-# OTHERSRCS - Other miscellaneous sources of this project
-# OTHERLINKED - Source files not matching a standard source extention
-#
-# LIBS - Libraries to link with when making app target
-# DEBUG_LIBS - Libraries to link with when making debug target
-# PROF_LIBS - Libraries to link with when making profile target
-# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
-#
-# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
-# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
-# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
-# INSTALLDIR - Directory app will be installed into by 'install' target
-#
-###############################################################################
-
-
-# Change defaults assumed by the standard makefiles here. Edit the
-# following default values as appropriate. (Note that if no Makefile.postamble
-# exists, these values will have defaults set in common.make).
-
-# Versioning of frameworks, libraries, bundles, and palettes:
-#CURRENTLY_ACTIVE_VERSION = YES
- # Set to "NO" to produce a compatibility binary
-#DEPLOY_WITH_VERSION_NAME = A
- # This should be incremented as your API changes.
-#COMPATIBILITY_PROJECT_VERSION = 1
- # This should be incremented as your API grows.
-#CURRENT_PROJECT_VERSION = 1
- # Defaults to using the "vers_string" hack.
-
-# Some compiler flags can be easily overridden here, but onlytake effect at
-# the top-level:
-#OPTIMIZATION_CFLAG = -O
-#DEBUG_SYMBOLS_CFLAG = -g
-#WARNING_CFLAGS = -Wmost
-#DEBUG_BUILD_CFLAGS = -DDEBUG
-#PROFILE_BUILD_CFLAGS = -pg -DPROFILE
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Flags passed to yacc
-#YFLAGS = -d
-
-# Library and Framework projects only:
-# 1. If you want something other than the default .dylib name, override it here
-#DYLIB_INSTALL_NAME = lib$(NAME).dylib
-
-# 2. If you want to change the -install_name flag from the absolute path to the development area, change it here. One good choice is the installation directory. Another one might be none at all.
-#DYLIB_INSTALL_DIR = $(INSTALLDIR)
-
-# Ownership and permissions of files installed by 'install' target
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-# Options to strip for various project types. Note: -S strips debugging symbols
-# (executables can be stripped down further with -x or, if they load no bundles, with no
-# options at all).
-#APP_STRIP_OPTS = -S
-#TOOL_STRIP_OPTS = -S
-#LIBRARY_STRIP_OPTS = -S
- # for .a archives
-#DYNAMIC_STRIP_OPTS = -S
- # for bundles and shared libraries
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. "Official"
-# user-defined rules are:
-# * before_install
-# * after_install
-# * after_installhdrs
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-# Note: on MS Windows, executables, have an extension, so rules and dependencies
-# for generated tools should use $(EXECUTABLE_EXT) on the end.
-
-###############################################################################
-# Install /usr/share/zoneinfo files
-###############################################################################
-
-VPATH += :datfiles
-
-# If you always want time values interpreted as "seconds since the epoch
-# (not counting leap seconds)", use
-# REDO= posix_only
-# below. If you always want right time values interpreted as "seconds since
-# the epoch" (counting leap seconds)", use
-# REDO= right_only
-# below. If you want both sets of data available, with leap seconds not
-# counted normally, use
-# REDO= posix_right
-# below. If you want both sets of data available, with leap seconds counted
-# normally, use
-# REDO= right_posix
-# below.
-
-REDO= posix_only
-
-TZDIR= ${DSTROOT}/usr/share/zoneinfo
-LOCALTIME= US/Pacific
-POSIXRULES= US/Pacific
-
-YEARISTYPE= datfiles/yearistype.sh
-YEARISTYPECOPY= ${SYM_DIR}/yearistypecopy
-
-# pacificnew is obsolete and was removed from YDATA
-YDATA= africa antarctica asia australasia \
- europe northamerica southamerica etcetera factory \
- backward
-NDATA= systemv
-SDATA= solar87 solar88 solar89
-TDATA= $(YDATA) $(NDATA) $(SDATA)
-DATA= $(YDATA) $(NDATA) $(SDATA) leapseconds # yearistype.sh
-USNO= usno1988 usno1989
-
-Embedded=$(shell tconf --test TARGET_OS_EMBEDDED)
-
-# Embedded zic is probably not built with the same architecture as
-# the build host, so we can't use the recently built copy.
-ifeq "$(Embedded)" "YES"
-ZIC=/usr/sbin/zic
-else
-ZIC=${DSTROOT}/usr/sbin/zic
-endif
-
-${YEARISTYPECOPY}:
- cp ${YEARISTYPE} ${YEARISTYPECOPY}
- chmod u+x ${YEARISTYPECOPY}
-
-posix_only: ${TDATA} ${YEARISTYPECOPY}
- (cd datfiles; \
- ${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR} -L /dev/null ${TDATA})
-
-right_only: leapseconds ${TDATA} ${YEARISTYPECOPY}
- (cd datfiles; \
- ${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR} -L leapseconds ${TDATA})
-
-other_two: leapseconds ${TDATA} ${YEARISTYPECOPY}
- (cd datfiles; \
- ${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR}/posix -L /dev/null ${TDATA})
- (cd datfiles; \
- ${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR}/right -L leapseconds ${TDATA})
-
-posix_right: posix_only other_two
-
-right_posix: right_only other_two
-
-#after_install:: ${DATA} ${REDO} ${YEARISTYPECOPY}
-# ${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR} -p ${POSIXRULES}
-# chown -R ${BINOWN}:${BINGRP} ${TZDIR}
-# find ${TZDIR} -type f | xargs chmod a=r
-# -rm -f ${DSTROOT}/etc/localtime
-# ln -s ${TZDIR}/${LOCALTIME} ${DSTROOT}/etc/localtime
-
-#since we are not doing native builds ... hack hack hack
-
-# pacificnew is obsolete and was removed from ZONE_FILES
-ZONE_FILES = africa antarctica asia australasia europe northamerica southamerica etcetera factory backward systemv solar87 solar88 solar89
-ZONEINFO = ${DSTROOT}/usr/share/zoneinfo
-
-# ftp://elsie.nci.nih.gov/pub/tzdata*.tar.gz
-# the tzdata*.tar.gz file is automatically unpacked and a version file created
-# /usr/local/share/tz/tzdata*.tar.gz is installed by the TimeZoneData project
-DATFILES = ${OFILE_DIR}/datfiles
-TARBALL = $(shell echo /usr/local/share/tz/tzdata*)
-DATVERS = $(shell basename ${TARBALL} | sed -e 's,\..*,,' -e 's/^tzdata//')
-VERSIONFILE = ${ZONEINFO}/+VERSION
-
-${DATFILES}:
- mkdir -p ${DATFILES}
- cd ${DATFILES} && tar xzf ${TARBALL}
-
-after_install:: ${DATFILES}
- -mkdir -p ${DSTROOT}/usr/share
- -rm -rf ${ZONEINFO}
- mkdir -p ${ZONEINFO}
- for tz in ${ZONE_FILES}; do \
- if [[ $${tz} = "northamerica" ]]; then \
- ${ZIC} -p America/New_York -L /dev/null -d ${ZONEINFO} -y ${DATFILES}/yearistype.sh ${DATFILES}/$${tz}; \
- else \
- ${ZIC} -L /dev/null -d ${ZONEINFO} -y ${DATFILES}/yearistype.sh ${DATFILES}/$${tz}; \
- fi \
- done
- chmod -R og-w ${ZONEINFO}
- install -c -m 444 ${DATFILES}/zone.tab ${ZONEINFO}
- install -c -m 444 ${DATFILES}/iso3166.tab ${ZONEINFO}
-ifeq "$(Embedded)" "YES"
- -mkdir -p ${DSTROOT}/private/var/db
- -rm -f ${DSTROOT}/private/var/db/localtime
- ln -fs /usr/share/zoneinfo/${LOCALTIME} ${DSTROOT}/private/var/db/localtime
-else
- -mkdir -p ${DSTROOT}/private/etc
- -rm -f ${DSTROOT}/private/etc/localtime
- ln -fs /usr/share/zoneinfo/${LOCALTIME} ${DSTROOT}/private/etc/localtime
-endif
- mkdir -p ${DSTROOT}/usr/share/man/man8
- install -c -m 444 zic.8 ${DSTROOT}/usr/share/man/man8
- echo ${DATVERS} > ${VERSIONFILE}
- chmod 444 ${VERSIONFILE}
+++ /dev/null
-###############################################################################
-# NeXT Makefile.preamble
-# Copyright 1996, NeXT Software, Inc.
-#
-# This Makefile is used for configuring the standard app makefiles associated
-# with ProjectBuilder.
-#
-# Use this template to set attributes for a project. Each node in a project
-# tree of sub-projects, tools, etc. should have its own Makefile.preamble and
-# Makefile.postamble.
-#
-###############################################################################
-## Configure the flags passed to $(CC) here. These flags will also be
-## inherited by all nested sub-projects and bundles. Put your -I, -D, -U, and
-## -L flags in ProjectBuilder's Build Options inspector if at all possible.
-## To change the default flags that get passed to ${CC}
-## (e.g. change -O to -O2), see Makefile.postamble.
-
-# Flags passed to compiler (in addition to -g, -O, etc)
-OTHER_CFLAGS =
-# Flags passed to ld (in addition to -ObjC, etc.)
-OTHER_LDFLAGS =
-# Flags passed to libtool when building libraries
-OTHER_LIBTOOL_FLAGS =
-# For ordering named sections on NEXTSTEP (see ld(1))
-SECTORDER_FLAGS =
-
-# If you do not want any headers exported before compilations begin,
-# uncomment the following line. This can be a big time saver.
-#SKIP_EXPORTING_HEADERS = YES
-
-# Stuff related to exporting headers from this project that isn't already
-# handled by PB.
-OTHER_PUBLIC_HEADERS =
-OTHER_PROJECT_HEADERS =
-OTHER_PRIVATE_HEADERS =
-
-# Set these two macros if you want a precomp to be built as part of
-# installation. The cc -precomp will be run in the public header directory
-# on the specified public header files with the specified additional flags.
-PUBLIC_PRECOMPILED_HEADERS =
-PUBLIC_PRECOMPILED_HEADERS_CFLAGS =
-
-# Set this for library projects if you want to publish header files. If your
-# app or tool project exports headers Don't
-# include $(DSTROOT); this is added for you automatically.
-PUBLIC_HEADER_DIR =
-PRIVATE_HEADER_DIR =
-
-# If, in a subproject, you want to append to the parent's PUBLIC_HEADER_DIR#
-# (say, to add a subdirectory like "/sys"), you can use:
-PUBLIC_HEADER_DIR_SUFFIX =
-PRIVATE_HEADER_DIR_SUFFIX =
-
-# Set this for dynamic library projects on platforms where code which references
-# a dynamic library must link against an import library (i.e., Windows NT)
-# Don't include $(DSTROOT); this is added for you automatically.
-IMPORT_LIBRARY_DIR =
-
-# Additional (non-localized) resources for this project, which can be generated
-OTHER_RESOURCES =
-
-# Uncomment this to produce a static archive-style (.a) library
-#LIBRARY_STYLE = STATIC
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-BUILD_OFILES_LIST_ONLY =
-
-# Additional relocatables to be linked into this project
-OTHER_OFILES =
-# Additional libraries to link against
-OTHER_LIBS =
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-## Configure how things get built here. Additional dependencies, source files,
-## derived files, and build order should be specified here.
-
-# Other dependencies of this project
-OTHER_PRODUCT_DEPENDS =
-# Built *before* building subprojects/bundles
-OTHER_INITIAL_TARGETS =
-# Other source files maintained by .pre/postamble
-OTHER_SOURCEFILES =
-# Additional files to be removed by `make clean'
-OTHER_GARBAGE =
-
-# Targets to build before installation
-OTHER_INSTALL_DEPENDS =
-
-# More obscure flags you might want to set for pswrap, yacc, lex, etc.
-PSWFLAGS =
-YFLAGS =
-LFLAGS =
-
-## Delete this line if you want fast and loose cleans that will not remove
-## things like precomps and user-defined OTHER_GARBAGE in subprojects.
-CLEAN_ALL_SUBPROJECTS = YES
-
-## Add more obscure source files here to cause them to be automatically
-## processed by the appropriate tool. Note that these files should also be
-## added to "Supporting Files" in ProjectBuilder. The desired .o files that
-## result from these files should also be added to OTHER_OFILES above so they
-## will be linked in.
-
-# .msg files that should have msgwrap run on them
-MSGFILES =
-# .defs files that should have mig run on them
-DEFSFILES =
-# .mig files (no .defs files) that should have mig run on them
-MIGFILES =
-# .x files that should have rpcgen run on them
-RPCFILES =
-
-## Add additional Help directories here (add them to the project as "Other
-## Resources" in Project Builder) so that they will be compressed into .store
-## files and copied into the app wrapper. If the help directories themselves
-## need to also be in the app wrapper, then a cp command will need to be added
-## in an after_install target.
-OTHER_HELP_DIRS =
-
-# After you have saved your project using the 4.0 PB, you will automatically
-# start using the makefiles in $(SYSTEM_DEVELOPER_DIR)/Makefiles/project. If you should
-# need to revert back to the old 3.3 Makefile behavior, override MAKEFILEDIR to
-# be $(SYSTEM_DEVELOPER_DIR)/Makefiles/app.
-
-# Don't add more rules here unless you want the first one to be the default
-# target for make! Put all your targets in Makefile.postamble.
-
--- /dev/null
+# $NetBSD: Makefile,v 1.14 1995/04/22 12:10:17 cgd Exp $
+
+# Change the line below for your time zone (after finding the zone you want in
+# the time zone files, or adding it to a time zone file).
+# Alternately, if you discover you've got the wrong time zone, you can just
+# zic -l rightzone
+
+# This line has been moved to /usr/src/etc/Makefile
+LOCALTIME= US/Pacific
+
+# If you want something other than Eastern United States time as a template
+# for handling POSIX-style time zone environment variables,
+# change the line below (after finding the zone you want in the
+# time zone files, or adding it to a time zone file).
+# Alternately, if you discover you've got the wrong time zone, you can just
+# zic -p rightzone
+
+POSIXRULES= US/Pacific
+
+# Use an absolute path name for TZDIR unless you're just testing the software.
+
+TZDIR= ${DESTDIR}/usr/share/zoneinfo
+
+# If you always want time values interpreted as "seconds since the epoch
+# (not counting leap seconds)", use
+# REDO= posix_only
+# below. If you always want right time values interpreted as "seconds since
+# the epoch" (counting leap seconds)", use
+# REDO= right_only
+# below. If you want both sets of data available, with leap seconds not
+# counted normally, use
+# REDO= posix_right
+# below. If you want both sets of data available, with leap seconds counted
+# normally, use
+# REDO= right_posix
+# below.
+
+REDO= posix_only
+
+# Since "." may not be in PATH...
+YEARISTYPE= ${.CURDIR}/datfiles/yearistype.sh
+YEARISTYPECOPY= ${.OBJDIR}/yearistypecopy
+
+YDATA= africa antarctica asia australasia \
+ europe northamerica southamerica pacificnew etcetera factory \
+ backward
+NDATA= systemv
+SDATA= solar87 solar88 solar89
+TDATA= $(YDATA) $(NDATA) $(SDATA)
+DATA= $(YDATA) $(NDATA) $(SDATA) leapseconds # yearistype.sh
+USNO= usno1988 usno1989
+
+ZIC=zic
+
+${YEARISTYPECOPY}:
+ cp ${YEARISTYPE} yearistypecopy
+ chmod u+x yearistypecopy
+
+posix_only: ${TDATA} ${YEARISTYPECOPY}
+ (cd ${.CURDIR}/datfiles; \
+ ${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR} -L /dev/null ${TDATA})
+
+right_only: leapseconds ${TDATA} ${YEARISTYPECOPY}
+ (cd ${.CURDIR}/datfiles; \
+ ${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR} -L leapseconds ${TDATA})
+
+other_two: leapseconds ${TDATA} ${YEARISTYPECOPY}
+ (cd ${.CURDIR}/datfiles; \
+ ${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR}/posix -L /dev/null ${TDATA})
+ (cd ${.CURDIR}/datfiles; \
+ ${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR}/right -L leapseconds ${TDATA})
+
+posix_right: posix_only other_two
+
+right_posix: right_only other_two
+
+realinstall: ${DATA} ${REDO} ${YEARISTYPECOPY}
+ (cd ${.CURDIR}/datfiles; \
+ ${ZIC} -y ${YEARISTYPECOPY} -d ${TZDIR} -p ${POSIXRULES})
+ chown -R ${BINOWN}:${BINGRP} ${TZDIR}
+ find ${TZDIR} -type f | xargs chmod a=r
+
+CLEANFILES+= yearistypecopy
+
+.PATH: ${.CURDIR}/datfiles
+.include <bsd.prog.mk>
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- FRAMEWORKS = ();
- H_FILES = (private.h, tzfile.h);
- OTHER_LINKED = (ialloc.c, scheck.c, zic.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, zic.8);
- SUBPROJECTS = ();
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDDIR = "/$(USER)/BUILD";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/sbin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/Developer/bin/make;
- PDO_UNIX_JAVA_COMPILER = "$(NEXTDEV_BIN)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = zic;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}
--- /dev/null
+@(#)README 7.11
+
+"What time is it?" -- Richard Deacon as The King
+"Any time you want it to be." -- Frank Baxter as The Scientist
+ (from the Bell System film "About Time")
+
+The 1989 update of the time zone package featured
+
+* POSIXization (including interpretation of POSIX-style TZ environment
+ variables, provided by Guy Harris),
+* ANSIfication (including versions of "mktime" and "difftime"),
+* SVIDulation (an "altzone" variable)
+* MACHination (the "gtime" function)
+* corrections to some time zone data (including corrections to the rules
+ for Great Britain and New Zealand)
+* reference data from the United States Naval Observatory for folks who
+ want to do additional time zones
+* and the 1989 data for Saudi Arabia.
+
+(Since this code will be treated as "part of the implementation" in some places
+and as "part of the application" in others, there's no good way to name
+functions, such as timegm, that are not part of the proposed ANSI C standard;
+such functions have kept their old, underscore-free names in this update.)
+
+And the "dysize" function has disappeared; it was present to allow compilation
+of the "date" command on old BSD systems, and a version of "date" is now
+provided in the package. The "date" command is not created when you "make all"
+since it may lack options provided by the version distributed with your
+operating system, or may not interact with the system in the same way the
+native version does.
+
+Since POSIX frowns on correct leap second handling, the default behavior of
+the "zic" command (in the absence of a "-L" option) has been changed to omit
+leap second information from its output files.
+
+Here is a recipe for acquiring, building, installing, and testing the
+tz distribution on a GNU/Linux or similar host.
+
+ mkdir tz
+ cd tz
+ wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
+ gzip -dc tzcode*.tar.gz | tar -xf -
+ gzip -dc tzdata*.tar.gz | tar -xf -
+
+Be sure to read the comments in "Makefile" and make any changes needed
+to make things right for your system, especially if you are using some
+platform other than GNU/Linux. Then run the following commands,
+substituting your desired installation directory for "$HOME/tzdir":
+
+ make TOPDIR=$HOME/tzdir install
+ $HOME/tzdir/etc/zdump -v America/Los_Angeles
+
+To use the new functions, use a "-ltz" option when compiling or linking.
+
+Historical local time information has been included here not because it
+is particularly useful, but rather to:
+
+* give an idea of the variety of local time rules that have
+ existed in the past and thus an idea of the variety that may be
+ expected in the future;
+
+* provide a test of the generality of the local time rule description
+ system.
+
+The information in the time zone data files is by no means authoritative;
+if you know that the rules are different from those in a file, by all means
+feel free to change file (and please send the changed version to
+tz@elsie.nci.nih.gov for use in the future). Europeans take note!
+
+Thanks to these Timezone Caballeros who've made major contributions to the
+time conversion package: Keith Bostic; Bob Devine; Paul Eggert; Robert Elz;
+Guy Harris; Mark Horton; John Mackin; and Bradley White. Thanks also to
+Michael Bloom, Art Neilson, Stephen Prince, John Sovereign, and Frank Wales
+for testing work, and to Gwillim Law for checking local mean time data.
+None of them are responsible for remaining errors.
+
+Look in the ~ftp/pub directory of elsie.nci.nih.gov
+for updated versions of these files.
+
+Please send comments or information to tz@elsie.nci.nih.gov.
--- /dev/null
+@(#)Theory 7.15
+
+
+----- Outline -----
+
+ Time and date functions
+ Names of time zone regions
+ Time zone abbreviations
+ Calendrical issues
+ Time and time zones on Mars
+
+
+----- Time and date functions -----
+
+These time and date functions are upwards compatible with POSIX.1,
+an international standard for UNIX-like systems.
+As of this writing, the current edition of POSIX.1 is:
+
+ Information technology --Portable Operating System Interface (POSIX (R))
+ -- Part 1: System Application Program Interface (API) [C Language]
+ ISO/IEC 9945-1:1996
+ ANSI/IEEE Std 1003.1, 1996 Edition
+ 1996-07-12
+
+POSIX.1 has the following properties and limitations.
+
+* In POSIX.1, time display in a process is controlled by the
+ environment variable TZ. Unfortunately, the POSIX.1 TZ string takes
+ a form that is hard to describe and is error-prone in practice.
+ Also, POSIX.1 TZ strings can't deal with other (for example, Israeli)
+ daylight saving time rules, or situations where more than two
+ time zone abbreviations are used in an area.
+
+ The POSIX.1 TZ string takes the following form:
+
+ stdoffset[dst[offset],date[/time],date[/time]]
+
+ where:
+
+ std and dst
+ are 3 or more characters specifying the standard
+ and daylight saving time (DST) zone names.
+ offset
+ is of the form `[-]hh:[mm[:ss]]' and specifies the
+ offset west of UTC. The default DST offset is one hour
+ ahead of standard time.
+ date[/time],date[/time]
+ specifies the beginning and end of DST. If this is absent,
+ the system supplies its own rules for DST, and these can
+ differ from year to year; typically US DST rules are used.
+ time
+ takes the form `hh:[mm[:ss]]' and defaults to 02:00.
+ date
+ takes one of the following forms:
+ Jn (1<=n<=365)
+ origin-1 day number not counting February 29
+ n (0<=n<=365)
+ origin-0 day number counting February 29 if present
+ Mm.n.d (0[Sunday]<=d<=6[Saturday], 1<=n<=5, 1<=m<=12)
+ for the dth day of week n of month m of the year,
+ where week 1 is the first week in which day d appears,
+ and `5' stands for the last week in which day d appears
+ (which may be either the 4th or 5th week).
+
+* In POSIX.1, when a TZ value like "EST5EDT" is parsed,
+ typically the current US DST rules are used,
+ but this means that the US DST rules are compiled into each program
+ that does time conversion. This means that when US time conversion
+ rules change (as in the United States in 1987), all programs that
+ do time conversion must be recompiled to ensure proper results.
+
+* In POSIX.1, there's no tamper-proof way for a process to learn the
+ system's best idea of local wall clock. (This is important for
+ applications that an administrator wants used only at certain times--
+ without regard to whether the user has fiddled the "TZ" environment
+ variable. While an administrator can "do everything in UTC" to get
+ around the problem, doing so is inconvenient and precludes handling
+ daylight saving time shifts--as might be required to limit phone
+ calls to off-peak hours.)
+
+* POSIX.1 requires that systems ignore leap seconds.
+
+These are the extensions that have been made to the POSIX.1 functions:
+
+* The "TZ" environment variable is used in generating the name of a file
+ from which time zone information is read (or is interpreted a la
+ POSIX); "TZ" is no longer constrained to be a three-letter time zone
+ name followed by a number of hours and an optional three-letter
+ daylight time zone name. The daylight saving time rules to be used
+ for a particular time zone are encoded in the time zone file;
+ the format of the file allows U.S., Australian, and other rules to be
+ encoded, and allows for situations where more than two time zone
+ abbreviations are used.
+
+ It was recognized that allowing the "TZ" environment variable to
+ take on values such as "America/New_York" might cause "old" programs
+ (that expect "TZ" to have a certain form) to operate incorrectly;
+ consideration was given to using some other environment variable
+ (for example, "TIMEZONE") to hold the string used to generate the
+ time zone information file name. In the end, however, it was decided
+ to continue using "TZ": it is widely used for time zone purposes;
+ separately maintaining both "TZ" and "TIMEZONE" seemed a nuisance;
+ and systems where "new" forms of "TZ" might cause problems can simply
+ use TZ values such as "EST5EDT" which can be used both by
+ "new" programs (a la POSIX) and "old" programs (as zone names and
+ offsets).
+
+* To handle places where more than two time zone abbreviations are used,
+ the functions "localtime" and "gmtime" set tzname[tmp->tm_isdst]
+ (where "tmp" is the value the function returns) to the time zone
+ abbreviation to be used. This differs from POSIX.1, where the elements
+ of tzname are only changed as a result of calls to tzset.
+
+* Since the "TZ" environment variable can now be used to control time
+ conversion, the "daylight" and "timezone" variables are no longer
+ needed. (These variables are defined and set by "tzset"; however, their
+ values will not be used by "localtime.")
+
+* The "localtime" function has been set up to deliver correct results
+ for near-minimum or near-maximum time_t values. (A comment in the
+ source code tells how to get compatibly wrong results).
+
+* A function "tzsetwall" has been added to arrange for the system's
+ best approximation to local wall clock time to be delivered by
+ subsequent calls to "localtime." Source code for portable
+ applications that "must" run on local wall clock time should call
+ "tzsetwall();" if such code is moved to "old" systems that don't
+ provide tzsetwall, you won't be able to generate an executable program.
+ (These time zone functions also arrange for local wall clock time to be
+ used if tzset is called--directly or indirectly--and there's no "TZ"
+ environment variable; portable applications should not, however, rely
+ on this behavior since it's not the way SVR2 systems behave.)
+
+* These functions can account for leap seconds, thanks to Bradley White
+ (bww@k.cs.cmu.edu).
+
+Points of interest to folks with other systems:
+
+* This package is already part of many POSIX-compliant hosts,
+ including BSD, HP, Linux, Network Appliance, SCO, SGI, and Sun.
+ On such hosts, the primary use of this package
+ is to update obsolete time zone rule tables.
+ To do this, you may need to compile the time zone compiler
+ `zic' supplied with this package instead of using the system `zic',
+ since the format of zic's input changed slightly in late 1994,
+ and many vendors still do not support the new input format.
+
+* The UNIX Version 7 "timezone" function is not present in this package;
+ it's impossible to reliably map timezone's arguments (a "minutes west
+ of GMT" value and a "daylight saving time in effect" flag) to a
+ time zone abbreviation, and we refuse to guess.
+ Programs that in the past used the timezone function may now examine
+ tzname[localtime(&clock)->tm_isdst] to learn the correct time
+ zone abbreviation to use. Alternatively, use
+ localtime(&clock)->tm_zone if this has been enabled.
+
+* The 4.2BSD gettimeofday function is not used in this package.
+ This formerly let users obtain the current UTC offset and DST flag,
+ but this functionality was removed in later versions of BSD.
+
+* In SVR2, time conversion fails for near-minimum or near-maximum
+ time_t values when doing conversions for places that don't use UTC.
+ This package takes care to do these conversions correctly.
+
+The functions that are conditionally compiled if STD_INSPIRED is defined
+should, at this point, be looked on primarily as food for thought. They are
+not in any sense "standard compatible"--some are not, in fact, specified in
+*any* standard. They do, however, represent responses of various authors to
+standardization proposals.
+
+Other time conversion proposals, in particular the one developed by folks at
+Hewlett Packard, offer a wider selection of functions that provide capabilities
+beyond those provided here. The absence of such functions from this package
+is not meant to discourage the development, standardization, or use of such
+functions. Rather, their absence reflects the decision to make this package
+contain valid extensions to POSIX.1, to ensure its broad
+acceptability. If more powerful time conversion functions can be standardized,
+so much the better.
+
+
+----- Names of time zone rule files -----
+
+The time zone rule file naming conventions attempt to strike a balance
+among the following goals:
+
+ * Uniquely identify every national region where clocks have all
+ agreed since 1970. This is essential for the intended use: static
+ clocks keeping local civil time.
+
+ * Indicate to humans as to where that region is. This simplifes use.
+
+ * Be robust in the presence of political changes. This reduces the
+ number of updates and backward-compatibility hacks. For example,
+ names of countries are ordinarily not used, to avoid
+ incompatibilities when countries change their name
+ (e.g. Zaire->Congo) or when locations change countries
+ (e.g. Hong Kong from UK colony to China).
+
+ * Be portable to a wide variety of implementations.
+ This promotes use of the technology.
+
+ * Use a consistent naming convention over the entire world.
+ This simplifies both use and maintenance.
+
+This naming convention is not intended for use by inexperienced users
+to select TZ values by themselves (though they can of course examine
+and reuse existing settings). Distributors should provide
+documentation and/or a simple selection interface that explains the
+names; see the 'tzselect' program supplied with this distribution for
+one example.
+
+Names normally have the form AREA/LOCATION, where AREA is the name
+of a continent or ocean, and LOCATION is the name of a specific
+location within that region. North and South America share the same
+area, `America'. Typical names are `Africa/Cairo', `America/New_York',
+and `Pacific/Honolulu'.
+
+Here are the general rules used for choosing location names,
+in decreasing order of importance:
+
+ Use only valid POSIX file name components (i.e., the parts of
+ names other than `/'). Within a file name component,
+ use only ASCII letters, `.', `-' and `_'. Do not use
+ digits, as that might create an ambiguity with POSIX
+ TZ strings. A file name component must not exceed 14
+ characters or start with `-'. E.g., prefer `Brunei'
+ to `Bandar_Seri_Begawan'.
+ Include at least one location per time zone rule set per country.
+ One such location is enough. Use ISO 3166 (see the file
+ iso3166.tab) to help decide whether something is a country.
+ If all the clocks in a country's region have agreed since 1970,
+ don't bother to include more than one location
+ even if subregions' clocks disagreed before 1970.
+ Otherwise these tables would become annoyingly large.
+ If a name is ambiguous, use a less ambiguous alternative;
+ e.g. many cities are named San Jose and Georgetown, so
+ prefer `Costa_Rica' to `San_Jose' and `Guyana' to `Georgetown'.
+ Keep locations compact. Use cities or small islands, not countries
+ or regions, so that any future time zone changes do not split
+ locations into different time zones. E.g. prefer `Paris'
+ to `France', since France has had multiple time zones.
+ Use mainstream English spelling, e.g. prefer `Rome' to `Roma', and
+ prefer `Athens' to the true name (which uses Greek letters).
+ The POSIX file name restrictions encourage this rule.
+ Use the most populous among locations in a country's time zone,
+ e.g. prefer `Shanghai' to `Beijing'. Among locations with
+ similar populations, pick the best-known location,
+ e.g. prefer `Rome' to `Milan'.
+ Use the singular form, e.g. prefer `Canary' to `Canaries'.
+ Omit common suffixes like `_Islands' and `_City', unless that
+ would lead to ambiguity. E.g. prefer `Cayman' to
+ `Cayman_Islands' and `Guatemala' to `Guatemala_City',
+ but prefer `Mexico_City' to `Mexico' because the country
+ of Mexico has several time zones.
+ Use `_' to represent a space.
+ Omit `.' from abbreviations in names, e.g. prefer `St_Helena'
+ to `St._Helena'.
+ Do not change established names if they only marginally
+ violate the above rules. For example, don't change
+ the existing name `Rome' to `Milan' merely because
+ Milan's population has grown to be somewhat greater
+ than Rome's.
+ If a name is changed, put its old spelling in the `backward' file.
+
+The file `zone.tab' lists the geographical locations used to name
+time zone rule files.
+
+Older versions of this package used a different naming scheme,
+and these older names are still supported.
+See the file `backward' for most of these older names
+(e.g. `US/Eastern' instead of `America/New_York').
+The other old-fashioned names still supported are
+`WET', `CET', `MET', `EET' (see the file `europe'),
+and `Factory' (see the file `factory').
+
+
+----- Time zone abbreviations -----
+
+When this package is installed, it generates time zone abbreviations
+like `EST' to be compatible with human tradition and POSIX.1.
+Here are the general rules used for choosing time zone abbreviations,
+in decreasing order of importance:
+
+ Use abbreviations that consist of three or more ASCII letters.
+ Previous editions of this database also used characters like
+ ' ' and '?', but these characters have a special meaning to
+ the shell and cause commands like
+ set `date`
+ to have unexpected effects.
+ Previous editions of this rule required upper-case letters,
+ but the Congressman who introduced Chamorro Standard Time
+ preferred "ChST", so the rule has been relaxed.
+
+ This rule guarantees that all abbreviations could have
+ been specified by a POSIX.1 TZ string. POSIX.1
+ requires at least three characters for an
+ abbreviation. POSIX.1-1996 says that an abbreviation
+ cannot start with ':', and cannot contain ',', '-',
+ '+', NUL, or a digit. Draft 7 of POSIX 1003.1-200x
+ changes this rule to say that an abbreviation can
+ contain only '-', '+', and alphanumeric characters in
+ the current locale. To be portable to both sets of
+ rules, an abbreviation must therefore use only ASCII
+ letters, as these are the only letters that are
+ alphabetic in all locales.
+
+ Use abbreviations that are in common use among English-speakers,
+ e.g. `EST' for Eastern Standard Time in North America.
+ We assume that applications translate them to other languages
+ as part of the normal localization process; for example,
+ a French application might translate `EST' to `HNE'.
+
+ For zones whose times are taken from a city's longitude, use the
+ traditional xMT notation, e.g. `PMT' for Paris Mean Time.
+ The only name like this in current use is `GMT'.
+
+ If there is no common English abbreviation, abbreviate the English
+ translation of the usual phrase used by native speakers.
+ If this is not available or is a phrase mentioning the country
+ (e.g. ``Cape Verde Time''), then:
+
+ When a country has a single or principal time zone region,
+ append `T' to the country's ISO code, e.g. `CVT' for
+ Cape Verde Time. For summer time append `ST';
+ for double summer time append `DST'; etc.
+ When a country has multiple time zones, take the first three
+ letters of an English place name identifying each zone
+ and then append `T', `ST', etc. as before;
+ e.g. `VLAST' for VLAdivostok Summer Time.
+
+ Use "zzz" for locations while uninhabited. The mnemonic is that
+ these locations are, in some sense, asleep.
+
+Application writers should note that these abbreviations are ambiguous
+in practice: e.g. `EST' has a different meaning in Australia than
+it does in the United States. In new applications, it's often better
+to use numeric UTC offsets like `-0500' instead of time zone
+abbreviations like `EST'; this avoids the ambiguity.
+
+
+----- Calendrical issues -----
+
+Calendrical issues are a bit out of scope for a time zone database,
+but they indicate the sort of problems that we would run into if we
+extended the time zone database further into the past. An excellent
+resource in this area is Nachum Dershowitz and Edward M. Reingold,
+<a href="http://emr.cs.uiuc.edu/home/reingold/calendar-book/index.shtml">
+Calendrical Calculations
+</a>, Cambridge University Press (1997). Other information and
+sources are given below. They sometimes disagree.
+
+
+France
+
+Gregorian calendar adopted 1582-12-20.
+French Revolutionary calendar used 1793-11-24 through 1805-12-31,
+and (in Paris only) 1871-05-06 through 1871-05-23.
+
+
+Russia
+
+From Chris Carrier <72157.3334@CompuServe.COM> (1996-12-02):
+On 1929-10-01 the Soviet Union instituted an ``Eternal Calendar''
+with 30-day months plus 5 holidays, with a 5-day week.
+On 1931-12-01 it changed to a 6-day week; in 1934 it reverted to the
+Gregorian calendar while retaining the 6-day week; on 1940-06-27 it
+reverted to the 7-day week. With the 6-day week the usual days
+off were the 6th, 12th, 18th, 24th and 30th of the month.
+(Source: Evitiar Zerubavel, _The Seven Day Circle_)
+
+
+Mark Brader reported a similar story in "The Book of Calendars", edited
+by Frank Parise (1982, Facts on File, ISBN 0-8719-6467-8), page 377. But:
+
+From: Petteri Sulonen (via Usenet)
+Date: 14 Jan 1999 00:00:00 GMT
+Message-ID: <Petteri.Sulonen-1401991626030001@lapin-kulta.in.helsinki.fi>
+
+If your source is correct, how come documents between 1929 -- 1940 were
+still dated using the conventional, Gregorian calendar?
+
+I can post a scan of a document dated December 1, 1934, signed by
+Yenukidze, the secretary, on behalf of Kalinin, the President of the
+Executive Committee of the Supreme Soviet, if you like.
+
+
+
+Sweden (and Finland)
+
+From: msb@sq.com (Mark Brader)
+<a href="news:1996Jul6.012937.29190@sq.com">
+Subject: Re: Gregorian reform -- a part of locale?
+</a>
+Date: 1996-07-06
+
+In 1700, Denmark made the transition from Julian to Gregorian. Sweden
+decided to *start* a transition in 1700 as well, but rather than have one of
+those unsightly calendar gaps :-), they simply decreed that the next leap
+year after 1696 would be in 1744 -- putting the whole country on a calendar
+different from both Julian and Gregorian for a period of 40 years.
+
+However, in 1704 something went wrong and the plan was not carried through;
+they did, after all, have a leap year that year. And one in 1708. In 1712
+they gave it up and went back to Julian, putting 30 days in February that
+year!...
+
+Then in 1753, Sweden made the transition to Gregorian in the usual manner,
+getting there only 13 years behind the original schedule.
+
+(A previous posting of this story was challenged, and Swedish readers
+produced the following references to support it: "Tiderakning och historia"
+by Natanael Beckman (1924) and "Tid, en bok om tiderakning och
+kalendervasen" by Lars-Olof Lode'n (no date was given).)
+
+
+Grotefend's data
+
+From: "Michael Palmer" <mpalmer@netcom.com> [with one obvious typo fixed]
+Subject: Re: Gregorian Calendar (was Re: Another FHC related question
+Newsgroups: soc.genealogy.german
+Date: Tue, 9 Feb 1999 02:32:48 -800
+Message-ID: <199902091032.CAA09644@netcom10.netcom.com>
+
+The following is a(n incomplete) listing, arranged chronologically, of
+European states, with the date they converted from the Julian to the
+Gregorian calendar:
+
+04/15 Oct 1582 - Italy (with exceptions), Spain, Portugal, Poland (Roman
+ Catholics and Danzig only)
+09/20 Dec 1582 - France, Lorraine
+
+21 Dec 1582/
+ 01 Jan 1583 - Holland, Brabant, Flanders, Hennegau
+10/21 Feb 1583 - bishopric of Liege (L"uttich)
+13/24 Feb 1583 - bishopric of Augsburg
+04/15 Oct 1583 - electorate of Trier
+05/16 Oct 1583 - Bavaria, bishoprics of Freising, Eichstedt, Regensburg,
+ Salzburg, Brixen
+13/24 Oct 1583 - Austrian Oberelsass and Breisgau
+20/31 Oct 1583 - bishopric of Basel
+02/13 Nov 1583 - duchy of J"ulich-Berg
+02/13 Nov 1583 - electorate and city of K"oln
+04/15 Nov 1583 - bishopric of W"urzburg
+11/22 Nov 1583 - electorate of Mainz
+16/27 Nov 1583 - bishopric of Strassburg and the margraviate of Baden
+17/28 Nov 1583 - bishopric of M"unster and duchy of Cleve
+14/25 Dec 1583 - Steiermark
+
+06/17 Jan 1584 - Austria and Bohemia
+11/22 Jan 1584 - Luzern, Uri, Schwyz, Zug, Freiburg, Solothurn
+12/23 Jan 1584 - Silesia and the Lausitz
+22 Jan/
+ 02 Feb 1584 - Hungary (legally on 21 Oct 1587)
+ Jun 1584 - Unterwalden
+01/12 Jul 1584 - duchy of Westfalen
+
+16/27 Jun 1585 - bishopric of Paderborn
+
+14/25 Dec 1590 - Transylvania
+
+22 Aug/
+ 02 Sep 1612 - duchy of Prussia
+
+13/24 Dec 1614 - Pfalz-Neuburg
+
+ 1617 - duchy of Kurland (reverted to the Julian calendar in
+ 1796)
+
+ 1624 - bishopric of Osnabr"uck
+
+ 1630 - bishopric of Minden
+
+15/26 Mar 1631 - bishopric of Hildesheim
+
+ 1655 - Kanton Wallis
+
+05/16 Feb 1682 - city of Strassburg
+
+18 Feb/
+ 01 Mar 1700 - Protestant Germany (including Swedish possessions in
+ Germany), Denmark, Norway
+30 Jun/
+ 12 Jul 1700 - Gelderland, Zutphen
+10 Nov/
+ 12 Dec 1700 - Utrecht, Overijssel
+
+31 Dec 1700/
+ 12 Jan 1701 - Friesland, Groningen, Z"urich, Bern, Basel, Geneva,
+ Turgau, and Schaffhausen
+
+ 1724 - Glarus, Appenzell, and the city of St. Gallen
+
+01 Jan 1750 - Pisa and Florence
+
+02/14 Sep 1752 - Great Britain
+
+17 Feb/
+ 01 Mar 1753 - Sweden
+
+1760-1812 - Graub"unden
+
+The Russian empire (including Finland and the Baltic states) did not
+convert to the Gregorian calendar until the Soviet revolution of 1917.
+
+Source: H. Grotefend, _Taschenbuch der Zeitrechnung des deutschen
+Mittelalters und der Neuzeit_, herausgegeben von Dr. O. Grotefend
+(Hannover: Hahnsche Buchhandlung, 1941), pp. 26-28.
+
+
+----- Time and time zones on Mars -----
+
+Some people have adjusted their work schedules to fit Mars time.
+Dozens of special Mars watches were built for Jet Propulsion
+Laboratory workers who kept Mars time during the Mars Exploration
+Rovers mission (2004). These timepieces look like normal Seikos and
+Citizens but use Mars seconds rather than terrestrial seconds.
+
+A Mars solar day is called a "sol" and has a mean period equal to
+about 24 hours 39 minutes 35.244 seconds in terrestrial time. It is
+divided into a conventional 24-hour clock, so each Mars second equals
+about 1.02749125 terrestrial seconds.
+
+The prime meridian of Mars goes through the center of the crater
+Airy-0, named in honor of the British astronomer who built the
+Greenwich telescope that defines Earth's prime meridian. Mean solar
+time on the Mars prime meridian is called Mars Coordinated Time (MTC).
+
+Each landed mission on Mars has adopted a different reference for
+solar time keeping, so there is no real standard for Mars time zones.
+For example, the Mars Exploration Rover project (2004) defined two
+time zones "Local Solar Time A" and "Local Solar Time B" for its two
+missions, each zone designed so that its time equals local true solar
+time at approximately the middle of the nominal mission. Such a "time
+zone" is not particularly suited for any application other than the
+mission itself.
+
+Many calendars have been proposed for Mars, but none have achieved
+wide acceptance. Astronomers often use Mars Sol Date (MSD) which is a
+sequential count of Mars solar days elapsed since about 1873-12-29
+12:00 GMT.
+
+The tz database does not currently support Mars time, but it is
+documented here in the hopes that support will be added eventually.
+
+Sources:
+
+Michael Allison and Robert Schmunk,
+"Technical Notes on Mars Solar Time as Adopted by the Mars24 Sunclock"
+<http://www.giss.nasa.gov/tools/mars24/help/notes.html> (2004-03-15).
+
+Jia-Rui Chong, "Workdays Fit for a Martian", Los Angeles Times
+(2004-01-14), pp A1, A20-A21.
--- /dev/null
+#this must be run on a native system
+
+zic -y datfiles/yearistype.sh -d /tmp/zoneinfo -L /dev/null datfiles/africa datfiles/antarctica datfiles/asia datfiles/australasia datfiles/europe datfiles/northamerica datfiles/southamerica datfiles/pacificnew datfiles/etcetera datfiles/factory datfiles/backward datfiles/systemv datfiles/solar87 datfiles/solar88 datfiles/solar89
+
--- /dev/null
+<?xml version="1.0" encoding="US-ASCII"?>
+<!DOCTYPE html
+PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-type" content='text/html; charset="US-ASCII"' />
+<title>Time and the Arts</title>
+</head>
+<body>
+<h1>Time and the Arts</h1>
+<address>
+@(#)tz-art.htm 7.53
+</address>
+<p>
+Please send corrections to this web page to the
+<a href="mailto:tz@elsie.nci.nih.gov">time zone mailing list</a>.</p>
+<p>
+See also <a href="tz-link.htm">Sources for Time Zone and Daylight Saving Time Data</a>.</p>
+<hr />
+<p>
+Data on recordings of "Save That Time," Russ Long, Serrob Publishing, BMI:</p>
+<table>
+<tr><td>Artist</td><td>Karrin Allyson</td></tr>
+<tr><td>CD</td><td>I Didn't Know About You</td></tr>
+<tr><td>Copyright Date</td><td>1993</td></tr>
+<tr><td>Label</td><td>Concord Jazz, Inc.</td></tr>
+<tr><td>ID</td><td>CCD-4543</td></tr>
+<tr><td>Track Time</td><td>3:44</td></tr>
+<tr><td>Personnel</td><td>Karrin Allyson, vocal;
+Russ Long, piano;
+Gerald Spaits, bass;
+Todd Strait, drums</td></tr>
+<tr><td>Notes</td><td>CD notes "additional lyric by Karrin Allyson;
+arranged by Russ Long and Karrin Allyson"</td></tr>
+<tr><td>ADO Rating</td><td>1 star</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=A1fdovw9ta92k">AMG Rating</a></td><td>4 stars</td></tr>
+<tr><td>Penguin Rating</td><td>3.5 stars</td></tr>
+<tr><td> </td></tr>
+<tr><td>Artist</td><td>Kevin Mahogany</td></tr>
+<tr><td>CD</td><td>Double Rainbow</td></tr>
+<tr><td>Copyright Date</td><td>1993</td></tr>
+<tr><td>Label</td><td>Enja Records</td></tr>
+<tr><td>ID</td><td>ENJ-7097 2</td></tr>
+<tr><td>Track Time</td><td>6:27</td></tr>
+<tr><td>Personnel</td><td>Kevin Mahogany, vocal;
+Kenny Barron, piano;
+Ray Drummond, bass;
+Ralph Moore, tenor saxophone;
+Lewis Nash, drums</td></tr>
+<tr><td>ADO Rating</td><td>1.5 stars</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=Akikbikzjbb19">AMG Rating</a></td><td>3 stars</td></tr>
+<tr><td>Penguin Rating</td><td>3 stars</td></tr>
+<tr><td> </td></tr>
+<tr><td>Artist</td><td>Joe Williams</td></tr>
+<tr><td>CD</td><td>Here's to Life</td></tr>
+<tr><td>Copyright Date</td><td>1994</td></tr>
+<tr><td>Label</td><td>Telarc International Corporation</td></tr>
+<tr><td>ID</td><td>CD-83357</td></tr>
+<tr><td>Track Time</td><td>3:58</td></tr>
+<tr><td>Personnel</td><td>Joe Williams, vocal
+The Robert Farnon [39 piece] Orchestra</td></tr>
+<tr><td>Notes</td><td>This CD is also available as part of a 3-CD package from
+Telarc, "Triple Play" (CD-83461)</td></tr>
+<tr><td>ADO Rating</td><td>black dot</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=Amyyvad6kt8w1">AMG Rating</a></td><td>2 stars</td></tr>
+<tr><td>Penguin Rating</td><td>3 stars</td></tr>
+<tr><td> </td></tr>
+<tr><td>Artist</td><td>Charles Fambrough</td></tr>
+<tr><td>CD</td><td>Keeper of the Spirit</td></tr>
+<tr><td>Copyright Date</td><td>1995</td></tr>
+<tr><td>Label</td><td>AudioQuest Music</td></tr>
+<tr><td>ID</td><td>AQ-CD1033</td></tr>
+<tr><td>Track Time</td><td>7:07</td></tr>
+<tr><td>Personnel</td><td>Charles Fambrough, bass;
+Joel Levine, tenor recorder;
+Edward Simon, piano;
+Lenny White, drums;
+Marion Simon, percussion</td></tr>
+<tr><td>Notes</td><td>On-line information and samples available at
+<a href="http://wwmusic.com/~music/audioq/rel/1033.html">http://wwmusic.com/~music/audioq/rel/1033.html</a></td></tr>
+<tr><td>ADO Rating</td><td>2 stars</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=A5rkcikcjbb89">AMG Rating</a></td><td>unrated</td></tr>
+<tr><td>Penguin Rating</td><td>3 stars</td></tr>
+</table>
+<hr />
+<p>Also of note:</p>
+<table>
+<tr><td>Artist</td><td>Holly Cole Trio</td></tr>
+<tr><td>CD</td><td>Blame It On My Youth</td></tr>
+<tr><td>Copyright Date</td><td>1992</td></tr>
+<tr><td>Label</td><td>Manhattan</td></tr>
+<tr><td>ID</td><td>CDP 7 97349 2</td></tr>
+<tr><td>Total Time</td><td>37:45</td></tr>
+<tr><td>Personnel</td><td>Holly Cole, voice;
+Aaron Davis, piano;
+David Piltch, string bass</td></tr>
+<tr><td>Notes</td><td>Lyrical reference to "Eastern Standard Time" in
+Tom Waits' "Purple Avenue"</td></tr>
+<tr><td>ADO Rating</td><td>2.5 stars</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=A3a9ds37ya3dg">AMG Rating</a></td><td>3 stars</td></tr>
+<tr><td>Penguin Rating</td><td>unrated</td></tr>
+<tr><td> </td></tr>
+<tr><td>Artist</td><td>Milt Hinton</td></tr>
+<tr><td>CD</td><td>Old Man Time</td></tr>
+<tr><td>Copyright Date</td><td>1990</td></tr>
+<tr><td>Label</td><td>Chiaroscuro</td></tr>
+<tr><td>ID</td><td>CR(D) 310</td></tr>
+<tr><td>Total Time</td><td>149:38 (two CDs)</td></tr>
+<tr><td>Personnel</td><td>Milt Hinton, bass;
+Doc Cheatham, Dizzy Gillespie, Clark Terry, trumpet;
+Al Grey, trombone;
+Eddie Barefield, Joe Camel (Flip Phillips), Buddy Tate,
+clarinet and saxophone;
+John Bunch, Red Richards, Norman Simmons, Derek Smith,
+Ralph Sutton, piano;
+Danny Barker, Al Casey, guitar;
+Gus Johnson, Gerryck King, Bob Rosengarden, Jackie Williams,
+drums;
+Lionel Hampton, vibraphone;
+Cab Calloway, Joe Williams, vocal;
+Buck Clayton, arrangements</td></tr>
+<tr><td>Notes</td><td>tunes include Old Man Time, Time After Time,
+Sometimes I'm Happy,
+A Hot Time in the Old Town Tonight,
+Four or Five Times, Now's the Time,
+Time on My Hands, This Time It's Us,
+and Good Time Charlie
+On-line samples available at
+<a href="http://www.chiaroscurojazz.com/albuminfo.php4?albumid=49">http://www.chiaroscurojazz.com/albuminfo.php3?albumid=49</a></td></tr>
+<tr><td>ADO Rating</td><td>3 stars</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=A1cbyxdab8ola">AMG Rating</a></td><td>4.5 stars</td></tr>
+<tr><td>Penguin Rating</td><td>3 stars</td></tr>
+<tr><td> </td></tr>
+<tr><td>Artist</td><td>Alan Broadbent</td></tr>
+<tr><td>CD</td><td>Pacific Standard Time</td></tr>
+<tr><td>Copyright Date</td><td>1995</td></tr>
+<tr><td>Label</td><td>Concord Jazz, Inc.</td></tr>
+<tr><td>ID</td><td>CCD-4664</td></tr>
+<tr><td>Total Time</td><td>62:42</td></tr>
+<tr><td>Personnel</td><td>Alan Broadbent, piano;
+Putter Smith, Bass;
+Frank Gibson, Jr., drums</td></tr>
+<tr><td>Notes</td><td>The CD cover features an analemma for equation-of-time fans</td></tr>
+<tr><td>ADO Rating</td><td>1 star</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=Asl8zefuk8gfo">AMG Rating</a></td><td>4 stars</td></tr>
+<tr><td>Penguin Rating</td><td>3.5 stars</td></tr>
+<tr><td> </td></tr>
+<tr><td>Artist</td><td>Anthony Braxton/Richard Teitelbaum</td></tr>
+<tr><td>CD</td><td>Silence/Time Zones</td></tr>
+<tr><td>Copyright Date</td><td>1996</td></tr>
+<tr><td>Label</td><td>Black Lion</td></tr>
+<tr><td>ID</td><td>BLCD 760221</td></tr>
+<tr><td>Total Time</td><td>72:58</td></tr>
+<tr><td>Personnel</td><td>Anthony Braxton, sopranino and alto saxophones,
+contrebasse clarinet, miscellaneous instruments;
+Leo Smith, trumpet and miscellaneous instruments;
+Leroy Jenkins, violin and miscellaneous instruments;
+Richard Teitelbaum, modular moog and micromoog synthesizer</td></tr>
+<tr><td>ADO Rating</td><td>black dot</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=A5bkvu3xjan1k">AMG Rating</a></td><td>unrated</td></tr>
+<tr><td> </td></tr>
+<tr><td>Artist</td><td>Jules Verne</td></tr>
+<tr><td>Book</td><td>Le Tour du Monde en Quatre-Vingts Jours
+(Around the World in Eighty Days)</td></tr>
+<tr><td>Notes</td><td>Wall-clock time plays a central role in the plot.
+European readers of the 1870s clearly held the U.S. press in
+deep contempt; the protagonists cross the U.S. without once
+reading a paper.
+An on-line French-language version of the book
+"with illustrations from the original 1873 French-language edition"
+is available at
+<a href="http://fourmilab.ch/etexts/www/tdm80j">http://fourmilab.ch/etexts/www/tdm80j</a>
+An on-line English-language translation of the book is available at
+<a href="http://www.literature.org/Works/Jules-Verne/eighty">http://www.literature.org/Works/Jules-Verne/eighty</a></td></tr>
+<tr><td> </td></tr>
+<tr><td>Film</td><td>Bell Science - About Time</td></tr>
+<tr><td>Notes</td><td>The Frank Baxter/Richard Deacon extravaganza
+Information on ordering is available at
+<a href="http://www.videoflicks.com/VF2/1035/1035893.ihtml">http://www.videoflicks.com/VF2/1035/1035893.ihtml</a></td></tr>
+</table>
+<hr />
+<ul>
+<li>
+An episode of "The Adventures of Superman" entitled "The Mysterious
+Cube," first aired 1958-02-24, had Superman convincing the controllers
+of WWV to broadcast time signals five minutes ahead of actual time;
+doing so got a crook trying to beat the statute of limitations to
+emerge a bit too early from the titular enclosure.
+</li>
+<li>
+The 1960s ITC television series "The Prisoner" included an episode
+entitled "The Chimes of Big Ben" in which our protagonist tumbled to
+the fraudulent nature of a Poland-to-England escape upon hearing "Big
+Ben" chiming on Polish local time.
+</li>
+<li>
+The series "Seinfeld" included an episode entitled "The Susie," first
+broadcast 1997-02-13, in which Kramer decides that daylight saving time
+isn't coming fast enough, so he sets his watch ahead an hour.
+</li>
+<li>
+The syndicated comic strip "Dilbert" featured an all-too-rare example of
+time zone humor on 1998-03-14.
+</li>
+<li>
+Surrealist artist Guy Billout's work "Date Line" appeared on page 103
+of the 1999-11 Atlantic Monthly.
+</li>
+<li>
+"Gloom, Gloom, Go Away" by Walter Kirn appeared on page 106 of Time
+Magazine's 2002-11-11 issue; among other things, it proposed
+year-round DST as a way of lessening wintertime despair.
+</li>
+<li>
+The "20 Hours in America" episode of "The West Wing," first aired 2002-09-25,
+saw White House staffers stranded in Indiana; they thought they had time to
+catch Air Force One but were done in by intra-Indiana local time changes.
+</li>
+<li>
+"In what time zone would you find New York City?" was a $200 question on
+the 1999-11-13 United States airing of "Who Wants to Be a Millionaire?"
+"In 1883, what industry led the movement to divide the U.S. into four time
+zones?" was a $32,000 question on the 2001-05-23 United States airing of
+"Who Wants to Be a Millionaire?" At this rate, the million-dollar time-zone
+question should have been asked 2002-06-04.
+</li>
+</ul>
+<hr />
+<ul>
+<li>
+"We're been using the five-cent nickle in this country since 1492.
+Now that's pretty near 100 years, daylight savings [sic]."
+(Groucho Marx as Captain Spaulding in "Animal Crackers", 1930,
+as noted by Will Fitzerald, wfitzgerald@ameritech.net)
+</li>
+<li>
+"Good news."
+"What did they do? Extend Daylight Saving Time year round?"
+(Professional tanner George Hamilton, in dialog from a
+May, 1999 episode of the syndicated television series "Baywatch")
+</li>
+<li>
+"A fundamental belief held by Americans is that if you are on land, you
+cannot be killed by a fish...So most Americans remain on land, believing
+they're safe. Unfortunately, this belief—like so many myths, such as that
+there's a reason for 'Daylight Saving Time'—is false."
+(Dave Barry column, 2000-07-02)
+</li>
+<li>
+"I once had sex for an hour and five minutes, but that was on the day
+when you turn the clocks ahead."
+(Garry Shandling, 52nd Annual Emmys, 2000-09-10)
+</li>
+<li>
+"Would it impress you if I told you I invented Daylight Savings Time?"
+("Sahjhan" to "Lilah" in dialog from the "Loyalty" episode of "Angel,"
+originally aired 2002-02-25)
+</li>
+<li>
+"I thought you said Tulsa was a three hour flight."
+"Well, you're forgetting about the time difference."
+("Chandler" and "Joey" in dialog from the episode of "Friends" first
+aired 2002-12-05)
+</li>
+<li>
+"Is that a pertinent fact,
+or are you trying to dazzle me with your command of time zones?"
+(Kelsey Grammer as "Frasier Crane")
+</li>
+<li>
+"Don't worry about the world coming to an end today.
+It is already tomorrow in Australia."
+(Charles M. Schulz, provided by Steve Summit)
+</li>
+</ul>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="US-ASCII"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<title>Sources for Time Zone and Daylight Saving Time Data</title>
+<link rel="schema.DC" href="http://purl.org/DC/elements/1.1/" />
+<meta http-equiv="Content-type" content='text/html; charset="US-ASCII"' />
+<meta name="DC.Creator" content="Eggert, Paul" />
+<meta name="DC.Contributor" content="Olson, Arthur David" />
+<meta name="DC.Date" content="2004-05-24" />
+<meta name="DC.Description"
+ content="Sources of information about time zones and daylight saving time" />
+<meta name="DC.Identifier" content="http://www.twinsun.com/tz/tz-link.htm" />
+<meta name="Keywords"
+ content="database,daylight saving,DST,time zone,timezone,tz,zoneinfo" />
+</head>
+<body>
+<h1>Sources for Time Zone and Daylight Saving Time Data</h1>
+<address>
+@(#)tz-link.htm 7.42
+</address>
+<p>
+Please send corrections to this web page to the
+<a href="mailto:tz@elsie.nci.nih.gov">time zone mailing list</a>.
+</p>
+<h2>The <code>tz</code> database</h2>
+<p>
+The public-domain time zone database contains code and data
+that represent the history of local time
+for many representative locations around the globe.
+It is updated periodically to reflect changes made by political bodies
+to UTC offsets and daylight-saving rules.
+This database (often called <code>tz</code> or <code>zoneinfo</code>)
+is used by several implementations,
+including
+<a href="http://www.gnu.org/software/libc/">the GNU C Library</a> used in
+<a href="http://www.linux.org/">GNU/Linux</a>,
+<a href="http://www.freebsd.org/">FreeBSD</a>,
+<a href="http://www.netbsd.org/">NetBSD</a>,
+<a href="http://www.openbsd.org/">OpenBSD</a>,
+<a href="http://www.cygwin.com/">Cygwin</a>,
+<a href="http://www.delorie.com/djgpp/">DJGPP</a>,
+<a href="http://www.hp.com/products1/unix/operating/">HP-UX</a>,
+<a href="http://www.sgi.com/developers/technology/irix/">IRIX</a>,
+<a href="http://www.apple.com/macosx/">Mac OS X</a>,
+<a href="http://h71000.www7.hp.com/">OpenVMS</a>,
+<a href="http://wwws.sun.com/software/solaris/">Solaris</a>,
+<a href="http://www.tru64unix.compaq.com/">Tru64</a>, and
+<a href="http://www.sco.com/products/unixware/">UnixWare</a>.</p>
+<p>
+Each location in the database represents a national region where all
+clocks keeping local time have agreed since 1970.
+Locations are identified by continent or ocean and then by the name of
+the location, which is typically the largest city within the region.
+For example, <code>America/New_York</code>
+represents most of the US eastern time zone;
+<code>America/Indianapolis</code> represents most of Indiana, which
+uses eastern time without daylight saving time (DST);
+<code>America/Detroit</code> represents most of Michigan, which uses
+eastern time but with different DST rules in 1975;
+and other entries represent smaller regions like Starke County,
+Kentucky, which switched from central to eastern time in 1991.
+To use the database, set the <code>TZ</code> environment variable to
+the location's full name, e.g., <code>TZ="America/New_York"</code>.</p>
+<p>
+In the <code>tz</code> database's
+<a href="ftp://elsie.nci.nih.gov/pub/">FTP distribution</a>,
+the code is in the file <code>tzcode<var>C</var>.tar.gz</code>,
+where <code><var>C</var></code> is the code's version;
+similarly, the data are in <code>tzdata<var>D</var>.tar.gz</code>,
+where <code><var>D</var></code> is the data's version.
+The following shell commands download
+these files to a GNU/Linux or similar host; see the downloaded
+<code>README</code> file for what to do next.</p>
+<pre style="margin-left: 2em"><code><a href="http://www.gnu.org/software/wget/">wget</a> 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
+<a href="http://www.gnu.org/software/gzip/">gzip</a> -dc tzcode*.tar.gz | <a href="http://www.gnu.org/software/tar/">tar</a> -xf -
+gzip -dc tzdata*.tar.gz | tar -xf -
+</code></pre>
+<p>
+The code lets you compile the <code>tz</code> source files into
+machine-readable binary files, one for each location. It also lets
+you read a <code>tz</code> binary file and interpret time stamps for that
+location.</p>
+<p>
+The data are by no means authoritative. If you find errors, please
+send changes to the <a href="mailto:tz@elsie.nci.nih.gov">time zone
+mailing list</a>. You can also <a
+href="mailto:tz-request@elsie.nci.nih.gov">subscribe</a> to the
+mailing list, retrieve the <a
+href="ftp://elsie.nci.nih.gov/pub/tzarchive.gz">archive of old
+messages</a> (in gzip compressed format), or retrieve <a
+href="ftp://munnari.oz.au/pub/oldtz/">archived older versions of code
+and data</a>.</p>
+<p>
+The Web has several other sources for time zone and daylight saving time data.
+Here are some recent links that may be of interest.
+</p>
+<h2>Web pages using recent versions of the <code>tz</code> database</h2>
+<ul>
+<li><a href="http://twiki.org/cgi-bin/xtra/tzdate">Date and Time Gateway</a>
+is a text-based point-and-click interface to tables of current time
+throughout the world.</li>
+<li>Fancier web interfaces, roughly in ascending order of complexity, include:
+<ul>
+<li><a href="http://www.hilink.com.au/times/">Local Times Around the
+World</a></li>
+<li><a href="http://www.convertit.com/Go/ConvertIt/World_Time/Current_Time.ASP">Current Time in 1000 Places</a></li>
+<li><a href="http://timezoneconverter.com/">Time Zone Converter</a></li>
+</ul></li>
+<li><a href="http://www.holidayfestival.com/">The Worldwide Holiday
+& Festival Site</a> lists DST-related clock changes along with
+holidays.</li>
+<li><a href="http://www.timeanddate.com/worldclock/">The World Clock -
+Time Zones</a>
+is a web interface to a time zone database derived from
+<code>tz</code>'s.</li>
+</ul>
+<h2>Other time zone database formats</h2>
+<ul>
+<li>The <a href="ftp://ftp.rfc-editor.org/in-notes/rfc2445.txt">
+Internet Calendaring and Scheduling Core Object Specification
+(iCalendar)</a> specification published by the <a
+href="http://www.ietf.org/html.charters/calsch-charter.html">IETF
+Calendaring and Scheduling Working Group (calsch)</a> covers time zone
+data; see its VTIMEZONE calendar component.</li>
+<li>The <a
+href="http://lists.w3.org/Archives/Public/www-rdf-calendar/">www-rdf-calendar</a>
+list discusses <a href="http://www.w3.org/RDF/">RDF</a>-based calendar
+and group scheduling systems, and has a <a
+href="http://www.w3.org/2002/12/cal/#tzd">workspace on time zone
+data</a> converted from <code>tz</code>. An earlier <a
+href="http://www.w3.org/2000/01/foo">schema</a> was sketched out by <a
+href="http://www.w3.org/People/Berners-Lee/">Tim Berners-Lee</a>.</li>
+<li><a
+href="http://www.calsch.org/ietf/archives/draft-ietf-calsch-many-xcal-02.txt">XCal</a>
+was a draft <a href="http://www.w3.org/XML/">XML</a> document type
+definition that corresponded to iCalendar.</li>
+</ul>
+<h2>Other <code>tz</code> compilers</h2>
+<ul>
+<li><a href="http://www.dachaplin.dsl.pipex.com/vzic">Vzic iCalendar
+Timezone Converter</a> describes a program Vzic that compiles
+<code>tz</code> source into iCalendar-compatible VTIMEZONE files.
+Vzic is freely
+available under the <a href="http://www.gnu.org/copyleft/gpl.html">GNU
+General Public License (GPL)</a>.</li>
+<li><a
+href="http://search.cpan.org/dist/DateTime-TimeZone/">DateTime::TimeZone</a>
+contains a script <code>parse_olson</code> that compiles
+<code>tz</code> source into <a href="http://www.perl.org/">Perl</a>
+modules. It is part of the Perl <a
+href="http://datetime.perl.org/">DateTime Project</a>, which is freely
+available under both the GPL and the Perl <a
+href="http://www.perl.com/language/misc/Artistic.html">Artistic
+License</a>. DateTime::TimeZone also contains a script
+<code>tests_from_zdump</code> that generates test cases for each clock
+transition in the <code>tz</code> database.</li>
+<li><a href="http://oss.software.ibm.com/icu/">International Components for
+Unicode (ICU)</a> contains a C/C++ library for internationalization that
+has a compiler from <samp>tz</samp> source into an ICU-specific format.
+ICU is freely available under a BSD-style license.</li>
+<li><a href="http://joda-time.sourceforge.net/">Joda Time - Java date
+and time API</a> contains a class
+<code>org.joda.time.tz.ZoneInfoCompiler</code> that compiles
+<code>tz</code> source into a Joda-specific binary format. Joda Time
+is freely available under a BSD-style license.</li>
+</ul>
+<h2>Other <code>tz</code> binary file readers</h2>
+<ul>
+<li>The <a href="http://www.gnu.org/software/libc/">GNU C Library</a>
+has an independent, thread-safe implementation of
+a <code>tz</code> binary file reader.
+This library is freely available under the
+<a href="http://www.gnu.org/copyleft/lesser.html">
+GNU Lesser General Public License (LGPL)</a>,
+and is widely used in GNU/Linux systems.</li>
+<li><a href="http://www.bmsi.com/java/#TZ">ZoneInfo.java</a>
+is a <code>tz</code> binary file reader written in Java.
+It is freely available under the GNU LGPL.</li>
+<li><a href="http://s.keim.free.fr/tz/doc.html">Python time zones</a>
+is a <code>tz</code> binary file reader written in <a
+href="http://www.python.org/">Python</a>. It is freely available
+under a BSD-style license.</li>
+</ul>
+<h2>Other <code>tz</code>-based time zone conversion software</h2>
+<ul>
+<li><a href="http://java.sun.com/">Sun Java</a> releases since 1.4
+contain a copy of a recent <samp>tz</samp> database in a Java-specific
+format.</li>
+<li><a
+href="http://www1.tip.nl/~t876506/AboutTimeZonesHC.html">HyperCard
+time zones calculator</a> is a HyperCard stack.</li>
+<li><a
+href="http://www.cimmyt.org/timezone/">World Time Explorer</a> is a
+Microsoft Windows program.</li>
+</ul>
+<h2>Other time zone databases</h2>
+<ul>
+<li><a href="http://www.astro.com/cgi-bin/atlw3/aq.cgi?lang=e">Atlas Query
+- Astrodienst</a> is Astrodienst's Web version of Shanks's
+excellent time zone history atlases published in both <a
+href="http://astrocom.com/software/pcatlas.php">computer</a> and <a
+href="http://astrocom.com/books/xrefa.php#SHANKS">book</a> form by <a
+href="http://astrocom.com/">Astro Communications Services</a>.</li>
+<li><a href="http://worldtime.com/">WORLDTIME: interactive atlas,
+time info, public holidays</a>
+contains information on local time, sunrise and sunset,
+and public holidays in several hundred cities around the world.</li>
+<li><a href="http://www.worldtimeserver.com/">World Time Server</a>
+is another time zone database.</li>
+<li><a href="http://tycho.usno.navy.mil/tzones.html">World Time Zones</a>
+contains data from the Time Service Department of the US Naval Observatory
+(USNO), used as the source
+for the <code>usno*</code> files in the <code>tz</code> distribution.</li>
+<li><a href="http://www.airportcitycodes.com/aaa/">Airlines, Airplanes
+and Airports</a> lists current standard times for thousands of
+airports around the world. This seems to be derived from
+the <a href="http://www.iata.org/sked/publications/">Standard
+Schedules Information Manual (SSIM)</a> of the
+the <a href="http://www.iata.org/">International Air Transport
+Association</a>,
+which gives current time zone rules for
+all the airports served by commercial aviation.</li>
+</ul>
+<h2>Maps</h2>
+<ul>
+<li>The <a href="http://www.odci.gov/">United States Central
+Intelligence Agency (CIA)</a> publishes a <a
+href="http://www.odci.gov/cia/publications/factbook/reference_maps/pdf/time_zones.pdf">time
+zone map</a>; the
+<a
+href="http://www.lib.utexas.edu/maps/world.html">Perry-Castañeda
+Library Map Collection</a>
+of the University of Texas at Austin has copies of
+recent editions.
+The pictorial quality is good,
+but the maps do not indicate summer time,
+and parts of the data are a few years out of date.</li>
+<li><a href="http://worldtimezone.com/">World timezones map with
+current time</a>
+has several fancy time zone maps; it covers Russia particularly well.
+The maps' pictorial quality is not quite as good as the CIA's
+but the maps are more up to date.</li>
+</ul>
+<h2>Time zone boundaries</h2>
+<ul>
+<li><a href="http://home-4.tiscali.nl/~t876506/Multizones.html">Time
+zone boundaries for multizone countries</a> summarizes legal
+boundaries between time zones within countries.</li>
+<li>Manifold.net's <a
+href="http://www.manifold.net/download/freemaps.html">Free Maps and
+GIS Data</a> includes a Manifold-format map of world time zone
+boundaries distributed under the GPL. The GeoCommunity's <a
+href="http://software.geocomm.com/data/intl_timezones.html">International
+Time Zones</a> publishes the same data in other formats.</li>
+<li>The US Geological Survey's National Atlas of the United States
+publishes the <a href="http://www.nationalatlas.gov/timeznm.html">Time
+Zones of the United States</a> in the public domain.</li>
+<li>The GeoCommunity lists several commercial sources for <a
+href="http://spatialnews.geocomm.com/features/timezones/">International
+Time Zones and Time Zone Data</a>.</li>
+</ul>
+<h2>Civil time concepts and history</h2>
+<ul>
+<li><a href="http://physics.nist.gov/time">A Walk through Time</a>
+surveys the evolution of timekeeping.</li>
+<li><a href="http://webexhibits.org/daylightsaving/">About Daylight
+Saving Time - History, rationale, laws and dates</a>
+is an overall history of DST.</li>
+<li><a href="http://toi.iriti.cnr.it/">The
+Time of Internet</a>
+describes time zones and daylight saving time,
+with diagrams.
+The time zone map is out of date, however.</li>
+<li><a href="http://www.phys.uu.nl/~vgent/idl/idl.htm">A History of
+the International Date Line</a> tells the story of the most important
+time zone boundary.</li>
+<li><a href="http://www.statoids.com/tconcept.html">Basic Time
+Zone Concepts</a> discusses terminological issues behind time zones.</li>
+</ul>
+<h2>National histories of legal time</h2>
+<dl>
+<dt>Australia</dt>
+<dd>The Community Relations Division of the New South Wales (NSW)
+Attorney General's Department maintains a <a
+href="http://www.lawlink.nsw.gov.au/crd.nsf/pages/time2">history of
+daylight saving in NSW</a>.</dd>
+<dt>Austria</dt>
+<dd>The Federal Office of Metrology and Surveying publishes a
+table of <a href="http://www.metrologie.at/pdf/sommerzeit.pdf"
+hreflang="de">daylight saving time in Austria (in German)</a>.</dd>
+<dt>Belgium</dt>
+<dd>The Royal Observatory of Belgium maintains a table of <a
+href="http://www.astro.oma.be/GENERAL/INFO/nli001a.html"
+hreflang="nl">time in Belgium (in Dutch)</a>.</dd>
+<dt>Brazil</dt>
+<dd>The Time Service Department of the National Observatory
+records <a href="http://pcdsh01.on.br/DecHV.html"
+hreflang="pt-BR">Brazil's daylight saving time decrees (in
+Portuguese)</a>.</dd>
+<dt>Canada</dt>
+<dd>The Institute for National Measurement Standards publishes current
+and some older information about <a
+href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/daylight_savings_e.html">Time
+Zones and Daylight Saving Time</a>.</dd>
+<dt>Chile</dt>
+<dd>WebExhibits publishes a <a
+href="http://webexhibits.org/daylightsaving/chile.html"
+hreflang="es">history of official time (in Spanish)</a> originally
+written by the Chilean Hydrographic and Oceanographic Service.</dd>
+<dt>Germany</dt>
+<dd>The National Institute for Science and Technology maintains the <a
+href="http://www.ptb.de/en/org/4/44/441/dars_e.htm">Realisation of
+Legal Time in Germany</a>.</dd>
+<dt>Israel</dt>
+<dd>The Interior Ministry periodically issues <a
+href="ftp://ftp.cs.huji.ac.il/pub/tz/announcements/"
+hreflang="he">announcements (in Hebrew)</a>.</dd>
+<dt>Mexico</dt>
+<dd>The Investigation and Analysis Service of the Mexican Library of
+Congress has published a <a
+href="http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/"
+hreflang="es">history of Mexican local time (in Spanish)</a>.</dd>
+<dt>Malaysia</dt>
+<dd>See Singapore below.</dd>
+<dt>Netherlands</dt>
+<dd><a href="http://www.phys.uu.nl/~vgent/wettijd/wettijd.htm"
+hreflang="nl">Legal time in the Netherlands (in Dutch)</a>
+covers the history of local time in the Netherlands from ancient times.</dd>
+<dt>New Zealand</dt>
+<dd>The Department of Internal Affairs maintains a brief history <a
+href="http://www.dia.govt.nz/diawebsite.nsf/wpg_URL/Resource-material-Information-We-Provide-About-Daylight-Saving">about
+daylight saving</a>. The privately-maintained <a
+href="http://www.astrologyhouse.co.nz/timechanges.htm">Time Changes in
+New Zealand</a> has more details.</dd>
+<dt>Singapore</dt>
+<dd><a
+href="http://www.math.nus.edu.sg/aslaksen/teaching/timezone.html">Why
+is Singapore in the "Wrong" Time Zone?</a> details the
+history of legal time in Singapore and Malaysia.</dd>
+<dt>United Kingdom</dt>
+<dd><a
+href="http://www.srcf.ucam.org/~jsm28/british-time/">History of
+legal time in Britain</a> discusses in detail the country
+with perhaps the best-documented history of clock adjustments.
+The National Physical Laboratory also maintains an <a
+href="http://www.npl.co.uk/time/summer_time_archive.html">archive
+of summer time dates</a>.</dd>
+</dl>
+<h2>Precision timekeeping</h2>
+<ul>
+<li><a
+href="http://literature.agilent.com/litwebbin/purl.cgi?org_id=tmo&pub_id=5965-7984E">The
+Science of Timekeeping</a> is a thorough introduction
+to the theory and practice of precision timekeeping.</li>
+<li><a href="http://www.ntp.org/">NTP: The Network Time Protocol</a>
+discusses how to synchronize clocks of
+Internet hosts.</li>
+<li><a href="http://gauss.gge.unb.ca/GMT.UT.and.the.RGO.txt"
+charset="macintosh">A
+Few Facts Concerning GMT, UT, and the RGO</a>
+answers questions like "What is the difference between GMT and UTC?"</li>
+<li><a
+href="http://www.gb.nrao.edu/~rfisher/Ephemerides/times.html">Astronomical
+Times</a> explains more abstruse astronomical time scales like TT, TCG,
+and TDB.</li>
+<li>The <a href="http://www.iau.org/">IAU</a>'s <a
+href="http://www.iau-sofa.rl.ac.uk/">Standards Of Fundamental
+Astronomy</a> (SOFA) initiative publishes Fortran code for converting
+among time scales like TAI, TDB, TT and UTC.</li>
+<li><a href="http://www.jpl.nasa.gov/basics/bsf2-3.htm">Basics of
+Space Flight - Reference Systems - Time Conventions</a>
+briefly explains interplanetary space flight timekeeping.</li>
+<li><a
+href="http://www.giss.nasa.gov/tools/mars24/help/notes.html">Technical
+Notes on Mars Solar Time as Adopted by the Mars24 Sunclock</a> briefly
+describes Mars Coordinated Time (MTC) and the diverse local time
+scales used by each landed mission on Mars.</li>
+<li><a
+href="http://hpiers.obspm.fr/eop-pc/products/bulletins/bulletins.html">Bulletins
+maintained by the IERS EOP (PC)</a> contains official publications of
+the Earth Orientation Parameters Product Center of the
+International Earth Rotation Service, the committee that decides
+when leap seconds occur.</li>
+<li>The <a
+href="http://www.mail-archive.com/leapsecs@rom.usno.navy.mil/">Leap
+Second Discussion List</a> covers McCarthy and Klepczynski's proposal
+to discontinue leap seconds, published in <a
+href="http://www.gpsworld.com/">GPS World</a> <strong>10</strong>, 11
+(1999-11), 50–57 and discussed further in R. A. Nelson et al.,
+<a href="http://www.cl.cam.ac.uk/~mgk25/time/metrologia-leapsecond.pdf">The
+leap second: its history and possible future</a>,
+<a href="http://www.bipm.fr/metrologia/metrologia.html">Metrologia</a>
+<strong>38</strong> (2001), 509–529.
+<a href="http://www.ucolick.org/~sla/leapsecs/onlinebib.html">The
+Future of Leap Seconds</a> catalogs information about this
+contentious issue.</li>
+</ul>
+<h2>Time notation</h2>
+<ul>
+<li>
+<a href="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">A Summary of
+the International Standard Date and Time Notation</a> is a good
+summary of ISO
+8601:1988 - Data elements and interchange formats - Information interchange
+- Representation of dates and times (which has been superseded by
+<a href="http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=26780">ISO 8601:2000</a>).</li>
+<li>
+Section 3.3 of <a
+href="ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt">Internet RFC 2822</a>
+specifies the time notation used in email and <a
+href="ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt">HTTP</a> headers.</li>
+<li>
+<a href="ftp://ftp.rfc-editor.org/in-notes/rfc3339.txt">Internet RFC
+3339</a> specifies an ISO 8601 profile for use in new Internet
+protocols.</li>
+<li>
+<a href="http://www.exit109.com/~ghealton/y2k/yrexamples.html">The
+Best of Dates, the Worst of Dates</a> covers many problems encountered
+by software developers when handling dates and time stamps.</li>
+<li>
+Alphabetic time zone abbreviations should not be used as unique
+identifiers for UTC offsets as they are ambiguous in practice. For
+example, "EST" denotes 5 hours behind UTC in English-speaking North
+America, but it denotes 10 or 11 hours ahead of UTC in Australia;
+and French-speaking North Americans prefer "HNE" to "EST". For
+compatibility with <a href="http://www.pasc.org/#POSIX">POSIX</a> the
+<code>tz</code> database contains English abbreviations for all time
+stamps but in many cases these are merely inventions of the database
+maintainers.</li>
+</ul>
+<h2>Related indexes</h2>
+<ul>
+<li><a href="tz-art.htm">Time and the Arts</a></li>
+<li><a href="http://dmoz.org/Reference/Time/">Open Directory -
+Reference: Time</a></li>
+<li><a href="http://directory.google.com/Top/Reference/Time/">Google Directory - Reference > Time</a></li>
+<li><a href="http://dir.yahoo.com/Science/Measurements_and_Units/Time/">Yahoo! Science > Measurements and Units > Time</a></li>
+</ul>
+</body>
+</html>
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = zprint
-
-PROJECTVERSION = 2.8
-PROJECT_TYPE = Tool
+Project = zprint
+Install_Dir = /usr/bin
CFILES = zprint.c
+MANPAGES = zprint.1
-OTHERSRCS = Makefile.preamble Makefile Makefile.postamble zprint.1
-
-
-MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
-CODE_GEN_STYLE = DYNAMIC
-MAKEFILE = tool.make
-NEXTSTEP_INSTALLDIR = /usr/bin
-WINDOWS_INSTALLDIR = /Library/Executables
-PDO_UNIX_INSTALLDIR = /usr/bin
-LIBS =
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
-
-
-NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc
-WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc
-PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc
-NEXTSTEP_JAVA_COMPILER = /usr/bin/javac
-WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe
-PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac
-
-include $(MAKEFILEDIR)/platform.make
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/$(MAKEFILE)
-
--include Makefile.postamble
-
--include Makefile.dependencies
+include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+++ /dev/null
-###############################################################################
-# Makefile.postamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile, which is imported after all other makefiles, to
-# override attributes for a project's Makefile environment. This allows you
-# to take advantage of the environment set up by the other Makefiles.
-# You can also define custom rules at the end of this file.
-#
-###############################################################################
-#
-# These variables are exported by the standard makefiles and can be
-# used in any customizations you make. They are *outputs* of
-# the Makefiles and should be used, not set.
-#
-# PRODUCTS: products to install. All of these products will be placed in
-# the directory $(DSTROOT)$(INSTALLDIR)
-# GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
-# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
-# OFILE_DIR: Directory into which .o object files are generated.
-# DERIVED_SRC_DIR: Directory used for all other derived files
-#
-# ALL_CFLAGS: flags to pass when compiling .c files
-# ALL_MFLAGS: flags to pass when compiling .m files
-# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files
-# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files
-# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files
-# ALL_LDFLAGS: flags to pass when linking object files
-# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files
-# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files
-# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files
-# ALL_YFLAGS: flags to pass when processing .y (yacc) files
-# ALL_LFLAGS: flags to pass when processing .l (lex) files
-#
-# NAME: name of application, bundle, subproject, palette, etc.
-# LANGUAGES: langages in which the project is written (default "English")
-# English_RESOURCES: localized resources (e.g. nib's, images) of project
-# GLOBAL_RESOURCES: non-localized resources of project
-#
-# SRCROOT: base directory in which to place the new source files
-# SRCPATH: relative path from SRCROOT to present subdirectory
-#
-# INSTALLDIR: Directory the product will be installed into by 'install' target
-# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget
-# to prefix this with DSTROOT when you use it.
-#
-# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
-#
-###############################################################################
-
-# Some compiler flags can be overridden here for certain build situations.
-#
-# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost)
-# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults
-# to -g)
-# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG)
-# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults
-# to -O)
-# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults
-# to -pg -DPROFILE)
-# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to
-# the include path (defaults to -I.)
-# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
-# passed to ld/libtool (defaults to nothing)
-
-
-# Library and Framework projects only:
-# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked
-# against the framework will run against the correct version even if
-# the current version of the framework changes. You may override this
-# to "" as an alternative to using the DYLD_LIBRARY_PATH during your
-# development cycle, but be sure to restore it before installing.
-
-
-# Ownership and permissions of files installed by 'install' target
-
-#INSTALL_AS_USER = root
- # User/group ownership
-#INSTALL_AS_GROUP = wheel
- # (probably want to set both of these)
-#INSTALL_PERMISSIONS =
- # If set, 'install' chmod's executable to this
-
-
-# Options to strip. Note: -S strips debugging symbols (executables can be stripped
-# down further with -x or, if they load no bundles, with no options at all).
-
-#STRIPFLAGS = -S
-
-
-#########################################################################
-# Put rules to extend the behavior of the standard Makefiles here. Include them in
-# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
-#
-# You should avoid redefining things like "install" or "app", as they are
-# owned by the top-level Makefile API and no context has been set up for where
-# derived files should go.
-#
-
-install-man-page:
- install -d $(DSTROOT)/usr/share/man/man1
- install -c -m 444 zprint.1 $(DSTROOT)/usr/share/man/man1/zprint.1
+++ /dev/null
-###############################################################################
-# Makefile.preamble
-# Copyright 1997, Apple Computer, Inc.
-#
-# Use this makefile for configuring the standard application makefiles
-# associated with ProjectBuilder. It is included before the main makefile.
-# In Makefile.preamble you set attributes for a project, so they are available
-# to the project's makefiles. In contrast, you typically write additional rules or
-# override built-in behavior in the Makefile.postamble.
-#
-# Each directory in a project tree (main project plus subprojects) should
-# have its own Makefile.preamble and Makefile.postamble.
-###############################################################################
-#
-# Before the main makefile is included for this project, you may set:
-#
-# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
-# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
-
-# Compiler/linker flags added to the defaults: The OTHER_* variables will be
-# inherited by all nested sub-projects, but the LOCAL_ versions of the same
-# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
-# Build Attributes inspector if at all possible. To override the default flags
-# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
-# variables below are *inputs* to the build process and distinct from the override
-# settings done (less often) in the Makefile.postamble.
-#
-# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
-# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
-# .cc, .cxx, .C, and .M files. There is no need to respecify the
-# flags in OTHER_MFLAGS, etc.
-# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
-# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
-# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
-# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
-# precompiling header files
-# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
-# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
-# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
-# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
-# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
-
-# These variables provide hooks enabling you to add behavior at almost every
-# stage of the make:
-#
-# BEFORE_PREBUILD: targets to build before installing headers for a subproject
-# AFTER_PREBUILD: targets to build after installing headers for a subproject
-# BEFORE_BUILD_RECURSION: targets to make before building subprojects
-# BEFORE_BUILD: targets to make before a build, but after subprojects
-# AFTER_BUILD: targets to make after a build
-#
-# BEFORE_INSTALL: targets to build before installing the product
-# AFTER_INSTALL: targets to build after installing the product
-# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
-# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
-#
-# BEFORE_INSTALLHDRS: targets to build before installing headers for a
-# subproject
-# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
-# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
-# AFTER_INSTALLSRC: targets to build after installing source for a subproject
-#
-# BEFORE_DEPEND: targets to build before building dependencies for a
-# subproject
-# AFTER_DEPEND: targets to build after building dependencies for a
-# subproject
-#
-# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
-# updated every time the project is built. If NO, the dependency
-# file is only built when the depend target is invoked.
-
-# Framework-related variables:
-# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the framework's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-
-# Library-related variables:
-# PUBLIC_HEADER_DIR: Determines where public exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically. For library projects you should
-# set this to something like /Developer/Headers/$(NAME). Do not set
-# this variable for framework projects unless you do not want the
-# header files included in the framework.
-# PRIVATE_HEADER_DIR: Determines where private exported header files
-# should be installed. Do not include $(DSTROOT) in this value --
-# it is prefixed automatically.
-# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
-# whether the libraries produced are statically linked when they
-# are used or if they are dynamically loadable. This defaults to
-# DYNAMIC.
-# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
-# where to put the library's DLL. This variable defaults to
-# $(INSTALLDIR)/../Executables
-#
-# INSTALL_AS_USER: owner of the intalled products (default root)
-# INSTALL_AS_GROUP: group of the installed products (default wheel)
-# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
-#
-# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
-# passed on the command line to recursive invocations of make. Note that
-# the values in OTHER_*FLAGS are inherited by subprojects automatically --
-# you do not have to (and shouldn't) add OTHER_*FLAGS to
-# OTHER_RECURSIVE_VARIABLES.
-
-# Additional headers to export beyond those in the PB.project:
-# OTHER_PUBLIC_HEADERS
-# OTHER_PROJECT_HEADERS
-# OTHER_PRIVATE_HEADERS
-
-# Additional files for the project's product: <<path relative to proj?>>
-# OTHER_RESOURCES: (non-localized) resources for this project
-# OTHER_OFILES: relocatables to be linked into this project
-# OTHER_LIBS: more libraries to link against
-# OTHER_PRODUCT_DEPENDS: other dependencies of this project
-# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
-# OTHER_GARBAGE: additional files to be removed by `make clean'
-
-# Set this to YES if you don't want a final libtool call for a library/framework.
-# BUILD_OFILES_LIST_ONLY
-
-# To include a version string, project source must exist in a directory named
-# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
-# OTHER_GENERATED_OFILES = $(VERS_OFILE)
-
-# This definition will suppress stripping of debug symbols when an executable
-# is installed. By default it is YES.
-# STRIP_ON_INSTALL = NO
-
-# Uncomment to suppress generation of a KeyValueCoding index when installing
-# frameworks (This index is used by WOB and IB to determine keys available
-# for an object). Set to YES by default.
-# PREINDEX_FRAMEWORK = NO
-
-# Change this definition to install projects somewhere other than the
-# standard locations. NEXT_ROOT defaults to "C:/Apple" on Windows systems
-# and "" on other systems.
-DSTROOT = $(HOME)
-
-AFTER_INSTALL += install-man-page
+++ /dev/null
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- FRAMEWORKS = ();
- OTHER_LINKED = (zprint.c);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble);
- };
- LANGUAGE = English;
- MAKEFILEDIR = "$(MAKEFILEPATH)/pb_makefiles";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- NEXTSTEP_INSTALLDIR = /usr/bin;
- NEXTSTEP_JAVA_COMPILER = /usr/bin/javac;
- NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc;
- PDO_UNIX_BUILDTOOL = /bin/gnumake;
- PDO_UNIX_INSTALLDIR = /usr/bin;
- PDO_UNIX_JAVA_COMPILER = "$(JDKBINDIR)/javac";
- PDO_UNIX_OBJCPLUS_COMPILER = "$(NEXTDEV_BIN)/gcc";
- PROJECTNAME = zprint;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.8;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/Developer/Executables/make;
- WINDOWS_INSTALLDIR = /Library/Executables;
- WINDOWS_JAVA_COMPILER = "$(JDKBINDIR)/javac.exe";
- WINDOWS_OBJCPLUS_COMPILER = "$(DEVDIR)/gcc";
-}