stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r485859 - in /incubator/stdcxx/trunk: GNUmakefile etc/config/GNUmakefile.bin etc/config/GNUmakefile.lib etc/config/makefile.common etc/config/makefile.rules
Date Mon, 11 Dec 2006 20:36:01 GMT
Author: sebor
Date: Mon Dec 11 12:36:00 2006
New Revision: 485859

URL: http://svn.apache.org/viewvc?view=rev&rev=485859
Log:
2006-12-11  Martin Sebor  <sebor@roguewave.com>

	* GNUmakefile (REPORTFILE): Replaced...
	(CONFIG_H): ...with this variable (intended as a future replacement
	of the current config.h).
	(PREFIX, install): Added new variable and installation target.
	(post): Removed target.
	* GNUmakefile.bin (LOCALE_LIST): Renamed...
	(LOCALES): ...to this.
	(install): New target to install locale utilities and locales.
	* GNUmakefile.lib (LIBLINK): New variable.
	(TARGET): Replaced the use of the variable as a target...
	(LIB, LIBLINK): ...with each of these.
	(install): New target.
	* makefile.common (REGRESS_FILE): Removed unused variable.
	* makefile.rules (REGRESS_FILE, REPORTFILE): Removed.

Modified:
    incubator/stdcxx/trunk/GNUmakefile
    incubator/stdcxx/trunk/etc/config/GNUmakefile.bin
    incubator/stdcxx/trunk/etc/config/GNUmakefile.lib
    incubator/stdcxx/trunk/etc/config/makefile.common
    incubator/stdcxx/trunk/etc/config/makefile.rules

Modified: incubator/stdcxx/trunk/GNUmakefile
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/GNUmakefile?view=diff&rev=485859&r1=485858&r2=485859
==============================================================================
--- incubator/stdcxx/trunk/GNUmakefile (original)
+++ incubator/stdcxx/trunk/GNUmakefile Mon Dec 11 12:36:00 2006
@@ -119,9 +119,10 @@
 #   PICFLAGS  - flags to generate Position Independent Code
 #               for shared libraries
 #
-#   PRELINKFLAGS - flags passed to the prelinker
+#   PREFIX    - the root of the installation directory where the bin/
+#               include/ and lib/ subdirectories will be rooted
 #
-#   REPORTFILE - file containing the results of `make run'
+#   PRELINKFLAGS - flags passed to the prelinker
 #
 #   RUNFLAGS  - default options passed to runall.sh when running executables
 #   RUNOPTS   - additional options to pass to runall.sh (empty by default)
@@ -511,7 +512,7 @@
   PLATFORM := $(subst i686,i86,$(PLATFORM))
   PLATFORM := $(shell echo $(PLATFORM) | tr "[:upper:]" "[:lower:]")
 
-  REPORTFILE = $(CXX)-$(CCVER)-$(PLATFORM)-$(BUILDTYPE)
+  CONFIG_H := $(CXX)-$(CCVER)-$(BUILDTYPE)
 
   # name of the library w/o the prefix and suffix
   # suitable for use by the linker after the -l option
@@ -574,6 +575,7 @@
           && echo "BUILDDIR   = $(buildpath)"            >> $(MAKEFILE_IN)
 \
           && echo "CONFIG     = $$""(TOPDIR)/etc/config/$(CONFIG)"          \
                                                          >> $(MAKEFILE_IN)  \
+          && echo "CONFIG_H   = $(CONFIG_H)"             >> $(MAKEFILE_IN)
 \
           && echo "BUILDTYPE  = $(BUILDTYPE)"            >> $(MAKEFILE_IN)
 \
           && echo "BUILDMODE  = $(BUILDMODE)"            >> $(MAKEFILE_IN)
 \
           && echo "CXX        = $(CXX)"                  >> $(MAKEFILE_IN)
 \
@@ -610,8 +612,6 @@
           && echo "OMIT_TST_SRCS = $(OMIT_TST_SRCS)"     >> $(MAKEFILE_IN)
 \
           && echo "BUILDTAG   = $(BUILDTAG)"             >> $(MAKEFILE_IN)
 \
           && echo "PLATFORM   = $(PLATFORM)"             >> $(MAKEFILE_IN)
 \
-          && echo "REPORTFILE = $(REPORTFILE)$$""(BUILDTAG)"                \
-                                                         >> $(MAKEFILE_IN)  \
           && echo "DEFAULT_SHROBJ = $(DEFAULT_SHROBJ)"   >> $(MAKEFILE_IN)
 \
           && echo "CXX_REPOSITORY = $(CXX_REPOSITORY)"	 >> $(MAKEFILE_IN));
 
@@ -666,64 +666,14 @@
 examples:
 	-@$(MAKE) -C$(EXMDIR)
 
-
-# run all tests and examples, generate result file and post it in a revison
-# control system (unless the variable DRYRUN is non-empty) ; regressions
-# are computed with respect to last posted report (not just any report that's
-# lying around)
-
-# if DRYRUN isn't set, deletes all the executables first so that if a test
-# doesn't compile, old executables aren't run by accident
-# although the target lists no dependencies is does make lib and tries
-# to make (failures are ignored via -k) the tst and exm targets
-
-# make listtarget is stripped of make's diganostic output (the "Entering/
-# Leaving directory" message); tr is used to chop up the long list of files
-# into a bunch of short lines to accomodate SunOS sed that can't handle very
-# long input lines (Output line too long error)
-post:
-	@(trap "rm -rf $(REPORTFILE) post 2" ;                                \
-          log=$(LOGFILE);                                                     \
-          [ "`echo "$$log" | sed -n 's/^ *\/.*/\//p'`" = / ]                  \
-          || log=$(BUILDDIR)/$$log ;                                          \
-          ts0=`date +%T`;                                                     \
-          echo > $$log ; date >> $$log ;                                      \
-          if [ -z "$(DRYRUN)" ] ; then                                        \
-              POST="-p $(TOPDIR)/etc/results/$(REPORTFILE)";                  \
-              export POST;                                                    \
-              $(MAKE) -s -C $(INCDIR) | tee -a $$log ;                        \
-              $(MAKE) cleantarget ;                                           \
-          fi ;                                                                \
-          ts1=`date +%T`;                                                     \
-          echo >> $$log ; date >> $$log ; echo >> $$log ;             
       \
-          $(MAKE) LOGFILE=$$log lib ;                                         \
-          ts2=`date +%T`;                                                     \
-          date >> $$log ;                                                     \
-          $(MAKE) -k LOGFILE=$$log bin tests examples ;                       \
-          echo >> $$log ; date >> $$log ; echo >> $$log ;             
       \
-          [ ! -d post ] && mkdir post;                                        \
-          last=$(TOPDIR)/etc/results/$(REPORTFILE) ;                          \
-          tsts=`$(MAKE) -C $(TSTDIR) listtarget | sed -n "n;p" | tr ' ' '\n'  \
-                | sed "s:^:../tests/:g"`;                                     \
-          ph_tsts=`$(MAKE) -C $(PHTSTDIR) listtarget listsubtests             \
-                | sed -n "n;p" | tr ' ' '\n' | sed "s:^:../plumhall/:g"`;     \
-          exms=`$(MAKE) -C $(EXMDIR) listtarget | sed -n "n;p" | tr ' ' '\n'  \
-                | sed "s:^:../examples/:g"` ;                                 \
-          desc="Sizes: `du -ak lib/$(LIBNAME) | awk '{print $$1}'             \
-                ` KB $(LIBNAME), `du -sk $(BUILDDIR) | awk '{print $$1}'      \
-                ` KB $(BUILDDIR)" ;                                           \
-          ltsts=`$(MAKE) -C$(BUILDDIR)/bin listruntarget |                    \
-                sed -n "n;p" | tr ' ' '\n' | sed "s:^:../bin/:g"`;            \
-          (cd post;                                                           \
-           LD_LIBRARY_PATH=$(LIBDIR):$$LD_LIBRARY_PATH                        \
-           PATH=$(BUILDDIR)/bin:$$PATH                                        \
-           ../run $(RUNFLAGS) -d "$$desc" -X "-C $(CXX)-$(CCVER)" -r $$last   \
-                  -T "$$ts0,$$ts1,$$ts2" --log $$log $$ltsts $$tsts           \
-                  -x $(TOPDIR)/examples $$exms --ph $$ph_tsts $$POST          \
-                  | tee $(REPORTFILE) ) ;                                     \
-          mv post/$(REPORTFILE) $(REPORTFILE) ;                               \
-          rm -r post)
-
+# install library, headers, and utilities
+install:
+	mkdir -p $(PREFIX)
+	$(MAKE) -Clib $@
+	$(MAKE) -Cbin $@
+	mkdir -p $(PREFIX)/include
+	cp include/config.h $(PREFIX)/include
+	cp -Rf $(TOPDIR)/include $(PREFIX)
 
 # try each submakefile
 .DEFAULT:
@@ -737,4 +687,4 @@
 endif   # ($(CURDIR),$(TOPDIR))
 
 
-.PHONY: all builddir lib rwtest bin tests phtst examples post util
+.PHONY: all bin builddir examples install lib phtst post rwtest tests util

Modified: incubator/stdcxx/trunk/etc/config/GNUmakefile.bin
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/GNUmakefile.bin?view=diff&rev=485859&r1=485858&r2=485859
==============================================================================
--- incubator/stdcxx/trunk/etc/config/GNUmakefile.bin (original)
+++ incubator/stdcxx/trunk/etc/config/GNUmakefile.bin Mon Dec 11 12:36:00 2006
@@ -8,7 +8,7 @@
 
 include ../makefile.in
 
-SRCDIRS = $(TOPDIR)/util
+SRCDIRS = $(TOPDIR)/src/util
 
 # include common variables setting for all makefiles
 ONE_REPOSITORY = 1
@@ -25,20 +25,23 @@
 # have to carry the path with them in the rule target.
 VPATH += $(LOCDIR)
 
-# list of locales  to be built; first compose a  full name from gen_list
-# in the form of <locale name>.<codeset> then move the modifier @euro at
-# the end of the name
-LOCALE_LIST := $(shell cat $(NLSDIR)/gen_list |                              \
-                       sed -e s:"^\([^ ]*\) *\([^ ]*\)":"\1\.\2":g           \
-                           -e s:"\([^.]*\)\(.euro\)\([^ ]*\)":"\1\3@euro":g  \
-                      -e s:"\([^.]*\)\(.cyrillic\)\([^ ]*\)":"\1\3@cyrillic":g)
+# list of locales to build
+# first compose a full name from gen_list in the form
+#   <locale name>.<codeset>
+# then move the known modifiers (@euro and @cyrillic) to the end
+# of the name
+LOCALES :=                                                                 \
+    $(shell sed -e s:"^ *\([^ ]*\)  *\([^ ]*\) *":"\1\.\2":g               \
+                -e s:"\([^.]*\)\(.euro\)\([^ ]*\)":"\1\3@euro":g           \
+                -e s:"\([^.]*\)\(.cyrillic\)\([^ ]*\)":"\1\3@cyrillic":g   \
+                $(NLSDIR)/gen_list)
 
 ## Filter from RUNTARGET only the scripts
 RUNTARGET := $(filter %.sh,$(RUNTARGET))
 
 # If empty populate it with the names of the locales databases test scripts
 ifeq ($(RUNTARGET),)
-  RUNTARGET := sanity_test.sh $(patsubst %,%.sh,$(LOCALE_LIST))
+  RUNTARGET := sanity_test.sh $(patsubst %,%.sh,$(LOCALES))
 endif
 
 ifneq ($(CXX_REPOSITORY),)
@@ -83,7 +86,7 @@
 	$(LD) $^ -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$<) $(TEEOPTS)
 
 # build all locales with the localedef utility
-locales: localedef $(LOCALE_LIST)
+locales: localedef $(LOCALES)
 
 # the rule builds the scripts that are run by the runall script
 $(RUNTARGET): $(NLSDIR)/gen_list
@@ -98,8 +101,8 @@
           chmod ug+x $@;)
 
 # the rule presents as dependencies the source files corresponding
-# to that locale; it is run once for each entry in LOCALE_LIST
-$(LOCALE_LIST): $(NLSDIR)/gen_list
+# to that locale; it is run once for each entry in LOCALES
+$(LOCALES): $(NLSDIR)/gen_list
 	@(lname=`echo $@ | sed "s:\([^.]*\)\.\([^@]*\)\(.*\):\1\3:;y:@:.:"`; \
           cname=`echo $@ | sed "s:\([^.]*\)\.\([^@]*\)\(.*\):\2:"`;          \
           echo "./localedef -w -c -f $(NLSDIR)/charmaps/$$cname"             \
@@ -109,7 +112,7 @@
 
 $(DEPENDDIR)/localedb.d: $(DEPENDDIR) $(NLSDIR)/gen_list
 	@(echo "# generated locale dependencies" > $@;                      \
-          for f in $(LOCALE_LIST); do                                       \
+          for f in $(LOCALES); do                                           \
               lname=`echo $$f |                                             \
                 sed "s:\([^.]*\)\.\([^@]*\)\(.*\):\1\3:;y:@:.:"`;           \
               cname=`echo $$f | sed "s:\([^.]*\)\.\([^@]*\)\(.*\):\2:"`;    \
@@ -125,5 +128,18 @@
 # do any directory specific cleanup using the realclean target
 realclean: clean dependclean
 	-rm -rf $(TARGET) 
+
+# compute the names of codesets (codecvt databases) and set
+# the variable only for the install target for efficiency
+install: codesets := \
+    $(sort $(shell echo $(LOCALES) | sed "s/[a-z][a-z_A-Z]*\.\([^ ]*\)/\1/g"))
+
+# create the $(PREFIX)/bin $(PREFIX)/nls directories and install
+# the utilities and locales 
+install: locale localedef $(LOCALES)
+	mkdir -p $(PREFIX)/bin
+	cp locale localedef $(PREFIX)/bin
+	mkdir -p $(PREFIX)/nls
+	cd ../nls && cp -R $(LOCALES) $(codesets) $(PREFIX)/nls
 
 include ../makefile.rules

Modified: incubator/stdcxx/trunk/etc/config/GNUmakefile.lib
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/GNUmakefile.lib?view=diff&rev=485859&r1=485858&r2=485859
==============================================================================
--- incubator/stdcxx/trunk/etc/config/GNUmakefile.lib (original)
+++ incubator/stdcxx/trunk/etc/config/GNUmakefile.lib Mon Dec 11 12:36:00 2006
@@ -10,7 +10,25 @@
 include ../makefile.in
 
 
-TARGET       = $(LIBDIR)/$(LIBNAME)
+# catalog to build and source files to build it from
+CATFILE  := rwstderr.cat
+MSGFILES := rwstderr.msg
+
+# the name of the library to build (and in shared builds,
+# the name of the symbolic link pointing to it, for library
+# versioning)
+LIBLINK := $(LIBNAME)
+
+ifeq ($(findstring shared,$(BUILDMODE)),shared)
+  LIB    := $(LIBLINK).$(LIBVER)
+  TARGET := $(LIB) $(LIBLINK)
+else
+  LIB := $(LIBLINK)
+endif
+
+TARGET += $(CATFILE)
+
+
 SRCDIRS      = $(TOPDIR)/src
 
 # do not compile these sources...
@@ -20,9 +38,6 @@
 ONE_REPOSITORY = 1
 include ../makefile.common
 
-CATFILE      = rwstderr.cat
-MSGFILES     = rwstderr.msg
-
 CXXFLAGS    += $(PICFLAGS)
 LDFLAGS     += $(LDSOFLAGS) $(MAPFLAGS) $(MAPFILE)
 
@@ -48,7 +63,7 @@
 # Cancel implicit rules
 .SUFFIXES:
 
-all:  $(TARGET) $(CATFILE)
+all: $(TARGET)
 
 # do any directory specific cleanup using the realclean target
 realclean: dependclean clean
@@ -60,23 +75,24 @@
   # shared archives are unique to IBM AIX
   # IBM VisualAge/XLC++ on AIX first "preprocesses" object files
   # with -qmkshrobj and then uses `ar' to create a shared archive
-$(TARGET): $(OBJS)
+$(LIB): $(OBJS)
 	@echo "$(CXXPRELINK) -o $(LIBBASE).o" >> $(LOGFILE)
 	$(CXXPRELINK) -o $(LIBBASE).o $(TEEOPTS)
-	@echo "$(AR) $(ARFLAGS) $(LIBNAME) $(LIBBASE).o" >> $(LOGFILE)
-	$(AR) $(ARFLAGS) $(LIBNAME) $(LIBBASE).o $(TEEOPTS)
+	@echo "$(AR) $(ARFLAGS) $@ $(LIBBASE).o" >> $(LOGFILE)
+	$(AR) $(ARFLAGS) $@ $(LIBBASE).o $(TEEOPTS)
   else
-$(TARGET): $(OBJS) $(MAPFILE)
-	@echo "$(LD) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@.$(LIBVER)" >> $(LOGFILE)
-	$(LD) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@.$(LIBVER) $(TEEOPTS)
-	@echo "ln -sf $@.$(LIBVER) $@" >> $(LOGFILE)
-	rm -f $@
-	ln -s $@.$(LIBVER) $@
+$(LIB): $(OBJS) $(MAPFILE)
+	@echo "$(LD) $(LDFLAGS) $< $(LDLIBS) -o $@" >> $(LOGFILE)
+	$(LD) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@ $(TEEOPTS)
   endif   # shared archive
 
+$(LIBLINK): $(LIB)
+	@echo "ln -sf $< $@" >> $(LOGFILE)
+	ln -sf $< $@
+
 else
 
-$(TARGET): $(OBJS)
+$(LIB): $(OBJS)
 	@echo "$(CXXPRELINK)" >> $(LOGFILE)
 	$(CXXPRELINK) $(TEEOPTS)
 	@echo "$(AR) $(ARFLAGS) $(LIBNAME) $(SOBJS)" >> $(LOGFILE)
@@ -84,5 +100,18 @@
 
 endif   # ($(findstring shared,$(BUILDMODE)),shared)
 
+
 # Common rules used by all Makefiles
 include ../makefile.rules
+
+# create the $(PREFIX)/etc/ and $(PREFIX)/lib/ directories
+# and install the library binary and the message catalog(s)
+install: $(TARGET)
+	mkdir -p $(PREFIX)/lib
+	cp $(LIB) $(PREFIX)/lib
+	if [ $(LIBLINK) != $(LIB) ]; then          \
+            rm $(PREFIX)/lib/$(LIBLINK);           \
+            ln -s $(LIB) $(PREFIX)/lib/$(LIBLINK); \
+        fi
+	mkdir -p $(PREFIX)/etc
+	cp $(CATFILE) $(PREFIX)/etc

Modified: incubator/stdcxx/trunk/etc/config/makefile.common
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/makefile.common?view=diff&rev=485859&r1=485858&r2=485859
==============================================================================
--- incubator/stdcxx/trunk/etc/config/makefile.common (original)
+++ incubator/stdcxx/trunk/etc/config/makefile.common Mon Dec 11 12:36:00 2006
@@ -141,20 +141,6 @@
   TEEOPTS = 2>&1 | tee -a $(LOGFILE)
 endif
 
-# determine the name of the results file against which to compute regressions
-REGRESS_FILE := $(shell                                      \
-    if [ -z "$(REGRESS)" ] ; then                            \
-        ls -tr1 ../$(REPORTFILE)* 2> /dev/null | tail -1 ;   \
-    elif [ -f $(REGRESS) ] ; then                            \
-        echo "$(REGRESS)" ;                                  \
-    else                                                     \
-        echo "$(TOPDIR)/results/$(REPORTFILE)" ;             \
-    fi)
-
-ifeq ($(REGRESS_FILE),)
-  REGRESS_FILE = "$(TOPDIR)/results/$(REPORTFILE)"
-endif
-
 # set the RUNTARGET variable to command line args if $RUN isn't set
 ifeq ($(RUN),)
   RUNTARGET := $(filter-out run_all runall run,$(MAKECMDGOALS))

Modified: incubator/stdcxx/trunk/etc/config/makefile.rules
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/makefile.rules?view=diff&rev=485859&r1=485858&r2=485859
==============================================================================
--- incubator/stdcxx/trunk/etc/config/makefile.rules (original)
+++ incubator/stdcxx/trunk/etc/config/makefile.rules Mon Dec 11 12:36:00 2006
@@ -100,11 +100,9 @@
         echo >> $@ ; echo "$$tmp" >> $@ ;                                   \
         chmod +x $@)
 
-# run all tests, collect exit status and report statistics, tee report to
-# a report file, replace last report if same; regressions are computed with
-# respect to the most recent report; the variable RUN can be set to contain
-# a list of executables to run without generating a report (set to ALL to
-# run all executables)
+# run all tests, collect exit status and report statistics; the variable
+# RUN can be set to contain a list of executables to run without generating
+# a report (set to ALL to run all executables)
 # hung or runaway processes are killed after a customizable timeout period
 #
 # PlumHall specific:
@@ -115,14 +113,10 @@
         PATH=$$PATH:.;                                                    \
         TOPDIR=$(TOPDIR);                                                 \
         export LD_LIBRARY_PATH PATH TOPDIR;                               \
-        report=../$(REPORTFILE)-`date +%m.%d.%y-%H:%M`;                   \
         if [ -z "$(RUNTARGET)" ];  then                                   \
-            trap "rm $$report" 2 ;                                        \
-            ./run $(RUNFLAGS) -r $(REGRESS_FILE) | tee $$report;          \
-            diff $(REGRESS_FILE) $$report > /dev/null 2>&1                \
-                  && rm $(REGRESS_FILE);                                  \
+            ./run $(RUNFLAGS)                                             \
         else                                                              \
-            ./run $(RUNFLAGS) -r $(REGRESS_FILE) $(RUNTARGET);            \
+            ./run $(RUNFLAGS) $(RUNTARGET);                               \
         fi ;                                                              \
         exit 0)
 



Mime
View raw message