Merge branch 'master' of git@github.com:briantrice/slate-language
[cslatevm.git] / Makefile
blob68f2d24051485e1ddb127a88414b02ad60e631d0
1 slateroot=.
3 include $(slateroot)/common.mk
5 all: vm
7 vm:
8 $(SILENT) $(MAKE) -C $(VMDIR) vm
9 $(SILENT) cp -f $(VMDIR)/$(VMNAME) ./slate
11 $(DEFAULT_IMAGE): vm
12 $(SILENT) $(ECHO) "repl resetOnStartup. Image saveNamed: '$(DEFAULT_IMAGE)'." | $(VM) $(QUIETNESS) -i $(DEFAULT_KERNEL_IMAGE)
13 $(SILENT) touch $(DEFAULT_IMAGE)
15 release_image: vm $(DEFAULT_IMAGE)
17 installdirs:
18 $(SILENT) $(INSTALL) -d $(exec_prefix) $(lispdir) $(includedir) $(datadir) $(man1dir)
20 install: vm installdirs
21 $(info Installing) # TODO: Plugins and documentation missing
22 $(SILENT) $(INSTALL) $(VM) $(exec_prefix)/$(execname)
23 $(SILENT) $(INSTALL) $(INSTALL_MODE) $(slateroot)/$(DEFAULT_IMAGE) $(datadir)/$(DEFAULT_IMAGE)
24 $(SILENT) $(INSTALL) $(INSTALL_MODE) $(VMDIR)/slate.hpp $(includedir)/slate.hpp
25 $(SILENT) $(INSTALL) $(INSTALL_MODE) $(slateroot)/etc/slate-mode.el $(lispdir)/
26 $(SILENT) cat $(slateroot)/etc/slate.1 | sed -e 's/$${prefix}/$(subst /,\/,$(prefix))/g' | $(GZIP) -c > $(slateroot)/etc/slate.1.gz
27 $(SILENT) $(INSTALL) $(INSTALL_MODE) $(slateroot)/etc/slate.1.gz $(man1dir)
29 install-strip: install
30 $(SILENT) $(INSTALL) -s $(VM) $(exec_prefix)/$(execname)
32 installcheck:
33 $(info Checking installation)
34 # TODO: A few sanity checks should be run on the installed files
35 $(SILENT) $(exec_prefix)/$(execname) --eval "3 + 4. quit."
37 uninstall:
38 $(info Uninstalling)
39 $(SILENT) $(RM) -f $(exec_prefix)/$(execname)
40 $(SILENT) $(RM) -f $(lispdir)/slate-mode.el
41 $(SILENT) $(RM) -f $(includedir)/slate.hpp
42 $(SILENT) $(RM) -fr $(datadir)
44 edit:
45 $(info Launching Slate in Emacs)
46 $(SILENT) $(EMACS) -Q -l $(slateroot)/etc/slate-startup.el
48 slate-completions:
49 $(info Creating completion file for evaluation)
50 $(SILENT) $(VM) $(QUIETNESS) -i $(DEFAULT_IMAGE) --eval "(File newNamed: '~/.slate_completions' &mode: File CreateWrite) writer sessionDo: [| :x | Symbols keySet do: [| :name | x ; name ; '\n']]. quit."
52 readline-support: slate-completions
54 i18n-support:
55 $(SILENT) $(VM) $(QUIETNESS) -i $(DEFAULT_IMAGE) --load src/i18n/init.slate --eval "Unicode buildTable" --eval "Image save. quit."
57 bootstrap: src/mobius/init.slate
58 $(info Bootstrapping new images)
59 $(SILENT) $(VM) $(QUIETNESS) -i $(DEFAULT_IMAGE) --load src/mobius/init.slate --eval "Image bootstrap &littleEndian: $(LITTLE_ENDIAN_SLATE) &bitSize: $(WORD_SIZE)." --eval "quit"
61 backup: superclean
62 tar '--exclude=*.git*' -jcvf ../slate-backup.tar.bz2 .
64 plugins:
65 $(MAKE) -C src/plugins
67 superclean: clean
68 rm -f core vm vm.fast vm.prof
70 pluginsclean:
71 $(MAKE) -C src/plugins clean
72 vmclean:
73 $(MAKE) -C src/vm clean
75 clean: pluginsclean vmclean
77 tags: TAGS
79 TAGS: $(SOURCES) $(HEADERS)
80 $(SECHO) "Creating $@ file"
81 $(SILENT) $(ETAGS) $(SOURCES) $(HEADERS)
83 .PHONY: clean superclean backup plugins pluginsclean vmclean