Debian Codegraph @

GUI/PWgui/pwgui_vfs/Makefile

raw
1
2 -include make.inc
3 include make.versions
4
5 VFSDIR=pwgui.vfs
6 LIBDIR=$(VFSDIR)/lib
7 HERE = $(PWD)
8 MKDIR = mkdir -p
9 #MKDIR = $(HERE)/MakeDir.sh
10
11 default: check-default clean tclkit-runtime main.tcl copylib debian_stupid starkit
12
13 check-default:
14 @if test -z "$(PWGUI_VERSION)" || -z "$(GUIB_VERSION)" || -f main.tcl.sh; then echo; echo "*** Cannot use this Makefile directly; first do: \"make pwgui-starkit-vfs\" from the PWgui root directory !!!"; echo; exit 1; fi
15
16 tclkit-runtime:
17 if test -x $(TCLKIT) ; then cp $(TCLKIT) tclkit-runtime ; fi
18
19 main.tcl: check-default
20 if test ! -d $(LIBDIR) ; then $(MKDIR) $(LIBDIR); fi
21 VSFDIR=$(VFSDIR) \
22 GUIB_VERSION=$(GUIB_VERSION) \
23 PWGUI_VERSION=$(PWGUI_VERSION) \
24 TK_VERSION=$(TK_VERSION) \
25 ITCL_EXACT=$(ITCL_EXACT) \
26 ITCL_VERSION=$(ITCL_VERSION) $(SHELL) main.tcl.sh
27
28 copylib:
29 if test "$(ITCL_LIBDIR)" != "" ; then cp -fr $(ITCL_LIBDIR) $(LIBDIR)/; fi
30 cp -fr $(ITK_LIBDIR) $(LIBDIR)/
31 cp -fr $(IWIDGETS_LIBDIR) $(LIBDIR)/
32 if test "$(LIBITCL_SO)" != "" ; then cp $(LIBITCL_SO) $(LIBDIR)/itcl$(ITCL_VERSION)/; fi
33 if test "$(LIBITK_SO)" != "" ; then cp $(LIBITK_SO) $(LIBDIR)/itk$(ITK_VERSION)/; fi
34 if test "$(ITCL_pkg)" != "" ; then cp $(ITCL_pkg) $(LIBDIR)/itcl$(ITCL_VERSION)/; fi
35 if test "$(ITK_pkg)" != "" ; then cp $(ITK_pkg) $(LIBDIR)/itk$(ITK_VERSION)/; fi
36 -rm -rf $(DELETE_LINKS)
37
38
39 # in Debian the Itcl&Itk pkgIndex.tcl contain a hard-coded directory
40 # and the files are scattered in /usr/lib and /usr/share. Fix it.
41
42 debian_stupid:
43 for file in $(LIBDIR)/itcl$(ITCL_VERSION)/pkgIndex.tcl $(LIBDIR)/itk$(ITK_VERSION)/pkgIndex.tcl; do \
44 if test -f $$file; then \
45 sed 's/\/usr lib x86_64-linux-gnu/$$dir/' $$file > /tmp/pkg; cp /tmp/pkg $$file; \
46 fi; done
47
48 starkit:
49 -if test -f pwgui; then rm pwgui; fi
50 $(SDX) wrap pwgui.kit -interp $(TCLKIT) -runtime tclkit-runtime
51 $(SDX) mkpack pwgui.kit pwgui
52 chmod +x pwgui
53 -rm -f tclkit-runtime pwgui.kit
54
55 # -interp tclsh -runtime tclkit-runtime
56 # $(SDX) mkpack oldstar.kit newstar.kit
57 # $(SDX) wrap pwgui -runtime /tmp/starkit/dummy-assam
58 # $(SDX) wrap pwgui -interp $(TCLKIT) -runtime tclkit-runtime
59
60 clean:
61 -rm -rf pwgui pwgui.kit *~ pwgui*tgz pwgui*zip
62
63 distclean: clean
64 -rm -rf $(VFSDIR) tclkit-runtime make.inc main.tcl.sh make.versions