Peter Memishian wrote:
> > > * There's no such thing as ROOTLINT64. Please make sure it gets
> > > removed from any Makefiles (e.g. libshell/amd64/Makefile).
> >
> > Erm... why do most other libraries use this (I've followed the behaviour
> > of other libraries in this case - see
>
> Those are bugs; see 4456822. I'd strongly recommend following the advice
> in README.Makefiles rather than examining existing Makefiles (which are
> often highly erroneous).
Ok...
... fixed.
> > > * Seems like Makefile.astinclude and Makefile.libastl10n belong
> in
> > > usr/src/lib, since they're used by more than libast. (And
> maybe
> > > Makefile.libastl10n should be renamed to Makefile.astmsg?)
> >
> > Uhm... I tried to avoid shattering files all over the place and put the
> > AST-specific Makefile fragemnts into usr/src/lib/libast/ since this is
> > the base library for the rest of the AST stuff..
> > ... Ok: "move&&rename" or "leave the current layout" ?
>
> Ideally, neither. I'd instead prefer something like what we did with
> lib/lvm, where all of the libraries sharing a given Makefile "architecture"
> would exist below lib/ast (e.g., lib/ast/libast, lib/ast/libpp, ...), and
> then the two Makefiles could live under lib/ast/Makefile.ast*. But I'm
> guessing you considered that approach and had an issue with it -- so the
> next best thing would be to have those Makefiles live directly in lib.
The issue is that if OpenSolaris develops an add-on library (which AFAIK
will happen soon for the "open"/"close"/"poll"/etc. builtins (e.g.
compile the code and do a "builtin -f libshell.so poll ; poll --man #
:-) ) and "procsh") and contributes this to upstream - will this library
live under usr/src/lib/ast/, usr/src/lib/ or elsewhere ? AFAIK this is
quickly becoming messy because there are no clear lines if libshell&co.
get tightly integrated with some consumers within OS/Net and still
sync'ed with upstream and/or other projects...
... I'll move the files (see attached patch).
> > > cmd/ast/Makefile
> > >
> > > * 40-42: Who uses the `check', `_msg', and `_dc' targets here?
> >
> > Currently none uses them but the l10n targets are used in the future
> > once we ARC'ed the missing catalog files (welcome to PSARC 2xxx/666
> > "ksh93 Amendments II") ... and since this is a "base" subdir where it's
> > Makefile should only pass-through all targets I copied all relevant
> > targets into the list...
>
> But you're going to have to update the Makefile anyway to handle that,
> since there are no actual `check' `_msg' or `_dc' targets in that
> Makefile. So please just remove them and add them back when you have
> a use for them.
Ok...
... fixed.
> > > * 73-78: Seems like this ROOTAST* business could just be replaced
> > > with `ROOTCMDDIR=$(ROOT)/usr/ast/bin'
> > >
> > > * 81: Change `ASTPROG=' to `PROG='. Then change `$(ASTPROG)' to
> > > `$(PROG)' on line 83 and $(ROOTASTPROG) to $(ROOTCMD) on line
> 84
> >
> > Isn't this an abuse of ROOTCMD ? There is no precedent for such a thing
> > and that's why I copied the current approach from other Makefiles.
>
> As the person who invented ROOTCMD, I assure you it's exactly how I
> intended it to be used ;-)
Ok... I just wanted to be sure that noone is going to skin me alive
later... :-)
... fixed.
> Also, there is precedent -- e.g.,
> cmd-inet/usr.lib/wanboot/Makefile.com, cmd-inet/lib/nwamd/Makefile, ...
Grumpf... I am blind... sorry... ;-(
> > > lib/libshell/Makefile.demo:
> > >
> > > * Seems like the ROOTDEMO* logic is generic, and should be folded
> > > into lib/Makefile.lib.
> >
> > 1. Erm, I avoided "global" changes like that to avoid that we run into
> > trouble with other, parallel changes in the tree (there are other items
> > which could be implemented better _if_ I would feed "safe" to touch more
> > global things... for example OS/Net has "CLOBBERFILES" to clobber
> > files... but it has no "CLOBBERDIRS" to cleanup directories in the
> > "clobber" target etc. (and that's not the only item of things which need
> > IMO cleanup...)).
>
> I understand your concern, but this one seems pretty safe. My worry is
> that someone will cut-and-paste that ROOTDEMO* stuff into something else
> and it will start to spread. I've seen this happen many times and I'd
> like to not repeat that mistake again.
1. I did a small test... problem is that the logic isn't really that
generic.
-- snip --
$(ROOTDEMODIRS) := OWNER = root
$(ROOTDEMODIRS) := GROUP = bin
$(ROOTDEMODIRS) := DIRMODE = 755
.PARALLEL: $(ROOTDEMOFILES)
install: \
$(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
$(ROOTDEMODIRS):
$(INS.dir)
$(ROOTDEMODIRBASE)/%: common/%
$(INS.file)
-- snip --
>From this code only ROOTDEMODIRS is completely generic - the mode
settings in the first three lines may be (AFAIK) subject for custom
values and ROOTDEMODIRBASE depends on the demo source sitting in
"common/". This could be customized by "yet another variable"
("ROOTDEMOSRCDIR", which defaults to "common/") - but at that point I am
wondering whether this is overengineering or not.
2. Is there any recommendation what I should do when the consumer
Makefiles of Makefile.lib do not have any demo files ? If ROOTDEMODIRS,
ROOTDEMOFILES, ROOTDEMODIRBASE aren't defined AFAIK all hell will break
loose - which means we need some kind of "dummy" values. Are there any
recommendations what could be done in such a case (ROOTDEMODIRBASE could
default to $(ROOT)/usr/demo/$(LIBNAME/) but the correct/recommended
dummy value for ROOTDEMODIRS generates some headaches for me (or I am
awake too long today... ;-()) ?
I've attached a new patch as
"ksh93_integration_webrev20070514_update003.diff.txt" (the demo rule
stuff is still obmitted until I figure out how the correct dummy values
could look like...).
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [EMAIL PROTECTED]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)Index: src/pkgdefs/SUNWastdev/prototype_com
===================================================================
--- src/pkgdefs/SUNWastdev/prototype_com (revision 694)
+++ src/pkgdefs/SUNWastdev/prototype_com (working copy)
@@ -52,4 +52,6 @@
f none usr/ast/bin/msgcvt 0555 root bin
f none usr/ast/bin/msggen 0555 root bin
f none usr/ast/bin/msgget 0555 root bin
+f none usr/include/ast/pp.h 644 root bin
+f none usr/include/ast/ppkey.h 644 root bin
f none usr/lib/libpp.so.1 755 root bin
Index: src/cmd/ast/msgcc/Makefile
===================================================================
--- src/cmd/ast/msgcc/Makefile (revision 698)
+++ src/cmd/ast/msgcc/Makefile (working copy)
@@ -35,7 +35,6 @@
CPPFLAGS = \
$(DTEXTDOM) $(DTS_ERRNO) \
-I$(ROOT)/usr/include/ast \
- -I../../../lib/libpp/common \
-D_PACKAGE_ast \
'-DUSAGE_LICENSE=\
"[-author?Glenn Fowler <[EMAIL PROTECTED]>]"\
@@ -55,10 +54,8 @@
# ... about |#pragma prototyped| ...
CERRWARN += -erroff=E_UNRECOGNIZED_PRAGMA_IGNORED
-msgcvt := LDLIBS += -last
-msggen := LDLIBS += -last
-msgget := LDLIBS += -last
-msgcpp := LDLIBS += -lpp -last
+LDLIBS += -last
+msgcpp := LDLIBS += -lpp
msgcc: msgcc.sh
$(RM) msgcc
@@ -71,18 +68,14 @@
chmod a+rx msgcc
# install rules for AST tools/commands
-ROOTAST= $(ROOT)/usr/ast
-ROOTASTBIN= $(ROOTAST)/bin
-ROOTASTPROG= $(ASTPROG:%=$(ROOTASTBIN)/%)
-$(ROOTASTBIN)/%: %
- $(INS.file)
+ROOTCMDDIR=$(ROOT)/usr/ast/bin
# main
-ASTPROG= msgcvt msggen msgget msgcpp msgcc
+PROG= msgcvt msggen msgget msgcpp msgcc
-all: $(ASTPROG)
+all: $(PROG)
-install: all $(ROOTASTPROG)
+install: all $(ROOTCMD)
clean:
Index: src/cmd/ast/Makefile
===================================================================
--- src/cmd/ast/Makefile (revision 698)
+++ src/cmd/ast/Makefile (working copy)
@@ -37,9 +37,6 @@
clean := TARGET = clean
clobber := TARGET = clobber
lint := TARGET = lint
-check := TARGET = check
-_msg := TARGET = _msg
-_dc := TARGET = _dc
.KEEP_STATE:
Index: src/lib/libshell/sparcv9/Makefile
===================================================================
--- src/lib/libshell/sparcv9/Makefile (revision 698)
+++ src/lib/libshell/sparcv9/Makefile (working copy)
@@ -30,4 +30,4 @@
include ../Makefile.com
include ../../Makefile.lib.64
-install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
Index: src/lib/libshell/Makefile.com
===================================================================
--- src/lib/libshell/Makefile.com (revision 701)
+++ src/lib/libshell/Makefile.com (working copy)
@@ -28,7 +28,7 @@
LIBRARY= libshell.a
VERS= .1
-COBJS= \
+OBJECTS= \
bltins/alarm.o \
bltins/cd_pwd.o \
bltins/cflow.o \
@@ -90,38 +90,33 @@
sh/waitevent.o \
sh/xec.o
-OBJECTS= $(COBJS) $(MOBJS)
-
# We are storing the object files into subdirs avoid the
# confusion with having too many object files in the toplevel pics/
# directory (this matches the way how the original AST build system
# deals with this "logistic" issue) - the rules below ensure that
# the destination directory is available.
-COBJDIRS = \
+OBJDIRS = \
bltins \
data \
edit \
sh
-PICSDIRS= $(COBJDIRS:%=pics/%)
+PICSDIRS= $(OBJDIRS:%=pics/%)
mkpicdirs:
@mkdir -p $(PICSDIRS)
-include ../../libast/Makefile.libastl10n
+include ../../Makefile.astmsg
include ../../Makefile.lib
-# mapfile-vers does not live in common/ because this directory
-# is for AST code only
+# mapfile-vers does not live with the sources in in common/ to make
+# automated code updates easier.
MAPFILES= ../mapfile-vers
-MAPOPTS= $(MAPFILES:%=-M %)
-DYNFLAGS += $(MAPOPTS)
# Override this top level flag so the compiler builds in its native
-# C99 mode. This has been enabled to support the math stuff in ksh93.
+# C99+XPG6 mode. This has been enabled to support the math stuff
+# and other features in ksh93.
C99MODE= $(C99_ENABLE) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
-SRCS= $(COBJS:%.o=../common/%.c)
-
LIBS = $(DYNLIB) $(LINTLIB)
# load dll, socket, nsl and secdb libraries on demand
Index: src/lib/libshell/amd64/Makefile
===================================================================
--- src/lib/libshell/amd64/Makefile (revision 698)
+++ src/lib/libshell/amd64/Makefile (working copy)
@@ -30,4 +30,4 @@
include ../Makefile.com
include ../../Makefile.lib.64
-install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
Index: src/lib/libshell/Makefile
===================================================================
--- src/lib/libshell/Makefile (revision 698)
+++ src/lib/libshell/Makefile (working copy)
@@ -41,10 +41,8 @@
.KEEP_STATE:
-all clean clobber install _msg: $(SUBDIRS)
+all clean clobber install lint _msg: $(SUBDIRS)
-lint: $(SUBDIRS)
-
LIBRARY= libshell.a
# definitions for install_h target
@@ -55,7 +53,7 @@
HDRDIR32= $(MACH)/include/ast
HDRDIR64= $(MACH64)/include/ast
-include ../libast/Makefile.astinclude
+include ../Makefile.astinclude
install_h: $(ROOTHDRS)
Index: src/lib/libcmd/Makefile.com
===================================================================
--- src/lib/libcmd/Makefile.com (revision 701)
+++ src/lib/libcmd/Makefile.com (working copy)
@@ -69,18 +69,17 @@
wc.o \
wclib.o
-include ../../libast/Makefile.libastl10n
+include ../../Makefile.astmsg
include ../../Makefile.lib
-# mapfile-vers does not live in common/ because this directory
-# is for AST code only
+# mapfile-vers does not live with the sources in in common/ to make
+# automated code updates easier.
MAPFILES= ../mapfile-vers
-MAPOPTS= $(MAPFILES:%=-M %)
-DYNFLAGS += $(MAPOPTS)
# Override this top level flag so the compiler builds in its native
-# C99 mode. This has been enabled to support the math stuff in ksh93.
+# C99+XPG6 mode. This has been enabled to support the math stuff
+# and other features in ksh93.
C99MODE= $(C99_ENABLE) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
LIBS = $(DYNLIB) $(LINTLIB)
Index: src/lib/libcmd/Makefile
===================================================================
--- src/lib/libcmd/Makefile (revision 698)
+++ src/lib/libcmd/Makefile (working copy)
@@ -41,10 +41,8 @@
.KEEP_STATE:
-all clean clobber install _msg: $(SUBDIRS)
+all clean clobber install lint _msg: $(SUBDIRS)
-lint: $(SUBDIRS)
-
# definitions for install_h target
HDRS= \
cmd.h \
@@ -54,7 +52,7 @@
# the architecture (e.g. "i386", "sparc", ...)
HDRDIR32= $(MACH)/include/ast
HDRDIR64= $(MACH64)/include/ast
-include ../libast/Makefile.astinclude
+include ../Makefile.astinclude
install_h: $(ROOTHDRS)
Index: src/lib/libdll/sparcv9/Makefile
===================================================================
--- src/lib/libdll/sparcv9/Makefile (revision 698)
+++ src/lib/libdll/sparcv9/Makefile (working copy)
@@ -37,4 +37,4 @@
include ../Makefile.com
include ../../Makefile.lib.64
-install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
Index: src/lib/libdll/Makefile.com
===================================================================
--- src/lib/libdll/Makefile.com (revision 701)
+++ src/lib/libdll/Makefile.com (working copy)
@@ -28,7 +28,7 @@
LIBRARY= libdll.a
VERS= .1
-COBJS= \
+OBJECTS= \
dlfcn.o \
dllfind.o \
dlllook.o \
@@ -36,25 +36,19 @@
dllplug.o \
dllscan.o
+include ../../Makefile.astmsg
-OBJECTS= $(COBJS)
-
-include ../../libast/Makefile.libastl10n
-
include ../../Makefile.lib
-# mapfile-vers does not live in common/ because this directory
-# is for AST code only
+# mapfile-vers does not live with the sources in in common/ to make
+# automated code updates easier.
MAPFILES= ../mapfile-vers
-MAPOPTS= $(MAPFILES:%=-M %)
-DYNFLAGS += $(MAPOPTS)
# Override this top level flag so the compiler builds in its native
-# C99 mode. This has been enabled to support the math stuff in ksh93.
+# C99+XPG6 mode. This has been enabled to support the math stuff
+# and other features in ksh93.
C99MODE= $(C99_ENABLE) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
-SRCS= $(COBJS:%.o=../common/%.c)
-
LIBS = $(DYNLIB) $(LINTLIB)
LDLIBS += -last -lc
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
Index: src/lib/libdll/amd64/Makefile
===================================================================
--- src/lib/libdll/amd64/Makefile (revision 698)
+++ src/lib/libdll/amd64/Makefile (working copy)
@@ -37,4 +37,4 @@
include ../Makefile.com
include ../../Makefile.lib.64
-install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
Index: src/lib/libdll/Makefile
===================================================================
--- src/lib/libdll/Makefile (revision 698)
+++ src/lib/libdll/Makefile (working copy)
@@ -41,10 +41,8 @@
.KEEP_STATE:
-all clean clobber install _msg: $(SUBDIRS)
+all clean clobber install lint _msg: $(SUBDIRS)
-lint: $(SUBDIRS)
-
LIBRARY= libdll.a
# definitions for install_h target
@@ -53,7 +51,7 @@
HDRDIR32= $(MACH)/src/lib/libdll
HDRDIR64= $(MACH64)/src/lib/libdll
-include ../libast/Makefile.astinclude
+include ../Makefile.astinclude
install_h: $(ROOTHDRS)
Index: src/lib/libast/Makefile.libastl10n
===================================================================
--- src/lib/libast/Makefile.libastl10n (revision 694)
+++ src/lib/libast/Makefile.libastl10n (working copy)
@@ -1,97 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-#
-# Temporary control building AST l10n catalogs until all build machines
-# have been updated.
-#
-
-# Should we build AST l10n catalogs ?
-# this can be overridden via
-# % export ON_BUILD_AST_L10N_CATALOGS=1 # at build time
-ON_BUILD_AST_L10N_CATALOGS=0
-
-DO_BUILD_AST_CATALOGS_1= $(ON_BUILD_AST_L10N_CATALOGS:0=$(POUND_SIGN))
-DONT_BUILD_AST_CATALOGS_1= $(ON_BUILD_AST_L10N_CATALOGS:1=$(POUND_SIGN))
-DO_BUILD_AST_CATALOGS= $(DO_BUILD_AST_CATALOGS_1:1=)
-DONT_BUILD_AST_CATALOGS= $(DONT_BUILD_AST_CATALOGS_1:0=)
-
-#
-# l10n mesage catalog generation for AST libraries
-#
-
-MSGLIBNAME= $(LIBRARY:.a=)
-ASTMSGCATALOG= $(ROOT)/usr/lib/locale/C/LC_MESSAGES/$(MSGLIBNAME)
-
-# We can't support LD_LIBRARY_PATH/ROOT hacks that attempt to run software
-# out of the proto area.
-$(DO_BUILD_AST_CATALOGS)ASTMSGCC= \
- PATH="$(ROOT)/usr/ast/bin/:/bin:/usr/bin" \
- LD_LIBRARY_PATH="$(ROOT)/usr/lib/$(MACH64):$(ROOT)/usr/lib/" \
- "$(ROOT)/bin/ksh93" "$(ROOT)/usr/ast/bin/msgcc" >>msgcc.out 2>&1
-
-ASTMSGS= $(OBJECTS:%.o=msgs/%.mso)
-
-# cpp defines needed by msgcc
-i386_ASTMSGCCFLAGS= -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR -D__i386
-amd64_ASTMSGCCFLAGS= -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR -D__amd64
-sparc_ASTMSGCCFLAGS= -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR -D__sparc
-sparcv9_ASTMSGCCFLAGS= -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR
-D__sparcv9
-ASTMSGCCFLAGS=$($(TARGETMACH)_ASTMSGCCFLAGS)
-
-msgs/%.mso: ../common/%.c
- @mkdir -p "$$(dirname "$@")" ; \
- print "# Processing file $< to $@" >>msgcc.out ; \
- $(ASTMSGCC) -M-set=ast $(ASTMSGCCFLAGS) $(CFLAGS) $(CPPFLAGS) -c "$<"
-o "$@"
-msgs/%.mso: ../%.c
- @mkdir -p "$$(dirname "$@")" ; \
- print "# Processing file $< to $@" >>msgcc.out ; \
- $(ASTMSGCC) -M-set=ast $(ASTMSGCCFLAGS) $(CFLAGS) $(CPPFLAGS) -c "$<"
-o "$@"
-
-$(MSGLIBNAME).msg: $(ASTMSGS)
- @print "# Processing files $(ASTMSGS) to $@" >>msgcc.out ; \
- $(ASTMSGCC) -M-set=ast $(ASTMSGCCFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@
$(ASTMSGS)
-
-$(ASTMSGCATALOG): $(MSGLIBNAME).msg
- @$(RM) "$(ASTMSGCATALOG)" ; \
- cat "$(MSGLIBNAME).msg" | sed 's/^$$translation msgcc .*//' | gencat
"$@" -
-
-# Main catalog target
-$(DO_BUILD_AST_CATALOGS)_msg: $(ASTMSGCATALOG)
-
-# Create empty catalog file when we do not build it (to avoid that we have to
hack the
-# package database each time we toggle the switch)
-$(DONT_BUILD_AST_CATALOGS)_msg:
-$(DONT_BUILD_AST_CATALOGS) $(RM) $(ASTMSGCATALOG) ; \
- touch $(ASTMSGCATALOG)
-
-# Add message catalogs to the list of files to "clobber"
-CLOBBERFILES += \
- $(ASTMSGS) \
- $(ASTMSGCATALOG) \
- $(MSGLIBNAME).msg \
- msgcc.out
Index: src/lib/libast/sparcv9/Makefile
===================================================================
--- src/lib/libast/sparcv9/Makefile (revision 698)
+++ src/lib/libast/sparcv9/Makefile (working copy)
@@ -35,9 +35,9 @@
ASTPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(GETRELEASEMINOR:sh).sun4"'
# platform-specific sources
-COBJS = \
+OBJECTS = \
sparcv9/src/lib/libast/conftab.o
-COBJDIRS = \
+OBJDIRS = \
sparcv9/src/lib/libast
include ../Makefile.com
@@ -47,4 +47,4 @@
# (and on 32bit it is close to the barrier)
sparcv9_C_PICFLAGS = $(C_BIGPICFLAGS)
-install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
Index: src/lib/libast/Makefile.astinclude
===================================================================
--- src/lib/libast/Makefile.astinclude (revision 694)
+++ src/lib/libast/Makefile.astinclude (working copy)
@@ -1,87 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-# Note: libast headers are generated by the AST build system outside OS/Net
-# (and then copied here) and depend on the architecture (e.g. "i386", "amd64",
-# "sparc", "sparcv9" etc. ...), we later merge them into one unified file
-# (see below)
-
-ROOTHDRDIR= $(ROOT)/usr/include/ast
-
-# Define the symbol used to distinguish between 32bit and 64bit parts of the
-# include file. We cannot use |_LP64| here because not every compiler (like
-# Studio 10/11/12) sets it by default (this doesn't harm because the AST
-# includes are OS- and platform-specific anyway) and we can't rely on the
-# system includes like <sys/isa_defs.h> because "/usr/bin/diff -D<symbol>"
-# adds the "#ifdef <symbol>" before any other content and "injecting" an
-# "#include <sys/isa_defs.h>" will alter the behaviour of the AST code
-# in unpredictable ways (e.g. the resulting code will not longer work).
-# Sun-Bug #6524070 ("RFE: Please set |_LP64| for 64bit platforms by default
-# (like gcc does)") has been filed against the Sun Studio compiler as RFE
-# to set |_LP64| for 64bit targets.
-# (INTEL_BLD is '#' for a Sparc build and SPARC_BLD is '#' for an Intel build)
-$(SPARC_BLD)AST64BITCPPSYMBOL = __sparcv9
-$(INTEL_BLD)AST64BITCPPSYMBOL = __amd64
-
-# We use a custom install sequence here to unify 32bit and 64bit AST includes
-# since we can only ship one set of includes. Therefore we use
-# "/usr/bin/diff -D <64bit>" (and for some exceptions a manual path) to
-# generate an unified version of the include files (and add a boilerplate text
-# which explains the interface stability status).
-# ToDo: Rewrite this in ksh93 to simplify the boilerplate generation
-$(ROOTHDRDIR)/%: $(HDRDIR32)/% $(HDRDIR64)/%
- @mkdir -p tmpastinclude
- @boilerplate="" \
- boilerplate="$${boilerplate}/*\n" \
- boilerplate="$${boilerplate} * BEGIN OpenSolaris section\n" \
- boilerplate="$${boilerplate} * This is an unstable interface; changes
may be made\n" \
- boilerplate="$${boilerplate} * without notice.\n" \
- boilerplate="$${boilerplate} * END OpenSolaris section\n" \
- boilerplate="$${boilerplate} */\n" ; \
- if [ "$(@F)" = "ast_limits.h" -o \
- "$(@F)" = "ast_dirent.h" ] ; then \
- print "# Building (concatenation) $(@F)" ; \
- ( \
- print -n "$${boilerplate}" ; \
- print '#ifndef $(AST64BITCPPSYMBOL)' ; \
- cat "$(HDRDIR32)/$(@F)" ; \
- print '#else /* $(AST64BITCPPSYMBOL) */' ; \
- cat "$(HDRDIR64)/$(@F)" ; \
- print '#endif /* $(AST64BITCPPSYMBOL) */' ; \
- ) >"tmpastinclude/$(@F)" ; \
- else \
- print "# Building (diff) $(@F)" ; \
- ( \
- set +e ; \
- print -n "$${boilerplate}" ; \
- /usr/bin/diff -D $(AST64BITCPPSYMBOL) "$(HDRDIR32)/$(@F)"
"$(HDRDIR64)/$(@F)" ; true ;\
- ) >"tmpastinclude/$(@F)" ; \
- fi
- $(INS) -s -m $(FILEMODE) -f $(@D) "tmpastinclude/$(@F)"
-
-# Add temprary include files to the list of files to "clobber"
-CLOBBERFILES += tmpastinclude/*
Index: src/lib/libast/sparc/Makefile
===================================================================
--- src/lib/libast/sparc/Makefile (revision 698)
+++ src/lib/libast/sparc/Makefile (working copy)
@@ -35,9 +35,9 @@
ASTPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(GETRELEASEMINOR:sh).sun4"'
# platform-specific sources
-COBJS = \
+OBJECTS = \
sparc/src/lib/libast/conftab.o
-COBJDIRS = \
+OBJDIRS = \
sparc/src/lib/libast
include ../Makefile.com
Index: src/lib/libast/i386/Makefile
===================================================================
--- src/lib/libast/i386/Makefile (revision 698)
+++ src/lib/libast/i386/Makefile (working copy)
@@ -35,9 +35,9 @@
ASTPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(GETRELEASEMINOR:sh).i386"'
# platform-specific sources
-COBJS = \
+OBJECTS = \
i386/src/lib/libast/conftab.o
-COBJDIRS = \
+OBJDIRS = \
i386/src/lib/libast
include ../Makefile.com
Index: src/lib/libast/Makefile.com
===================================================================
--- src/lib/libast/Makefile.com (revision 701)
+++ src/lib/libast/Makefile.com (working copy)
@@ -29,7 +29,7 @@
VERS= .1
# platform-independent sources are in common/
-COBJS += \
+OBJECTS += \
common/cdt/dtclose.o \
common/cdt/dtdisc.o \
common/cdt/dtextract.o \
@@ -601,14 +601,12 @@
common/vmalloc/vmtrace.o \
common/vmalloc/vmwalk.o
-OBJECTS= $(COBJS) $(MOBJS)
-
# We are storing the object files into subdirs avoid the
# confusion with having 550+ object files in the toplevel pics/
# directory (this matches the way how the original AST build system
# deals with this "logistic" issue) - the rules below ensure that
# the destination directory is available.
-COBJDIRS += \
+OBJDIRS += \
common/cdt \
common/comp \
common/dir \
@@ -627,7 +625,7 @@
common/uwin \
common/vec \
common/vmalloc
-PICSDIRS= $(COBJDIRS:%=pics/%)
+PICSDIRS= $(OBJDIRS:%=pics/%)
mkpicdirs:
@mkdir -p $(PICSDIRS)
@@ -638,21 +636,22 @@
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
$(POST_PROCESS_O)
-include ../Makefile.libastl10n
+include ../../Makefile.astmsg
include ../../Makefile.lib
-# mapfile-vers does not live in common/ because this directory
-# is for AST code only
+# mapfile-vers does not live with the sources in in common/ to make
+# automated code updates easier.
MAPFILES= ../mapfile-vers
-MAPOPTS= $(MAPFILES:%=-M %)
-DYNFLAGS += $(MAPOPTS)
# Override this top level flag so the compiler builds in its native
-# C99 mode. This has been enabled to support the math stuff in ksh93.
+# C99+XPG6 mode. This has been enabled to support the math stuff
+# and other features in ksh93.
C99MODE= $(C99_ENABLE) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
-SRCS= $(COBJS:%.o=../%.c)
+# special rule because sources live both ../common (normal)
+# and $(TRANSMACH) (generated)
+SRCS= $(OBJECTS:%.o=../%.c)
LIBS = $(DYNLIB) $(LINTLIB)
Index: src/lib/libast/amd64/Makefile
===================================================================
--- src/lib/libast/amd64/Makefile (revision 698)
+++ src/lib/libast/amd64/Makefile (working copy)
@@ -35,9 +35,9 @@
ASTPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(GETRELEASEMINOR:sh).i386"'
# platform-specific sources
-COBJS = \
+OBJECTS = \
amd64/src/lib/libast/conftab.o
-COBJDIRS = \
+OBJDIRS = \
amd64/src/lib/libast
include ../Makefile.com
@@ -47,4 +47,4 @@
# (and on 32bit it is close to the barrier)
amd64_C_PICFLAGS = $(C_BIGPICFLAGS)
-install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
Index: src/lib/libast/Makefile
===================================================================
--- src/lib/libast/Makefile (revision 698)
+++ src/lib/libast/Makefile (working copy)
@@ -41,10 +41,8 @@
.KEEP_STATE:
-all clean clobber install _msg: $(SUBDIRS)
+all clean clobber install lint _msg: $(SUBDIRS)
-lint: $(SUBDIRS)
-
LIBRARY= libast.a
# definitions for install_h target
@@ -146,7 +144,7 @@
HDRDIR32= $(MACH)/include/ast
HDRDIR64= $(MACH64)/include/ast
-include Makefile.astinclude
+include ../Makefile.astinclude
install_h: $(ROOTHDRS)
Index: src/lib/libpp/Makefile.com
===================================================================
--- src/lib/libpp/Makefile.com (revision 701)
+++ src/lib/libpp/Makefile.com (working copy)
@@ -28,7 +28,7 @@
LIBRARY= libpp.a
VERS= .1
-COBJS= \
+OBJECTS= \
ppargs.o \
ppbuiltin.o \
ppcall.o \
@@ -54,24 +54,19 @@
ppsearch.o \
pptrace.o
-OBJECTS= $(COBJS)
+include ../../Makefile.astmsg
-include ../../libast/Makefile.libastl10n
-
include ../../Makefile.lib
-# mapfile-vers does not live in common/ because this directory
-# is for AST code only
+# mapfile-vers does not live with the sources in in common/ to make
+# automated code updates easier.
MAPFILES= ../mapfile-vers
-MAPOPTS= $(MAPFILES:%=-M %)
-DYNFLAGS += $(MAPOPTS)
# Override this top level flag so the compiler builds in its native
-# C99 mode. This has been enabled to support the math stuff in ksh93.
+# C99+XPG6 mode. This has been enabled to support the math stuff
+# and other features in ksh93.
C99MODE= $(C99_ENABLE) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
-SRCS= $(COBJS:%.o=../common/%.c)
-
LIBS = $(DYNLIB) $(LINTLIB)
LDLIBS += -last -lc
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
Index: src/lib/libpp/Makefile
===================================================================
--- src/lib/libpp/Makefile (revision 698)
+++ src/lib/libpp/Makefile (working copy)
@@ -45,8 +45,17 @@
LIBRARY= libpp.a
-install_h:
+# definitions for install_h target
+HDRS= \
+ pp.h \
+ ppkey.h
+HDRDIR32= common
+HDRDIR64= common
+include ../Makefile.astinclude
+
+install_h: $(ROOTHDRS)
+
# We don't check these header files because they're owned by AT&T/AST
check:
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code