Unnamed Fossil Project

Check-in [cfdcc70d2c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:reorganized file hierarchy, added TMakefile.proj
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:cfdcc70d2c01b3f62fd0fc46966818c715e8348b
User & Date: pooryorick 2012-01-14 06:48:45
Context
2012-01-14
06:59
move TMK_MODULE_PATH config to TMakefile.proj check-in: ed5e22d67a user: pooryorick tags: trunk
06:48
reorganized file hierarchy, added TMakefile.proj check-in: cfdcc70d2c user: pooryorick tags: trunk
2012-01-13
06:03
changed NAME to PACKAGE in init.tmk check-in: e53447a50e user: pooryorick tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to INSTALL.

12
13
14
15
16
17
18
19





Build Configuration

	to build for multiple architectures, each in its own subdirectory, comment
	out the following line in tmk/init.tmk:

		#config set ARCH build
		











|
>
>
>
>
12
13
14
15
16
17
18
19
20
21
22
23

Build Configuration

	to build for multiple architectures, each in its own subdirectory, comment
	out the following line in tmk/init.tmk:

		#config set ARCH build

	redirecting I/O through TCL:

		tmk -D USE_STDIOCTCL_REDEFINE ...
		

Added TMakefile.proj.







































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /bin/env tclsh

#/*************************************************************************/
#/*									 */
#/*  Copyright 2010 Rulequest Research Pty Ltd.				 */
#/*  Copyright 2011 Nathan Coulter and others				 */
#/*									 */
#/*  This file is part of C5.0 GPL Edition, a single-threaded version	 */
#/*  of C5.0 release 2.07.						 */
#/*									 */
#/*  C5.0 GPL Edition is free software: you can redistribute it and/or	 */
#/*  modify it under the terms of the GNU General Public License as	 */
#/*  published by the Free Software Foundation, either version 3 of the	 */
#/*  License, or (at your option) any later version.			 */
#/*									 */
#/*  C5.0 GPL Edition is distributed in the hope that it will be useful,	 */
#/*  but WITHOUT ANY WARRANTY; without even the implied warranty of	 */
#/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU	 */
#/*  General Public License for more details.				 */
#/*									 */
#/*  You should have received a copy of the GNU General Public License	 */
#/*  (gpl.txt) along with C5.0 GPL Edition.  If not, see 		 */
#/*									 */
#/*      <http://www.gnu.org/licenses/>.					 */
#/*									 */
#/*************************************************************************/

set_ifndef ::PACKAGE cfive
set_ifndef ::VERSION 0

config set ::ARCH build

module am_env
module am

Name change from TMakefile to cfive/TMakefile.

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
...
103
104
105
106
107
108
109

110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#/*      <http://www.gnu.org/licenses/>.					 */
#/*									 */
#/*************************************************************************/

if {![info exists env(TMK_MODULE_PATH)]} {
	set env(TMK_MODULE_PATH) [list]
}
set env(TMK_MODULE_PATH) [concat [file join $PROJDIR tmk] \
	$env(TMK_MODULE_PATH) ]

module init
module c
module tcl
module tmkutil

package require struct::list

source [file join $PROJDIR tmk init.tmk ]

subdir [list tests]

set sources [list \
	global.c\
   main.c\
	construct.c\
	formtree.c\
................................................................................
set sources_objects [struct::list mapfor item $sources {
	regsub {.c$} $item .o
}]
set c::DETECT_EXE 0
set link::MAKE_LIB 0
set link::MAKE_SHLIB 0
lappend link::SYSLIBS stdioctcl
lappend c::FLAGS -I$PROJDIR 
if [info exists USE_STDIOCTCL_REDEFINE] {
	lappend c::FLAGS -DUSE_STDIOCTCL_REDEFINE
	#lappend c::FLAGS -E
}

lappend link::PROGRAMS cfive 
lappend link::PROGRAMS report

lappend link::OPTIONS lib_in_lib
link::make_exe report report.o

lappend binPROGRAMS cfive report xval
lappend HEADERS cfive.h
lappend LIBRARIES libcfive.so

build {cfive report libcfive.so}

#this makes the real libcfive.so target
link::make_shlib libcfive.so c50gt.o 
................................................................................
#better to have a no-op target
#lappend EXCLUDE {*}$sources
target $sources_objects {} {
	#prevent per-file compilation of *.c files (using c50gt.c instead)
}

target c50gt.c [list {*}$sources] {

	echocmd exec cat defns.i {*}$sources | egrep -v defns.i|extern.i >$TARGET
}

#this makes c50gt.o target, which must be explicit because c50gt.c is generated
::c::make_obj c50gt.c 

#this makes the real c50 target
link::make_exe cfive c50.o
depend cfive libcfive.so
exception cfive {::link::FLAGS ::link::LIBPATH ::link::SYSLIBS} {
	#TODO: modify tmk so that build-time library directories don't end up in
	#rpath
	set link::LIBPATH [linsert $::link::LIBPATH 0 \
		[file join $PROJDIR [file dirname $TARGET]]]
	set link::SYSLIBS [linsert $::link::SYSLIBS 0 cfive]
}

target check cfive {}








|


<






<
<







 







|











|







 







>
|












|



|
<
24
25
26
27
28
29
30
31
32
33

34
35
36
37
38
39


40
41
42
43
44
45
46
..
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

#/*      <http://www.gnu.org/licenses/>.					 */
#/*									 */
#/*************************************************************************/

if {![info exists env(TMK_MODULE_PATH)]} {
	set env(TMK_MODULE_PATH) [list]
}
set env(TMK_MODULE_PATH) [concat [file join $PROJROOT tmk] \
	$env(TMK_MODULE_PATH) ]


module c
module tcl
module tmkutil

package require struct::list



subdir [list tests]

set sources [list \
	global.c\
   main.c\
	construct.c\
	formtree.c\
................................................................................
set sources_objects [struct::list mapfor item $sources {
	regsub {.c$} $item .o
}]
set c::DETECT_EXE 0
set link::MAKE_LIB 0
set link::MAKE_SHLIB 0
lappend link::SYSLIBS stdioctcl
lappend c::FLAGS -I[file join $PROJROOT $SUBDIR]
if [info exists USE_STDIOCTCL_REDEFINE] {
	lappend c::FLAGS -DUSE_STDIOCTCL_REDEFINE
	#lappend c::FLAGS -E
}

lappend link::PROGRAMS cfive 
lappend link::PROGRAMS report

lappend link::OPTIONS lib_in_lib
link::make_exe report report.o

lappend bin_PROGRAMS cfive report xval
lappend HEADERS cfive.h
lappend LIBRARIES libcfive.so

build {cfive report libcfive.so}

#this makes the real libcfive.so target
link::make_shlib libcfive.so c50gt.o 
................................................................................
#better to have a no-op target
#lappend EXCLUDE {*}$sources
target $sources_objects {} {
	#prevent per-file compilation of *.c files (using c50gt.c instead)
}

target c50gt.c [list {*}$sources] {
	echocmd exec cat defns.i text.i {*}$sources | \
		egrep -v defns.i|extern.i|text.i >$TARGET
}

#this makes c50gt.o target, which must be explicit because c50gt.c is generated
::c::make_obj c50gt.c 

#this makes the real c50 target
link::make_exe cfive c50.o
depend cfive libcfive.so
exception cfive {::link::FLAGS ::link::LIBPATH ::link::SYSLIBS} {
	#TODO: modify tmk so that build-time library directories don't end up in
	#rpath
	set link::LIBPATH [linsert $::link::LIBPATH 0 \
		[file join $PROJROOT $SUBDIR $::ARCH ]]
	set link::SYSLIBS [linsert $::link::SYSLIBS 0 cfive]
}

depend test cfive

Name change from attwinnow.c to cfive/attwinnow.c.

Name change from c50.c to cfive/c50.c.

Name change from cfive.h to cfive/cfive.h.

Name change from classify.c to cfive/classify.c.

Name change from confmat.c to cfive/confmat.c.

Name change from construct.c to cfive/construct.c.

Name change from contin.c to cfive/contin.c.

Name change from defns.i to cfive/defns.i.

Name change from discr.c to cfive/discr.c.

Name change from extern.i to cfive/extern.i.

Name change from formrules.c to cfive/formrules.c.

Name change from formtree.c to cfive/formtree.c.

Name change from getdata.c to cfive/getdata.c.

Name change from getnames.c to cfive/getnames.c.

Name change from global.c to cfive/global.c.

Name change from implicitatt.c to cfive/implicitatt.c.

Name change from info.c to cfive/info.c.

Name change from main.c to cfive/main.c.

Name change from mcost.c to cfive/mcost.c.

Name change from modelfiles.c to cfive/modelfiles.c.

Name change from p-thresh.c to cfive/p-thresh.c.

Name change from prune.c to cfive/prune.c.

Name change from report.c to cfive/report.c.

Name change from rules.c to cfive/rules.c.

Name change from ruletree.c to cfive/ruletree.c.

Name change from siftrules.c to cfive/siftrules.c.

Name change from sort.c to cfive/sort.c.

Name change from subset.c to cfive/subset.c.

Name change from text.i to cfive/text.i.

Name change from trees.c to cfive/trees.c.

Name change from update.c to cfive/update.c.

Name change from utility.c to cfive/utility.c.

Name change from xval to cfive/xval.

Name change from xval.c to cfive/xval.c.

Changes to tests/TMakefile.

24
25
26
27
28
29
30
31
32
33
34
35
36
37

38
39
40
41
42
#/*      <http://www.gnu.org/licenses/>.					 */
#/*									 */
#/*************************************************************************/

if {![info exists env(TMK_MODULE_PATH)]} {
	set env(TMK_MODULE_PATH) [list]
}
set env(TMK_MODULE_PATH) [concat [file join $PROJDIR .. tmk] \
	$env(TMK_MODULE_PATH) ]

module init
module tcl

target check {} {

	set env(C50) [file join $PROJROOT $ARCH cfive]
	exec ./all.tcl >@stdout 2>@stderr
}









|


<


<
>
|



|
24
25
26
27
28
29
30
31
32
33

34
35

36
37
38
39
40
41
#/*      <http://www.gnu.org/licenses/>.					 */
#/*									 */
#/*************************************************************************/

if {![info exists env(TMK_MODULE_PATH)]} {
	set env(TMK_MODULE_PATH) [list]
}
set env(TMK_MODULE_PATH) [concat [file join $PROJDIR tmk] \
	$env(TMK_MODULE_PATH) ]


module tcl


exception test {} {
	set ::env(C50) [file join $::PROJDIR cfive $::ARCH cfive]
	exec ./all.tcl >@stdout 2>@stderr
}

depend test [file join $::PROJDIR cfive $::ARCH cfive]

Deleted tmk/init.tmk.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /bin/env tclsh

#/*************************************************************************/
#/*									 */
#/*  Copyright 2010 Rulequest Research Pty Ltd.				 */
#/*  Copyright 2011 Nathan Coulter and others				 */
#/*									 */
#/*  This file is part of C5.0 GPL Edition, a single-threaded version	 */
#/*  of C5.0 release 2.07.						 */
#/*									 */
#/*  C5.0 GPL Edition is free software: you can redistribute it and/or	 */
#/*  modify it under the terms of the GNU General Public License as	 */
#/*  published by the Free Software Foundation, either version 3 of the	 */
#/*  License, or (at your option) any later version.			 */
#/*									 */
#/*  C5.0 GPL Edition is distributed in the hope that it will be useful,	 */
#/*  but WITHOUT ANY WARRANTY; without even the implied warranty of	 */
#/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU	 */
#/*  General Public License for more details.				 */
#/*									 */
#/*  You should have received a copy of the GNU General Public License	 */
#/*  (gpl.txt) along with C5.0 GPL Edition.  If not, see 		 */
#/*									 */
#/*      <http://www.gnu.org/licenses/>.					 */
#/*									 */
#/*************************************************************************/

set_ifndef ::PACKAGE cfive
set_ifndef ::VERSION 0

config set ::ARCH build

eval_later {
	module am_env
	module am
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<