# ====================================================================== # # ISOcxx top-level GNUmakefile # # ====================================================================== # ---------------------------------------------------------------------- # Identify the target package: # ---------------------------------------------------------------------- PACKAGE = ISOcxx # ---------------------------------------------------------------------- # Identify the package's (sub)directory structure: # ---------------------------------------------------------------------- PACKAGE_INCLUDE = ISOcxx #SUBDIRS = test # ---------------------------------------------------------------------- # include file products # (these need to be in the tmp area - mustn't write into src tree): # ---------------------------------------------------------------------- CODEGENFILES = $(workdir)ISOcxx.h SRT_PRODUCTS += $(CODEGENFILES) # ---------------------------------------------------------------------- # Connect to other packages: # ---------------------------------------------------------------------- USE_ISOCXX = true include SoftRelTools/standard.mk include SoftRelTools/refresh.mk #debug := $(shell echo CXX = $(CXX) >&2 ) #debug := $(shell echo CPP = $(CPP) >&2 ) #debug := $(shell echo CXXCPP = $(CXXCPP) >&2 ) #debug := $(shell echo CPPFLAGS = $(CPPFLAGS) >&2 ) #debug := $(shell echo CXXFLAGS = $(CXXFLAGS) >&2 ) #debug := $(shell echo LDFLAGS = $(LDFLAGS) >&2 ) #debug := $(shell echo LIBS = $(LIBS) >&2 ) # ---------------------------------------------------------------------- # Identify test programs: # ---------------------------------------------------------------------- iso_tests = $(addprefix ISOcxx/Tests/, \ \ ok.cc \ incnext.cc incalias.cc warning.cc \ bool.cc booluniq.cc \ wchart.cc wchruniq.cc \ casts.cc \ forok.cc forbad.cc \ conditnl.cc \ mutable.cc \ explicit.cc \ nmspace.cc using_ns.cc usingmbr.cc \ nestcls.cc \ template.cc default.cc \ partspec.cc porder.cc \ methspec.cc \ fullspec.cc \ tmpltmpl.cc tmplmbr.cc \ tmplfrnd.cc \ tmplstat.cc tmplinit.cc \ membrfwd.cc nestfwd.cc \ virtovrd.cc \ typename.cc \ covary.cc \ bigenum.cc \ newconst.cc delconst.cc \ absvbase.cc \ pascal.cc \ mbrconst.cc \ wctype.cc \ library.cc oldhdrs.cc \ cmathver.cc cmathstd.cc \ cstdfstd.cc \ abs_int.cc abs_long.cc \ abs_dbl.cc abs_flt.cc abs_ldbl.cc \ div_l_l.cc multibyt.cc cstlbstd.cc \ cstrgstd.cc \ countok.cc countbad.cc \ except.cc fctntry.cc \ placedel.cc \ inf_ldbl.cc \ alloc.cc Naive.hh \ cmf1t.cc mem_fun1.cc \ autoptr.cc \ iosbase.cc iosmanip.cc eof.cc \ iter8or.cc reviter.cc \ allocdeq.cc atdeq.cc \ alloclst.cc splice.cc \ allocvec.cc atvec.cc \ conttque.cc contque.cc defque.cc \ contpriq.cc defpriq.cc comppriq.cc \ conttstk.cc contstk.cc defstk.cc \ compmap.cc allocmap.cc \ compset.cc allocset.cc \ compmmap.cc allocmmp.cc \ compmset.cc allocmst.cc \ defmapal.cc \ bitset.cc \ clearstr.cc \ ll.cc llio.cc \ final.cc \ ) # ---------------------------------------------------------------------- # Identify compliance code headers: # ---------------------------------------------------------------------- iso_hdrs = $(addprefix ISOcxx/, \ \ algorithm bitset complex deque exception \ fstream functional iomanip ios iosfwd \ iostream istream iterator limits list \ locale map memory new numeric \ ostream queue set sstream stack \ stdexcept streambuf string strstream typeinfo \ utility valarray vector \ \ cassert cctype cerrno cfloat ciso646 \ climits clocale cmath csetjmp csignal \ cstdarg cstddef cstdio cstdlib cstring \ ctime cwchar cwctype \ \ assert.h ctype.h errno.h float.h iso646.h \ limits.h locale.h math.h setjmp.h signal.h \ stdarg.h stddef.h stdio.h stdlib.h string.h \ time.h wchar.h wctype.h \ \ _limits \ ) iso_cures = ISOcxx/ISOcxxSyntax.hh ISOcxx/ISOcxxUnsyntax.hh ${iso_hdrs} # ---------------------------------------------------------------------- # Identify package support files: # ---------------------------------------------------------------------- iso_makes = GNUmakefile ISOcxx/ISOcxx.mk util/getdirs.sed util/trivial.cc # ---------------------------------------------------------------------- # Rules to make the package's target include file: # ---------------------------------------------------------------------- ifndef BINLIBS ifdef LOADLIBES BINLIBS = $(LOADLIBES) endif endif $(workdir)ISOcxx.h.in: ISOcxx/ISOcxx.h.in; \ echo Making local copy of prototype, $@; \ cp $< $@; $(workdir)configure: configure .refresh; \ echo Making local copy of configure script; \ cp $< $@; \ chmod +x $@; $(workdir)ISOcxx.h : $(workdir)ISOcxx.h.in \ $(workdir)configure \ ${iso_makes} \ ${iso_tests} \ ${iso_cures}; \ echo "Building local header, $@"; \ if [ $(isocxx_supported) = "no" -o $(CXX) = "g++" -a $(defective_gcc) = "no" ]; then \ cp ISOcxx/ISOcxx.h.nodefects $@; \ else \ cd ${workdir}; \ CPP="$(CPP)" \ CXXCPP="$(CXXCPP)" \ CPPFLAGS="$(isocxx_pre_cppflags) $(isoCPPFLAGS) $(isocxx_post_cppflags)" \ CXX="$(CXX)" \ CXXFLAGS="$(CXXFLAGS) $(CXXCFLAGS)" \ LDFLAGS="" \ LIBS="$(isoLDFLAGS) $(BINLIBS)" \ testdir="${iso_dir}ISOcxx/Tests/" \ hdrpath="${iso_hdrpath}" \ tgtdir="${workdir}../" \ ./configure; \ fi # LDFLAGS="$(LDFLAGS)" \ # LIBS="$(BINLIBS)" \ # ---------------------------------------------------------------------- # Package maintenance rules: # ---------------------------------------------------------------------- ifeq ($(ISOCXX_MAINT),yes) configure: configure.in ${iso_makes} ${iso_tests}; \ echo Building configure script; \ testdir="ISOcxx/Tests/" autoconf; endif # ISOCXX_MAINT # ======================================================================