-
Notifications
You must be signed in to change notification settings - Fork 2
/
libxv.ado
56 lines (38 loc) · 1.36 KB
/
libxv.ado
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*******************************************************************************
* *
* Client-/User-Side Compilation of Libxv *
* *
*******************************************************************************/
*! libxv
*! v 0.0.1
*! 02mar2024
// Drop program from memory if already loaded
cap prog drop libxv
// Defines the program
prog def libxv
// Provides a version statement
version 15
// Defines the syntax
syntax [, DISplay ]
// Try to find the library file
cap: findfile crossvalidate.mata
// If the file is found
if _rc == 0 {
// Gets the distribution date for the uncompiled mata library
mata: st_local("fdate", distdate(`"`r(fn)'"'))
// If the distribution date is greater than or equal to the date here
if td(`"`fdate'"') >= td("02mar2024") {
// clear mata memory
mata: mata clear
// Run the mata file
run `"`r(fn)'"'
// Compile the library
qui: lmbuild libxv, replace
// Rebuild the index
qui: mata: mata mlib index
} // End IF Block for recompilation
} // End IF Block for successful location of the file
// Call the help file
if !mi(`"`display'"') help libxv
// End of the program definition
end