Peter Memishian wrote: > > Roland, here are a few more comments for you. Sorry for the gradual input.
No problem... :-) > General: > > * 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 http://src.opensolaris.org/source/search?q=ROOTLINT64&defs=&refs=&path=+%2Fonnv%2Fonnv-gate+-deleted_files&hist=&project=%2Fonnv) ? Is this an old&&obsolete artifact or still used somewhere in closed/ or somewhere else ? > * 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" ? > 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... > cmd/ast/msgcc/Makefile: > > * 38: Reaching around into libpp/common is not recommended (e.g., > it breaks sparse workspaces). Please have libpp install what > you need into the proto area. Fixed (I moved the two libpp headers into SUNWastdev). > * 58-61: Seems simpler as: > > LDLIBS += -last > msgcpp: LDLIBS += -lpp 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. > * 91-98: With above changes, these lines can be removed. See above... I am not sure whether this is Ok... > lib/libshell/Makefile: > > * 44-46: Merge these lines. Fixed (and I checked&&fixed the same mistake in libast/libdll/libpp/libcmd/etc.). > lib/libshell/Makefile: > > * 93: What uses $(MOBJS)? Nothing... that line is already gone. > 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...)). 2. Only libshell has demo files for now in usr/src/lib/, the other consumers (from which I copied the design) live in usr/src/cmd/ - see http://src.opensolaris.org/source/search?q=ROOTDEMODIRS&defs=&refs=&path=&hist=&project=%2Fonnv I've attached an updated patch as "ksh93_integration_webrev20070514_update002.diff.txt" ... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;) -------------- next part -------------- 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 <gsf at research.att.com>]"\ @@ -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 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,19 +90,17 @@ 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) @@ -110,18 +108,15 @@ 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/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 Index: src/lib/libcmd/Makefile.com =================================================================== --- src/lib/libcmd/Makefile.com (revision 701) +++ src/lib/libcmd/Makefile.com (working copy) @@ -73,14 +73,13 @@ 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 \ 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 - -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/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 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 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) @@ -642,17 +640,18 @@ 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 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 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 ../../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 ../libast/Makefile.astinclude + +install_h: $(ROOTHDRS) + # We don't check these header files because they're owned by AT&T/AST check: