Ticket #9397: 9397.patch

File 9397.patch, 27.4 KB (added by drkirkby, 3 years ago)

Mercurial patch to sort out the mess of the Singular patches overwriting patches

  • SPKG.txt

    # HG changeset patch
    # User David Kirkby <david.kirkby@onetel.net>
    # Date 1277921565 -3600
    # Node ID bea946f04037205ec5040aa904712ddafe997116
    # Parent  8c725d2c79114d6ad8780d23aac3079fc7c44fda
    #9397 Resolve corrupted patches to permit Singular to build on Solaris x86/x64 (Also allows 64-bit builds)
    
    diff -r 8c725d2c7911 -r bea946f04037 SPKG.txt
    a b  
    4242   investigated as a possible cause later.  
    4343 
    4444== ChangeLog == 
     45 
     46=== singular-3.1.0.4.p8  (David Kirkby, 30th June 2010) === 
     47 * #9397 "Resolve corrupted patches to permit Singular to build on Solaris x86/x64" 
     48   A previous patch made to add a Singular target x86-SunOS has been overwritten  
     49   by a later patch. I resolved these two issues, so the patch contained both changes 
     50   A patch file, and a diff made from it were removed, so the patches directory has two  
     51   less files than before.  
     52 * #9397 Set CC="$CC -m64" and CXX="$CXX-m64" to force the -m64 flag to fully propogate  
     53   thoughtout the Singular build process - otherwise it fails to do so. Setting  
     54   CFALGS/CXXFLAGS is insufficient.  
     55   
    4556=== singular-3.1.0.4.p7  (Mitesh Patel, 8th June 2010) === 
    4657 * #9185: Set an empty MAKEFLAGS variable before "make".  On OS X, at 
    4758   least, this fixes building multiple spkgs in parallel (cf. #8306). 
  • patches/Singular.Makefile.in

    diff -r 8c725d2c7911 -r bea946f04037 patches/Singular.Makefile.in
    a b  
    130130LIBSINGULAR_LIBS = -lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc  -lhtmlhelp 
    131131endif 
    132132 
     133ifeq ($(SINGUNAME),ix86-SunOS) 
     134SO_SUFFIX  = so 
     135LIBSINGULAR_FLAGS = -shared 
     136LIBSINGULAR_LIBS = -lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc 
     137endif 
     138 
    133139# 
    134140# End libSINGULAR 
    135141# 
  • patches/Singular.Makefile.in.diff

    diff -r 8c725d2c7911 -r bea946f04037 patches/Singular.Makefile.in.diff
    a b  
    1 --- ../src/Singular/Makefile.in 2009-05-20 10:44:37.000000000 +0100 
    2 +++ Singular.Makefile.in        2010-01-20 17:30:21.786005118 +0000 
    3 @@ -528,12 +528,18 @@ 
     1--- src/Singular/Makefile.in    Wed May 20 10:44:37 2009 
     2+++ patches/Singular.Makefile.in        Tue Jun 29 23:45:06 2010 
     3@@ -130,6 +130,12 @@ 
     4 LIBSINGULAR_LIBS = -lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc  -lhtmlhelp 
     5 endif 
     6  
     7+ifeq ($(SINGUNAME),ix86-SunOS) 
     8+SO_SUFFIX  = so 
     9+LIBSINGULAR_FLAGS = -shared 
     10+LIBSINGULAR_LIBS = -lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc 
     11+endif 
     12+ 
     13 # 
     14 # End libSINGULAR 
     15 # 
     16@@ -528,13 +534,19 @@ 
    417        ${INSTALL_DATA} `pwd`/LIB/gftables/* ${slibdir}/gftables/ 
    518  
    619 install-libsingular: libsingular 
     
    922          ${INSTALL_PROGRAM}  $$file ${libdir}; \ 
    1023        done 
    1124        ${INSTALL_PROGRAM} libsingular.h ${includedir} 
    12 - 
    13 - 
    1425+       ${INSTALL_PROGRAM} subexpr.h ${includedir}/singular 
    1526+       ${INSTALL_PROGRAM} tok.h ${includedir}/singular 
    1627+       ${INSTALL_PROGRAM} grammar.h ${includedir}/singular 
     
    1930+       ${INSTALL_PROGRAM} lists.h ${includedir}/singular 
    2031+       ${INSTALL_PROGRAM} attrib.h ${includedir}/singular 
    2132  
     33- 
     34- 
    2235 uninstall: uninstallbin 
    2336  
     37 uninstallbin: 
  • deleted file patches/src.Singular.Makefile.in

    diff -r 8c725d2c7911 -r bea946f04037 patches/src.Singular.Makefile.in
    + -  
    1 ################################################################ 
    2 ### 
    3 ### Makefile for Singular 
    4 ### 
    5 ################################################################# 
    6  
    7 SHELL           = /bin/sh 
    8  
    9 ## 
    10 ## version 
    11 ## 
    12 SINGULAR_VERSION        = @SINGULAR_VERSION@ 
    13 SINGULAR                = @SINGULAR@ 
    14 SINGUNAME               = @SINGUNAME@ 
    15 EXEC_EXT                = @EXEC_EXT@ 
    16 HAVE_PLURAL             = @PLURAL@ 
    17 ## 
    18 ## various paths 
    19 ## 
    20 srcdir          = @srcdir@ 
    21 prefix          = @prefix@ 
    22 exec_prefix     = @exec_prefix@ 
    23 libdir          = @libdir@ 
    24 # program executable goes here 
    25 bindir          = @bindir@ 
    26 # includes are taken from here 
    27 includedir      = @includedir@ 
    28 slibdir         = ${prefix}/LIB 
    29 install_bindir  = ${install_prefix}/${SINGUNAME} 
    30 install_slibdir = ${install_prefix}/LIB 
    31  
    32 ## 
    33 ## various programs 
    34 ## 
    35 @SET_MAKE@ 
    36 CC              = @CC@ 
    37 LD              = @LD@ 
    38 CXX             = @CXX@ 
    39 LEX             = sh flexer.sh 
    40  
    41 PERL            = @PERL@ 
    42 BISON           = bison 
    43 INSTALL         = @INSTALL@ 
    44 INSTALL_PROGRAM = @INSTALL_PROGRAM@ 
    45 INSTALL_DATA    = @INSTALL_DATA@ 
    46 MKINSTALLDIRS   = ./mkinstalldirs 
    47 LN_S            = @LN_S@ 
    48  
    49 ## 
    50 ## compiler and linker options 
    51 ## 
    52 PIPE            = @PIPE@ 
    53 CFLAGS          = @CFLAGS@ ${PIPE} 
    54 CXXFLAGS        = @CXXFLAGS@ ${PIPE} 
    55 CXXTEMPLFLAGS   = @CXXTEMPLFLAGS@ 
    56 ifneq ($(SINGUNAME),ix86-Win) 
    57 CPPFLAGS        = -I${srcdir} -I../kernel @CPPFLAGS@ 
    58 else 
    59 ## Dirs after @CPPFLAGS@ are for PySingular 
    60 CPPFLAGS        = -I${srcdir} -I../kernel @CPPFLAGS@  
    61 ## -I/usr/include/python2.4 -I/usr/local/include -I../modules/python 
    62 endif 
    63 DEFS            = -DNDEBUG -DOM_NDEBUG -D@SING_UNAME@ @DEFS@ 
    64 LDFLAGS2        = @LDFLAGS@ 
    65 ifneq ($(SINGUNAME),ix86-Win) 
    66 LDFLAGS         = -L../kernel -lkernel @LDFLAGS@ 
    67 LDFLAGSG        = -L../kernel -lkernel_g @LDFLAGS@ 
    68 LDFLAGSP        = -L../kernel -lkernel_p @LDFLAGS@ 
    69 else 
    70 ## -L/usr/local/lib -L../modules/python --> PySingular 
    71 LDFLAGS         = -L../kernel -L/bin -lkernel @LDFLAGS@ -L/usr/local/lib -L../modules/python 
    72 LDFLAGSG        = -L../kernel -L/bin -lkernel_g @LDFLAGS@ 
    73 LDFLAGSP        = -L../kernel -L/bin -lkernel_p @LDFLAGS@ 
    74 endif 
    75 LD_DYN_FLAGS    = @LD_DYN_FLAGS@ 
    76 SFLAGS          = @SFLAGS@ 
    77 SLDFLAGS        = @SLDFLAGS@ 
    78  
    79 ## For PYSingular 
    80 ifneq ($(SINGUNAME),ix86-Win) 
    81 WIN_LIBS        = 
    82 else 
    83 WIN_LIBS        =  
    84 ##../modules/python/libpython_module.a 
    85 endif 
    86  
    87 LD_LIBC         = -lc 
    88 STATIC_LDFLAGS  = @STATIC_LDFLAGS@ 
    89 # under cygwin, do not explicitly link against -lm, for it is the cygwin 
    90 # lib -- if you really want to do this, use -lm as the _last_ thing on the 
    91 # arguments to link 
    92 ifneq ($(SINGUNAME),ix86-Win) 
    93 LIBS            = -lm @NEED_LIBS@ 
    94 LIBSG           = -lm @NEED_LIBSG@ 
    95 LIBSP           = -lm @NEED_LIBSG@ 
    96 else 
    97 LIBS            = -lsingfac -lsingcf -lntl  -static -lreadline -lhtmlhelp -Xlinker -Bdynamic -lgmp -lomalloc_ndebug -lncurses 
    98 ## -lpython_module -lpython2.4 /usr/local/lib/libboost_python-gcc-d-1_32.dll 
    99 LIBSG           = -lsingfac -lsingcf -lntl  -static -lreadline -lhtmlhelp -Xlinker -Bdynamic -lgmp -lncurses 
    100 endif 
    101 MP_LIBS         = @MP_LIBS@ 
    102 HAVE_MPSR       = @HAVE_MPSR@ 
    103  
    104 # 
    105 # Handle libSINGULAR stuff 
    106 # 
    107 LIBSINGULAR_LIBS =-lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc 
    108  
    109 SO_SUFFIX = so 
    110 #LIBSINGULAR_FLAGS = -export-dynamic  
    111 LIBSINGULAR_LD = $(CXX) 
    112  
    113 # correct suffix for dynamic linking 
    114 ifeq ($(SINGUNAME),ix86Mac-darwin) 
    115 SO_SUFFIX        = dylib 
    116 LIBSINGULAR_FLAGS = -single_module 
    117 LIBSINGULAR_LD = $(LD) 
    118 endif 
    119  
    120 ifeq ($(SINGUNAME),ppcMac-darwin) 
    121 MACOSX_DEPLOYMENT_TARGET=10.4 
    122 SO_SUFFIX        = dylib 
    123 LIBSINGULAR_FLAGS = -single_module 
    124 LIBSINGULAR_LD = $(LD) 
    125 endif 
    126  
    127 ifeq ($(SINGUNAME),ix86-Win) 
    128 SO_SUFFIX = dll 
    129 LIBSINGULAR_FLAGS = -shared 
    130 LIBSINGULAR_LIBS = -lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc  -lhtmlhelp 
    131 endif 
    132  
    133 ifeq ($(SINGUNAME),ix86-SunOS) 
    134 SO_SUFFIX  = so 
    135 LIBSINGULAR_FLAGS = -shared 
    136 LIBSINGULAR_LIBS = -lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc 
    137 endif 
    138  
    139 # 
    140 # End libSINGULAR 
    141 # 
    142  
    143 ifdef LD_STATIC 
    144 LDFLAGS  := ${STATIC_LDFLAGS} ${LDFLAGS} 
    145 SING_EXEC = Singular-static 
    146 LIBS := ${MP_LIBS} ${LIBS} 
    147 LIBSG := ${MP_LIBS} ${LIBSG} 
    148 DL_KERNEL = 
    149 GLIBC_DYN_FIX= 
    150 else 
    151 LDFLAGS  := ${LD_DYN_FLAGS} ${LDFLAGS} 
    152 SING_EXEC = Singular 
    153 DL_KERNEL       = @DL_KERNEL@ 
    154 GLIBC_DYN_FIX= @GLIBC_DYN_FIX@ 
    155 endif 
    156  
    157 # CXXFLAGS =  -g -Wall -Wno-unused 
    158 # CFLAGS =  -g -Wall -Wno-unused 
    159 ## 
    160 ## End configuration dependend stuff 
    161 ################################################################# 
    162  
    163 ### 
    164 ### file sets 
    165 ### 
    166  
    167 # normal C++ source files 
    168 CXXSOURCES=grammar.cc scanner.cc attrib.cc \ 
    169     eigenval_ip.cc\ 
    170     extra.cc fehelp.cc feOpt.cc \ 
    171     ipassign.cc ipconv.cc ipid.cc iplib.cc \ 
    172     ipprint.cc ipshell.cc \ 
    173     lists.cc \ 
    174     sdb.cc \ 
    175     fglm.cc interpolation.cc\ 
    176     silink.cc \ 
    177     subexpr.cc \ 
    178     janet.cc wrapper.cc\ 
    179     libparse.cc sing_win.cc\ 
    180     gms.cc pcv.cc maps_ip.cc\ 
    181     walk.cc walk_ip.cc \ 
    182     cntrlc.cc misc.cc \ 
    183     calcSVD.cc 
    184  
    185 # stuff for MP 
    186 MPSR_SOURCES = mpsr_Put.cc mpsr_PutPoly.cc mpsr_GetPoly.cc mpsr_sl.cc\ 
    187         mpsr_Get.cc mpsr_GetMisc.cc mpsr_Error.cc \ 
    188  
    189  
    190 # stuff for dbm 
    191 DBMSR_SOURCES =  ndbm.cc sing_dbm.cc 
    192  
    193 # normal C source files 
    194 CSOURCES= 
    195  
    196 # C++ sources which are used if part of the kernel are dynamically linked 
    197 DL_KERNEL_SOURCES=slInit_Dynamic.cc  
    198  
    199 # C++ sources which are used for dynamic libraries if part of the kernel is 
    200 # dynamically linked 
    201 DL_LIB_SOURCES=  
    202  
    203 # C++ sources which are used if no parts of the kernel are dynamically linked 
    204 STATIC_SOURCES=slInit_Static.cc 
    205  
    206 # C++ sources for which both, shared and static object files are needed 
    207 COMMON_SOURCES = $(MPSR_SOURCES) $(DBMSR_SOURCES) 
    208  
    209 # special C++ source files (need extra compiling and/or linking), for which 
    210 # dependencies should be generated 
    211 ESOURCES=iparith.cc $(COMMON_SOURCES) \ 
    212         $(DL_KERNEL_SOURCES) $(DL_LIB_SOURCES) $(STATIC_SOURCES)  
    213  
    214 SOURCES=${CSOURCES} ${CXXSOURCES} \ 
    215         grammar.y scanner.l libparse.l \ 
    216         utils.cc utils.h \ 
    217         tesths.cc mpsr_Tok.cc claptmpl.cc  
    218  
    219 HEADERS=lists.h attrib.h \ 
    220         mpsr_Tok.h \ 
    221         ipconv.h \ 
    222         subexpr.h ipid.h \ 
    223         cntrlc.h ipprint.h sdb.h \ 
    224         ipshell.h tok.h \ 
    225         silink.h \ 
    226         sing_dbm.h maps_ip.h interpolation.h \ 
    227         mpsr.h mpsr_sl.h\ 
    228         mpsr_Get.h janet.h\ 
    229         mpsr_Put.h walk.h\ 
    230         dbm_sl.h libparse.h \ 
    231         gms.h pcv.h eigenval_ip.h \ 
    232         distrib.h walk.h \ 
    233         static.h \ 
    234         omSingularConfig.h 
    235  
    236 DISTFILES=${SOURCES} ${HEADERS} ${ESOURCES} \ 
    237         Makefile.in configure.in configure \ 
    238         mod2.h.in grammar.h testgh install-sh mkinstalldirs \ 
    239         check_aso.pl 
    240  
    241 OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) 
    242  
    243 ifeq ($(SINGUNAME),ix86-Win) 
    244 OBJS := $(OBJS) Singular_res.o 
    245 endif 
    246  
    247 P_PROCS_MODULES = FieldZp FieldIndep FieldQ FieldGeneral 
    248  
    249 ifeq ($(DL_KERNEL),1) 
    250 OBJS    := $(OBJS) $(DL_KERNEL_SOURCES:.cc=.o) 
    251 DBMSR_SO= dbmsr.so 
    252 DL_LIBS := $(DBMSR_SO) 
    253 ifeq ($(HAVE_MPSR), 1) 
    254 MPSR_SO =       mpsr.so 
    255 DL_LIBS :=      $(DL_LIBS) $(MPSR_SO) 
    256 endif 
    257 else 
    258 ifndef LD_STATIC 
    259 ifeq ($(HAVE_MPSR), 1) 
    260 LIBS := $(MP_LIBS) $(LIBS) 
    261 LIBSG := $(MP_LIBS) $(LIBSG) 
    262 endif 
    263 endif 
    264 OBJS := $(OBJS) $(STATIC_SOURCES:.cc=.o) $(COMMON_SOURCES:.cc=.o) 
    265 OBJSG := $(OBJSG) $(STATIC_SOURCES:.cc=.og) $(COMMON_SOURCES:.cc=.og) 
    266 DL_LIBS= 
    267 endif 
    268  
    269  
    270 # 
    271 # Singular libraries which go into distribution 
    272 # MAKE SURE THAT THIS IS UP_TO_DATE 
    273 # 
    274 include singular-libs 
    275  
    276 ifdef HAVE_PLURAL 
    277 SLIBS = COPYING ${SLIB0} ${PLIBS} all.lib help.cnf 
    278 else 
    279 SLIBS = COPYING ${SLIB0} all.lib help.cnf 
    280 endif 
    281  
    282 SLIBS_FILES = $(addprefix LIB/,${SLIBS}) 
    283  
    284 GFTABLES = $(wildcard LIB/gftables/[1-9]*) 
    285  
    286 ## 
    287 ## Build Targets 
    288 ## 
    289 .l.cc: 
    290         @if test -r scanner.cc; then \ 
    291                 touch scanner.cc ;\ 
    292         elif test "x${LEX}" = x; then \ 
    293                 echo Error: no lex given, could not rebuilt scanner.cc;\ 
    294                 exit 1; \ 
    295         fi 
    296         ${LEX} -s -I -t $< > scanner.cc.lmp 
    297         cp scanner.cc.lmp scanner.cc 
    298  
    299 .y.cc: 
    300         @if test -r grammar.cc; then \ 
    301                 touch grammar.cc ;\ 
    302         else \ 
    303         if test "x${BISON}" = x; then \ 
    304                 echo Error: no bison given, could not rebuilt grammar.cc;\ 
    305                 exit 1; \ 
    306         fi;\ 
    307         ${BISON} -d -t -o grammar.cc $<;\ 
    308         chmod +x testgh;\ 
    309         ./testgh;\ 
    310         fi 
    311  
    312 .cc.o:   
    313         ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $< 
    314 .c.o: 
    315         ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $< 
    316  
    317 %.dl_o : %.cc 
    318         ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -c $< -o $@ 
    319  
    320 all:    $(SING_EXEC) 
    321  
    322 Singular-static: version.h 
    323         sleep 1 
    324         echo "#define HAVE_STATIC" > static.h 
    325         (cd ../kernel;rm -f mod_raw.o;${MAKE} LD_STATIC=1 depend install-bindist;cd ../Singular) 
    326         ${MAKE} LD_STATIC=1 S_EXT="-static" depend Singular-static 
    327         echo "#undef HAVE_STATIC" > static.h 
    328  
    329 Singular${S_EXT}: mod2.h Makefile version.h $(WIN_LIBS) scanner.cc  ${OBJS} \ 
    330           iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o $(DL_LIBS)  
    331         ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} \ 
    332           -o Singular${S_EXT} \ 
    333           tesths.cc iparith.o mpsr_Tok.o claptmpl.o\ 
    334           ${OBJS} ${LDFLAGS} ${LIBS} ../kernel/mmalloc.o 
    335  
    336 libsingular: mod2.h Makefile version.h $(WIN_LIBS) scanner.cc  ${OBJS} \ 
    337          iparith.o libsingular-tesths.o libparse.cc claptmpl.o mpsr_Tok.o $(DL_LIBS)  
    338         $(LIBSINGULAR_LD) ${SLDFLAGS} ${LIBSINGULAR_FLAGS} -o libsingular.${SO_SUFFIX} \ 
    339         libsingular-tesths.o iparith.o mpsr_Tok.o claptmpl.o \ 
    340         ${OBJS} -lkernel -L../kernel -L../factory -L../libfac -L${libdir} ${LIBSINGULAR_LIBS} 
    341  
    342 libsingular.a: mod2.h Makefile version.h $(WIN_LIBS) scanner.cc  ${OBJS} \ 
    343          iparith.o libsingular-tesths.o libparse.cc claptmpl.o mpsr_Tok.o 
    344         mkdir libsingular.tmp 
    345         (cd  libsingular.tmp; \ 
    346         ar x ../../kernel/libkernel.a; \ 
    347         ar x ../../$(SINGUNAME)/lib/libsingfac.a; \ 
    348         ar x ../../$(SINGUNAME)/lib/libsingcf.a; \ 
    349         ar x ../../$(SINGUNAME)/lib/libsingcf.a; \ 
    350         ar x ../../$(SINGUNAME)/lib/libntl.a; \ 
    351         ar x ../../$(SINGUNAME)/lib/libomalloc_ndebug.a; \ 
    352         cd ..) 
    353         ar cr libsingular.a \ 
    354         iparith.o mpsr_Tok.o claptmpl.o \ 
    355         ${OBJS} libsingular.tmp/*  
    356         rm -rf libsingular.tmp 
    357  
    358 libsingular-tesths.o: tesths.cc 
    359         ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} -DLIBSINGULAR \ 
    360           ${SLDFLAGS} -o libsingular-tesths.o \ 
    361           -c tesths.cc  
    362  
    363 ../modules/python/libpython_module.a: 
    364         cd ../modules/python; scons 
    365  
    366 %.static: version.h 
    367         ${MAKE} DL_KERNEL=0 S_EXT=".static" $@ 
    368  
    369 iparith.o mpsr_Tok.o : iparith.inc mpsr_Tok.inc 
    370  
    371 cntrlc.o cntrlc.og : feOptES.inc feOptTS.inc feOpt.inc 
    372  
    373 claptmpl.o: claptmpl.cc mod2.h 
    374         ${CXX} ${CXXFLAGS}  ${CPPFLAGS} ${DEFS} -c $< 
    375  
    376 iparith.inc mpsr_Tok.inc: claptmpl.o iparith.cc \ 
    377                           ipconv.cc tok.h mpsr_Tok.cc grammar.h mod2.h 
    378         ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} -DGENTABLE \ 
    379              -o gentable claptmpl.o iparith.cc tesths.cc mpsr_Tok.cc \ 
    380              ${OBJS} ${LDFLAGS} ${LIBS} ../kernel/mmalloc.o 
    381         ./gentable 
    382         /bin/rm -f gentable gentable.exe 
    383  
    384  
    385 version.h: ${SOURCES} ${HEADERS} Makefile.in mod2.h.in \ 
    386            configure.in 
    387         echo "#define feVersionId "  `date '+%Y%m%d%H'` >version.h 
    388         echo "#define CC \"" ${CC} ${CFLAGS} ${DEFS}"\"" >>version.h 
    389         echo "#define CXX \"" ${CXX} ${CXXFLAGS} ${DEFS} "\"" >>version.h 
    390  
    391 libparse: libparse_main.o utils.o 
    392         ${CXX}  ${CPPFLAGS} -DSTANDALONE_PARSER -o libparse libparse_main.o utils.o ../kernel/fegetopt.o ${LDFLAGS2} -lomalloc_ndebug 
    393  
    394 libparse_main.o: libparse.cc 
    395         ${CXX} ${CPPFLAGS} -c -o libparse_main.o libparse.cc  -DSTANDALONE_PARSER 
    396  
    397 libparse.cc: libparse.l 
    398         @if test "x${LEX}" = x; then \ 
    399                 echo Error: no lex given, could not rebuilt libparse.cc;\ 
    400                 exit 1; \ 
    401         fi 
    402         ${LEX} -I -Pyylp -t libparse.l >libparse.cc.lmp 
    403         cp libparse.cc.lmp libparse.cc 
    404  
    405 # Hmm compiling with -fomit-frame-pointer resulted in access violation 
    406 # under cygwin 
    407 ESingular: mod2.h feOpt.cc version.h emacs.cc \ 
    408            feOptES.inc 
    409         ${CXX} -O2 ${CPPFLAGS} ${DEFS} -DESINGULAR -DPROTO -o ESingular emacs.cc ../kernel/fegetopt.o \ 
    410         ${LDFLAGS} ${LIBS} ../kernel/mmalloc.o 
    411  
    412 TSingular: mod2.h feOpt.cc version.h emacs.cc \ 
    413            feOptTS.inc 
    414         ${CXX} -O2 ${CPPFLAGS} ${DEFS} -DTSINGULAR -DPROTO -o TSingular emacs.cc ../kernel/fegetopt.o \ 
    415         ${LDFLAGS} ${LIBS} ../kernel/mmalloc.o 
    416  
    417 feOpt.o: feOpt.inc feOptES.inc feOptTS.inc 
    418 extra.o: feOpt.inc 
    419  
    420 feOpt.inc: feOpt.cc mod2.h 
    421         $(CXX) -DGENERATE_OPTION_INDEX -I../kernel feOpt.cc -o feOpt 
    422         ./feOpt 
    423         /bin/rm -f feOpt feOpt.exe 
    424  
    425 feOptES.inc: feOpt.cc mod2.h  
    426         $(CXX) -DGENERATE_OPTION_INDEX  -DESINGULAR -I../kernel feOpt.cc -o feOpt 
    427         ./feOpt 
    428         rm -f feOpt feOpt.exe 
    429  
    430 feOptTS.inc: feOpt.cc mod2.h 
    431         $(CXX) -DGENERATE_OPTION_INDEX  -DTSINGULAR -I../kernel feOpt.cc -o feOpt 
    432         ./feOpt 
    433         rm -f feOpt feOpt.exe 
    434  
    435 mpsr.so: $(MPSR_SOURCES:.cc=.dl_o) 
    436         $(LD) ${SLDFLAGS} -o $@ $^ -L${libdir} ${MP_LIBS} ${GLIBC_DYN_FIX} 
    437  
    438 dbmsr.so: $(DBMSR_SOURCES:.cc=.dl_o) 
    439         $(LD) ${SLDFLAGS} -o $@ $^ ${GLIBC_DYN_FIX} 
    440  
    441 src: scanner.cc grammar.h grammar.cc libparse.cc 
    442  
    443 mod2.h: stamp-h 
    444  
    445 stamp-h : config.status mod2.h.in 
    446         CONFIG_FILES= CONFIG_HEADERS="mod2.h" ./config.status 
    447  
    448 Makefile: Makefile.in config.status 
    449         CONFIG_FILES="Makefile" CONFIG_HEADERS= ./config.status 
    450  
    451 config.status: configure 
    452         ./config.status --recheck 
    453  
    454 configure: configure.in 
    455         @echo "WARNING: You need to rerun autoconf. I am proceeding, for now." 
    456         @touch configure 
    457 #       autoconf 
    458  
    459 ifeq ($(SINGUNAME),ix86-Win) 
    460 ## 
    461 ## windows only targets 
    462 ## 
    463  
    464 ## resources 
    465 Singular.rc: Singular.rc.in config.status 
    466         CONFIG_FILES="Singular.rc" CONFIG_HEADERS= ./config.status 
    467  
    468 ESingular_res.o: Singular.rc 
    469         windres -DESINGULAR -i Singular.rc -o ESingular_res.o 
    470  
    471 TSingular_res.o: Singular.rc 
    472         windres -DTSINGULAR -i Singular.rc -o TSingular_res.o 
    473  
    474 Singular_res.o: Singular.rc 
    475         windres -DSINGULAR -i Singular.rc -o Singular_res.o 
    476  
    477 ## run 
    478 run.o: run.c run.h 
    479         gcc -c -I. -O2 run.c -o run.o 
    480  
    481 runTSingular : run.o TSingular_res.o 
    482         gcc -mwindows run.o TSingular_res.o -o runTSingular.exe 
    483 #       gcc -mwindows -e _mainCRTStartup run.o TSingular_res.o -o runTSingular.exe 
    484  
    485 runESingular : run.o ESingular_res.o 
    486         gcc -mwindows run.o ESingular_res.o -o runESingular.exe 
    487 #       gcc -mwindows -e _mainCRTStartup run.o ESingular_res.o -o runESingular.exe 
    488  
    489 RUN_SINGULARS=runESingular runTSingular 
    490  
    491 endif 
    492  
    493 ## 
    494 ## install targets 
    495 ## 
    496 install: all installbin installslib 
    497  
    498 install-nolns: all installbin-nolns installslib-nolns 
    499  
    500 installbin: ${SING_EXEC} libparse ESingular TSingular ${RUN_SINGULARS} 
    501         ${MKINSTALLDIRS} ${bindir} 
    502         ${INSTALL_PROGRAM} ${SING_EXEC} ${SINGULAR} 
    503         -for file in *.so; do \ 
    504           ${INSTALL_PROGRAM} $$file ${bindir}; \ 
    505         done 
    506         ${INSTALL_PROGRAM} libparse ${RUN_SINGULARS} ${bindir} 
    507         ${INSTALL_PROGRAM} ESingular TSingular ${bindir} 
    508         ${INSTALL_PROGRAM} surfex ${bindir} 
    509         chmod a+x ${SINGULAR} 
    510         rm -f ${bindir}/${SING_EXEC}${EXEC_EXT} 
    511         cd ${bindir}; ${LN_S} ${SINGULAR} Singular${EXEC_EXT}; 
    512  
    513 installbin-nolns: ${SING_EXEC} libparse ESingular TSingular ${RUN_SINGULARS} 
    514         ${MKINSTALLDIRS} ${bindir} 
    515         ${INSTALL_PROGRAM} ${SING_EXEC} ${SINGULAR} 
    516         -for file in *.so; do \ 
    517           ${INSTALL_PROGRAM} $$file ${bindir}; \ 
    518         done 
    519         ${INSTALL_PROGRAM} libparse ${RUN_SINGULARS} ${bindir} 
    520         ${INSTALL_PROGRAM} ESingular TSingular ${DL_LIBS} ${bindir} 
    521         chmod a+x ${SINGULAR} 
    522         rm -f ${bindir}/${SING_EXEC}${EXEC_EXT} 
    523         ${INSTALL_PROGRAM} ${SINGULAR} ${bindir}/Singular${EXEC_EXT}; 
    524  
    525 installslib: LIB 
    526         test -r ${slibdir} || ${LN_S} `pwd`/LIB ${slibdir} 
    527  
    528 installslib-nolns: LIB 
    529         ${MKINSTALLDIRS} ${slibdir} 
    530         for file in `pwd`/LIB/*.lib; do \ 
    531           ${INSTALL_DATA}  $$file ${slibdir}; \ 
    532         done 
    533         ${MKINSTALLDIRS} ${slibdir}/gftables 
    534         ${INSTALL_DATA} `pwd`/LIB/gftables/* ${slibdir}/gftables/ 
    535  
    536 install-libsingular: libsingular 
    537         for file in *.$(SO_SUFFIX); do \ 
    538           ${INSTALL_PROGRAM}  $$file ${libdir}; \ 
    539         done 
    540         ${INSTALL_PROGRAM} libsingular.h ${includedir} 
    541  
    542  
    543  
    544 uninstall: uninstallbin 
    545  
    546 uninstallbin: 
    547         rm -f ${bindir}/Singular${EXEC_EXT}  
    548         rm -f ${SINGULAR} 
    549         -rmdir ${bindir} 
    550  
    551 ## 
    552 ## clean targest 
    553 ## 
    554 mostlyclean:  
    555         -rm -f Singular Singular-static Singularg Singularp libparse feOpt*.inc 
    556         -rm -f *.o *.og core *.op *.so* *.dl_o* 
    557         -rm -f ESingular* TSingular* 
    558  
    559 clean: mostlyclean 
    560         -rm -f *.bak *.d *.dd depend  
    561         -rm -f ${slibdir} 
    562  
    563 distclean: clean 
    564         -rm -f iparith.inc mpsr_Tok.inc stamp.h  
    565         -rm -f Singular* *.gprof *.bprof *~ .\#* version.h 
    566         rm -f plural_cmd.inc 
    567         -rm -f mod2.h Makefile TAGS* tags config.status config.cache config.log 
    568  
    569 srcclean: 
    570         @echo "This command is intended for maintainers to use;" 
    571         @echo "Rebuilding the deleted files requires flex" 
    572         @echo "bison, perl" 
    573         -rm -f scanner.cc grammar.h grammar.cc libparse.cc 
    574  
    575 maintainer-clean: distclean srcclean 
    576         @echo "This command is intended for maintainers to use;" 
    577         @echo "Rebuilding the deleted files requires flex" 
    578         @echo "bison, perl and autoconf" 
    579         -rm configure 
    580  
    581 ## 
    582 ## miscellanous targets 
    583 ## 
    584 LIB/all.lib:    LIB/all.lib.tmpl 
    585         ./make_alllib.sh LIB/all.lib.tmpl ${SLIB0} ${PLIBS} 
    586  
    587 install-bindist: $(HEADERS) $(SOURCES) Makefile depend 
    588         echo "#define MAKE_DISTRIBUTION " > distrib.h 
    589         sleep 1 
    590         ${MAKE} ${SING_EXEC} ESingular TSingular libparse ${RUN_SINGULARS} 
    591         ${MKINSTALLDIRS} ${install_bindir}  
    592         ${INSTALL_PROGRAM} -s  ${SING_EXEC} ${install_bindir}/Singular 
    593         -${INSTALL_PROGRAM} *.so ${install_bindir} 
    594         ${INSTALL_PROGRAM} -s  libparse ${RUN_SINGULARS} ESingular TSingular ${DL_LIBS} ${install_bindir} 
    595         ${INSTALL_PROGRAM} surfex ${install_bindir} 
    596         echo "#undef MAKE_DISTRIBUTION " > distrib.h 
    597  
    598 install-sharedist: ${SLIBS_FILES} LIB/gftables 
    599         ${MKINSTALLDIRS} ${install_slibdir} 
    600         cp ${SLIBS_FILES} ${install_slibdir} 
    601         ${MKINSTALLDIRS} ${install_slibdir}/gftables 
    602         cp ${GFTABLES} ${install_slibdir}/gftables 
    603         ${MKINSTALLDIRS} ${install_slibdir}/surfex 
    604         cp LIB/surfex/surfex.jar ${install_slibdir}/surfex 
    605         chmod -R +rX ${install_slibdir}/* 
    606  
    607 tar: 
    608         tar cf Singular-${SINGULAR_VERSION}-src.tar ${DISTFILES} 
    609         gzip -f Singular-${SINGULAR_VERSION}-src.tar 
    610  
    611 backup: tar 
    612         mcopy -o Singular-${SINGULAR_VERSION}-src.tar.gz a: 
    613  
    614 TAGS:   ${SOURCES} ${ESOURCES} ${HEADERS}  
    615         etags ${SOURCES} ${ESOURCES} ${HEADERS} ../kernel/*.[ch] ../kernel/*.cc ../kernel/*.inc 
    616  
    617  
    618 tags:    
    619         ctags *.y *.[lch] *.cc *.inc ../kernel/*.[ch] ../kernel/*.cc ../kernel/*.inc 
    620  
    621 echoLIBS: 
    622         @echo ${SLIBS} 
    623  
    624 ## 
    625 ## Below here is stuff for developpers 
    626 ################################################################# 
    627  
    628  
    629 ## 
    630 ## .og files for having -O and -g object versions available at the same time 
    631 ## 
    632  
    633 OBJG1 := $(CXXSOURCES:.cc=.og)  
    634 OBJG2 := $(CSOURCES:.c=.og)  
    635  
    636 OBJG=$(OBJG1) $(OBJG2)  
    637  
    638 DL_TAILG=\"sog\" 
    639  
    640  
    641 ifeq ($(DL_KERNEL),1) 
    642  
    643 OBJG := $(OBJG) $(DL_KERNEL_SOURCES:.cc=.og) 
    644 DL_LIBSG := $(MPSR_SO:%.so=%.sog) $(DBMSR_SO:%.so=%.sog) 
    645  
    646 else 
    647  
    648 OBJG := $(OBJG) $(STATIC_SOURCES:.cc=.og) $(COMMON_SOURCES:.cc=.og) 
    649 DL_LIBSG= 
    650  
    651 endif 
    652  
    653  
    654 ## 
    655 ## compiler and linker options for debug version 
    656 ## 
    657  
    658 CCG             = ${CC} 
    659 CXXG            = ${CXX} 
    660 CXXM            = gcc -MM -MG -DGENERATE_DEPEND 
    661 CCM             = gcc -MM -MG -DGENERATE_DEPEND 
    662  
    663 CFLAGSG         = -g -Wall -Wno-unused ${PIPE} 
    664 CXXFLAGSG       = -g -Wall -Wno-unused ${PIPE} 
    665 CXXTEMPLFLAGSG  = -fno-implicit-templates 
    666 DEFSG           = -D@SING_UNAME@ @DEFS@ -DDL_TAIL=$(DL_TAILG) 
    667  
    668 ## 
    669 ## Debug Targets 
    670 ## 
    671  
    672 %.dl_og: %.cc 
    673         ${CXXG} ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} ${SFLAGS} -c $< -o $@ 
    674  
    675 mpsr.sog: $(MPSR_SOURCES:.cc=.dl_og) 
    676         ${CXXG} ${CXXFLAGSG} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS} ${GLIBC_DYN_FIX} 
    677  
    678 dbmsr.sog: $(DBMSR_SOURCES:.cc=.dl_og) 
    679         ${CXXG} ${CXXFLAGSG} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS} 
    680  
    681 claptmpl.og: claptmpl.cc mod2.h 
    682         $(CXXG)  ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ 
    683  
    684 %.og: %.cc 
    685         $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ 
    686  
    687 $(OBJG2) : %.og: %.c 
    688         $(CCG)  ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ 
    689  
    690 Singularg${S_EXT}: scanner.cc  $(OBJG)  $(DL_LIBSG)\ 
    691            iparith.og mpsr_Tok.og claptmpl.og tesths.cc version.h  
    692         (cd ../kernel;make libkernel_g.a;make install;cd ../Singular) 
    693         $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -o Singularg${S_EXT} \ 
    694         tesths.cc iparith.og mpsr_Tok.og claptmpl.og $(OBJG) ${LDFLAGSG} ${LIBSG} -lomalloc ../kernel/mmalloc.og \ 
    695         ${LD_DYN_FLAGS} ${LD_LIBC} 
    696  
    697 iparith.og: iparith.inc iparith.cc 
    698         $(CXXG)  ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -c iparith.cc -o iparith.og 
    699  
    700 mpsr_Tok.og: iparith.inc mpsr_Tok.cc 
    701         $(CXXG) ${CXXFLAGSG} ${CPPFLAGS} ${CXXTEMPLFLAGSG} ${DEFSG} -c mpsr_Tok.cc -o mpsr_Tok.og 
    702  
    703 installg: Singularg 
    704         ${MKINSTALLDIRS} ${bindir} 
    705         ${INSTALL_PROGRAM} Singularg ${bindir}   
    706  
    707 ESingularg: mod2.h feOpt.cc version.h emacs.cc \ 
    708            feOptES.inc 
    709         ${CXXG} ${CXXFLAGSG} ${CPPFLAGS} -DESINGULAR -g ${DEFSG} -o ESingularg emacs.cc ../kernel/fegetopt.og ${LDFLAGS} ${LIBS} -lomalloc ../kernel/mmalloc.og 
    710  
    711 ## 
    712 ## .op files for having -O and -g pg object versions available at the same time 
    713 ## 
    714  
    715 OBJP1 := $(CXXSOURCES:.cc=.op)  
    716 OBJP2 := $(CSOURCES:.c=.op)  
    717  
    718 OBJP=$(OBJP1) $(OBJP2)  
    719  
    720 DL_TAILP=\"sop\" 
    721  
    722  
    723 ifeq ($(DL_KERNEL),1) 
    724  
    725 OBJP := $(OBJP) $(DL_KERNEL_SOURCES:.cc=.op) 
    726 DL_LIBSP := $(MPSR_SO:%.so=%.sop) $(DBMSR_SO:%.so=%.sop) 
    727  
    728 else 
    729  
    730 OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) $(COMMON_SOURCES:.cc=.op) 
    731 DL_LIBSP= 
    732  
    733 endif 
    734  
    735  
    736 ## 
    737 ## compiler and linker options for profiling version 
    738 ## 
    739  
    740 CCP             = ${CC} 
    741 CXXP            = ${CXX} 
    742  
    743 CFLAGSP         = -g -pg -O -Wall -Wno-unused ${PIPE} 
    744 CXXFLAGSG       = -g -pg -O -Wall -Wno-unused ${PIPE} 
    745 CXXTEMPLFLAGSP  = -fno-implicit-templates 
    746 DEFSP           = -D@SING_UNAME@ @DEFS@ -DDL_TAIL=$(DL_TAILP) 
    747  
    748 ## 
    749 ## Profiling Targets 
    750 ## 
    751  
    752 %.dl_op: %.cc 
    753         ${CXXP} ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} ${SFLAGS} -c $< -o $@ 
    754  
    755 mpsr.sop: $(MPSR_SOURCES:.cc=.dl_op) 
    756         ${CXXP} ${CXXFLAGSP} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS} ${GLIBC_DYN_FIX} 
    757  
    758 dbmsr.sop: $(DBMSR_SOURCES:.cc=.dl_op) 
    759         ${CXXP} ${CXXFLAGSP} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS} 
    760  
    761 claptmpl.op: claptmpl.cc mod2.h 
    762         $(CXXP)  ${CXXFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@ 
    763  
    764 %.op: %.cc 
    765         $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@ 
    766  
    767 $(OBJP2) : %.op: %.c 
    768         $(CCP)  ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@ 
    769  
    770 Singularp${S_EXT}: scanner.cc  $(OBJP)  $(DL_LIBSP)\ 
    771            iparith.op mpsr_Tok.op claptmpl.op tesths.cc version.h  
    772         (cd ../kernel;make libkernel_p.a;make install;cd ../Singular) 
    773         $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -o Singularp${S_EXT} \ 
    774         tesths.cc iparith.op mpsr_Tok.op claptmpl.op $(OBJP) ${LDFLAGSP} ${LIBSP} -lomalloc_p ../kernel/mmalloc.op \ 
    775         ${LD_DYN_FLAGS} ${LD_LIBC} 
    776  
    777 iparith.op: iparith.inc iparith.cc 
    778         $(CXXP)  ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -c iparith.cc -o iparith.op 
    779  
    780 mpsr_Tok.op: iparith.inc mpsr_Tok.cc 
    781         $(CXXP) ${CXXFLAGSP} ${CPPFLAGS} ${CXXTEMPLFLAGSP} ${DEFSP} -c mpsr_Tok.cc -o mpsr_Tok.op 
    782  
    783 installp: Singularp 
    784         ${MKINSTALLDIRS} ${bindir} 
    785         ${INSTALL_PROGRAM} Singularp ${bindir}   
    786  
    787 ## 
    788 ## dependencies 
    789 ## 
    790  
    791 %.dd: %.cc mod2.h  
    792         echo $(@:.dd=.og) $(@:.dd=.op) $(@:.dd=.dl_o) $(@:.dd=.dl_og)  $(@:.dd=.dl_op)" " \\ > $@ 
    793         $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@ 
    794  
    795 %.d: %.c mod2.h  
    796         echo $(@:.d=.og) $(@:.d=.op)" " \\ > $@ 
    797         $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@ 
    798  
    799 depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h claptmpl.dd 
    800         -cat *.dd >>depend 
    801  
    802 ifeq (depend,$(wildcard depend)) 
    803 include depend 
    804 endif 
    805  
    806  
  • deleted file patches/src.Singular.Makefile.in.diff

    diff -r 8c725d2c7911 -r bea946f04037 patches/src.Singular.Makefile.in.diff
    + -  
    1 --- ../src/Singular/Makefile.in 2009-05-20 10:44:37.000000000 +0100 
    2 +++ src.Singular.Makefile.in    2009-06-11 11:23:38.000000000 +0100 
    3 @@ -130,6 +130,12 @@ 
    4  LIBSINGULAR_LIBS = -lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc  -lhtmlhelp 
    5  endif 
    6   
    7 +ifeq ($(SINGUNAME),ix86-SunOS) 
    8 +SO_SUFFIX  = so 
    9 +LIBSINGULAR_FLAGS = -shared 
    10 +LIBSINGULAR_LIBS = -lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc 
    11 +endif 
    12 + 
    13  # 
    14  # End libSINGULAR 
    15  # 
  • spkg-install

    diff -r 8c725d2c7911 -r bea946f04037 spkg-install
    a b  
    7878    CXXFLAGS="-O2 -g -m64" 
    7979    CPPFLAGS="-O2 -g -m64" 
    8080    LDFLAGS="-m64 "; export LDFLAGS 
     81    if [ "x`uname`" = xSunOS ] ; then 
     82      CC="$CC -m64" 
     83      export CC 
     84      CXX="$CXX -m64" 
     85      export CXX 
     86    fi 
    8187fi 
    8288 
    8389CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS" 
     
    104110    cp patches/mminit.cc src/kernel/ 
    105111    cp patches/assert.h src/factory/ 
    106112    cp patches/kernel.rmodulon.cc src/kernel/rmodulon.cc 
    107     cp patches/src.Singular.Makefile.in src/Singular/Makefile.in 
    108113    cp patches/Singular.libsingular.h src/Singular/libsingular.h 
    109114    cp patches/factory.GNUmakefile.in src/factory/GNUmakefile.in 
    110115    cp patches/libfac.charset.alg_factor.cc src/libfac/charset/alg_factor.cc