In order to have autonomous packages, they should be coherent and work as is without specific user hack.
The remaining issues are:
* The absence of required source files (eg. because generated by nitcc or nitserial) that make tools unusable or reports error. The proposed solution is a new optional Makefile goal `pre-build` that has to generate the missing files. close #1720
* The requirement of arbitrary `-I` that make the tools (eg the vim plugin) unusable on the projects without prior knowledge.
The only project that use a rogue -I is `online_editor` that require things from nitc.
The proposed solution is to virtually move src to contrib/nitc as a symbolic link.
New project could then choose to import nitc (or parts of it) without being in src.
* The presence of broken nit files. Currently, only 3 broken files remain: `contrib/pep8analysis/src/parser/parser_abs.nit`, `contrib/nitc/parser/parser_abs.nit` and `contrib/nitcc/src/nitcc_lexer0.nit`. These are still open issues and will be dealt latter.
Pull-Request: #1749
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
all: server
+pre-build: src/benitlux_serial.nit
+
server:
mkdir -p bin/
../../bin/nitc --dir bin/ src/benitlux_daily.nit src/benitlux_web.nit
default: bin/moles
+pre-build: assets/images/drawing.png
+
bin/moles: $(shell ../../bin/nitls -M src/moles_linux.nit) assets/images/drawing.png
mkdir -p bin
../../bin/nitc -o bin/moles src/moles_linux.nit
all: bin/jwrapper
+pre-build: src/javap_test_parser.nit src/serial.nit
+
../nitcc/src/nitcc:
make -C ../nitcc
all: bin/memory
+pre-build: assets/images/drawing.png
+
bin/memory: assets/images/drawing.png src/*.nit
mkdir -p bin
../../bin/nitc -o bin/memory src/memory.nit -m ../../lib/mnit/linux/linux.nit
--- /dev/null
+../src
\ No newline at end of file
all: bin/objcwrapper
+pre-build: src/objc_parser.nit
+
../nitcc/src/nitcc:
make -C ../nitcc
ACE_BUILDS ?= ../../../ace-builds/
default:
- ../../bin/nitc --semi-global sources/nit/pnacl_nit.nit -I ../../src/
+ ../../bin/nitc --semi-global sources/nit/pnacl_nit.nit
cp pnacl_nit/pnacl_nit.pexe www/pnacl/ -f
rm -rf pnacl_nit/
# A version of the naive Nit interpreter for PNaCl.
module pnacl_nit
-import interpreter::naive_interpreter
-import interpreter::debugger
+import nitc::interpreter::naive_interpreter
+import nitc::interpreter::debugger
import pnacl
-intrude import toolcontext
-intrude import loader
+intrude import nitc::toolcontext
+intrude import nitc::loader
intrude import core::file
# We redefine exit to start a new thread before killing the one that called exit.
all: simplan
+pre-build: simplan_parser.nit
+
simplan: simplan.nit simplan_parser.nit
${NITC} simplan.nit
all: bin/server bin/tinks
+pre-build: assets/images/drawing.png src/client/client_serialize.nit src/server/server_serialize.nit
+
# Client
bin/tinks: assets/images/drawing.png src/client/client_serialize.nit $(shell ../../bin/nitls -M src/client/linux_client.nit)
../../bin/nitc -o bin/tinks src/client/linux_client.nit -m src/client/client_serialize.nit
-src/client/client_serialize.nit: $(shell ../../bin/nitls -M src/client/client.nit)
+src/client/client_serialize.nit: assets/images/drawing.png $(shell ../../bin/nitls -M src/client/client.nit)
../../bin/nitserial -o src/client/client_serialize.nit src/client/client.nit
assets/images/drawing.png: art/drawing.svg
NITCCDIR=../../contrib/nitcc/
-compile-parser: $(NITCCDIR)src/nitcc
+pre-build: $(NITCCDIR)src/nitcc
$(NITCCDIR)src/nitcc $(NITCCDIR)examples/json.sablecc
$(NITCCDIR)src/nitcc:
all: bin/nitc
+pre-build:
+ ./git-gen-version.sh
+
nitc_0: ../c_src/nitc parser/parser.nit
@echo '***************************************************************'
@echo '* Compile nitc_0 from NIT source files *'