File: Makefile.am

package info (click to toggle)
quantlib-swig 1.40-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,276 kB
  • sloc: python: 6,024; java: 1,552; cs: 774; makefile: 309; sh: 22
file content (43 lines) | stat: -rw-r--r-- 953 bytes parent folder | download | duplicates (2)
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
QUANTLIB_R_ROOT = QuantLib

BUILT_SOURCES = src/$(QUANTLIB_R_ROOT).cpp R/$(QUANTLIB_R_ROOT).R

CLEANFILES = $(BUILT_SOURCES) .build-stamp

QUANTLIB_CONFIG=quantlib-config

if HAVE_R
if BUILD_R

all-local: .build-stamp

.build-stamp: $(BUILT_SOURCES)
        ## R is better at checking from above than within
	cd .. && R CMD check R && cd -
	touch .build-stamp

check-local: .build-stamp

install-exec-local: .build-stamp
	R CMD INSTALL .

endif
endif

$(BUILT_SOURCES): ../SWIG/*.i
	$(SWIG) $(SWIGFLAGS) -r -c++ -o src/$(QUANTLIB_R_ROOT).cpp ../SWIG/quantlib.i
	mv src/$(QUANTLIB_R_ROOT).R R/

dist-hook:
	mkdir -p $(distdir)/demo
	cp ./demo/00Index $(distdir)/demo
	cp ./demo/*.R $(distdir)/demo

clean-local:
	rm -rf $(BUILT_SOURCES) ../R.Rcheck \
           src/symbols.rds src/$(QUANTLIB_R_ROOT).o src/$(QUANTLIB_R_ROOT).so

EXTRA_DIST = DESCRIPTION NAMESPACE README.txt cleanup \
             $(BUILT_SOURCES) \
             R/README src/Makevars