From: Alexandre Terrasa Date: Sun, 13 May 2018 20:34:27 +0000 (-0400) Subject: contrib: merge manually generated Makefiles with existing ones X-Git-Url: http://nitlanguage.org?hp=5cc538bf0ef5f74d44b9213a2c8ae945c5afb2f2 contrib: merge manually generated Makefiles with existing ones Signed-off-by: Alexandre Terrasa --- diff --git a/contrib/header_keeper/Makefile b/contrib/header_keeper/Makefile index ca099e4..b8ea6ee 100644 --- a/contrib/header_keeper/Makefile +++ b/contrib/header_keeper/Makefile @@ -1,8 +1,43 @@ -bin/header_keeper: - mkdir -p bin - nitc --dir bin src/header_keeper.nit +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +NITC ?= nitc +NITLS ?= nitls +NITUNIT ?= nitunit +NITDOC ?= nitdoc + +.PHONY: all +all: bin/header_keeper + +bin/header_keeper: $(shell $(NITLS) -M src/header_keeper.nit) + mkdir -p bin/ + $(NITC) src/header_keeper.nit -o bin/header_keeper + +.PHONY: check check: tests + $(NITUNIT) . + +.PHONY: tests tests: bin/header_keeper gcc -E /usr/include/SDL/SDL_image.h | bin/header_keeper SDL_image.h gcc -E /usr/include/GLES2/gl2.h | bin/header_keeper gl2.h + +.PHONY: doc +doc: + $(NITDOC) . -o doc/ + +.PHONY: clean +clean: + rm -rf bin/ + rm -rf doc/ diff --git a/contrib/neo_doxygen/Makefile b/contrib/neo_doxygen/Makefile index d628914..ccda8cb 100644 --- a/contrib/neo_doxygen/Makefile +++ b/contrib/neo_doxygen/Makefile @@ -4,7 +4,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -12,30 +12,49 @@ # See the License for the specific language governing permissions and # limitations under the License. -NITC=nitc -NITC_FLAGS=--dir bin +NITC ?= nitc +NITLS ?= nitls +NITUNIT ?= nitunit +NITDOC ?= nitdoc + NEO4J_DIR=/var/lib/neo4j OLD_PWD=${PWD} -.PHONY: bin reset-neo run-tests tests +.PHONY: all +all: bin/neo_doxygen + +bin/neo_doxygen: $(shell $(NITLS) -M src/neo_doxygen.nit) + mkdir -p bin/ + $(NITC) src/neo_doxygen.nit -o bin/neo_doxygen -# Compile the tool. -bin: - mkdir -p bin - $(NITC) $(NITC_FLAGS) src/neo_doxygen.nit +.PHONY: check +check: + $(NITUNIT) . # Reset the local graph. +.PHONY: reset-neo reset-neo: sudo -u neo4j "${NEO4J_DIR}/bin/neo4j" stop \ - && sudo -u neo4j rm -rf "${NEO4J_DIR}/data/graph.db" \ - && sudo -u neo4j "${NEO4J_DIR}/bin/neo4j" start + && sudo -u neo4j rm -rf "${NEO4J_DIR}/data/graph.db" \ + && sudo -u neo4j "${NEO4J_DIR}/bin/neo4j" start # Regenerate the XML documents in `tests`. +.PHONY: tests tests: $(MAKE) -C tests # Run the tests. +.PHONY: run-tests run-tests: cd ../../tests; \ - ./tests.sh ../contrib/neo_doxygen/src/tests/neo_doxygen_*.nit ; \ - cd "${OLD_PWD}" + ./tests.sh ../contrib/neo_doxygen/src/tests/neo_doxygen_*.nit ; \ + cd "${OLD_PWD}" + +.PHONY: doc +doc: + $(NITDOC) . -o doc/ + +.PHONY: clean +clean: + rm -rf bin/ + rm -rf doc/ diff --git a/contrib/nitin/Makefile b/contrib/nitin/Makefile index 940cee6..7868c4a 100644 --- a/contrib/nitin/Makefile +++ b/contrib/nitin/Makefile @@ -1,3 +1,38 @@ -all: - mkdir -p bin - nitc --semi-global nitin.nit -m readline -o bin/nitin +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +NITC ?= nitc +NITLS ?= nitls +NITUNIT ?= nitunit +NITDOC ?= nitdoc + +.PHONY: all +all: bin/nitin + +bin/nitin: $(shell $(NITLS) -M nitin.nit) + mkdir -p bin/ + $(NITC) --semi-global nitin.nit -m readline -o bin/nitin + +.PHONY: check +check: + $(NITUNIT) . + +.PHONY: doc +doc: + $(NITDOC) . -o doc/ + +.PHONY: clean +clean: + rm -rf bin/ + rm -rf doc/ diff --git a/contrib/nitiwiki/Makefile b/contrib/nitiwiki/Makefile index 19c3811..aa4fa12 100644 --- a/contrib/nitiwiki/Makefile +++ b/contrib/nitiwiki/Makefile @@ -1,17 +1,43 @@ -all: nitiwiki bin/nitiwiki_server +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. -nitiwiki: - mkdir -p bin - nitc src/nitiwiki.nit -o bin/nitiwiki +NITC ?= nitc +NITLS ?= nitls +NITUNIT ?= nitunit +NITDOC ?= nitdoc -bin/nitiwiki_server: $(shell nitls -M src/wiki_edit.nit) - nitc -o $@ src/wiki_edit.nit +.PHONY: all +all: bin/nitiwiki bin/wiki_edit -check: nitiwiki +bin/nitiwiki: $(shell $(NITLS) -M src/nitiwiki.nit) + mkdir -p bin/ + $(NITC) src/nitiwiki.nit -o bin/nitiwiki + +bin/wiki_edit: $(shell $(NITLS) -M src/wiki_edit.nit) + mkdir -p bin/ + $(NITC) src/wiki_edit.nit -o bin/wiki_edit + +.PHONY: check +check: bin/nitiwiki + $(NITUNIT) . cd tests; make +.PHONY: doc doc: - nitdoc -d doc src/nitiwiki.nit + $(NITDOC) . -o doc/ +.PHONY: clean clean: - rm -rf bin + rm -rf bin/ + rm -rf doc/ diff --git a/contrib/nitrpg/Makefile b/contrib/nitrpg/Makefile index ac3f3a8..0270ede 100644 --- a/contrib/nitrpg/Makefile +++ b/contrib/nitrpg/Makefile @@ -1,7 +1,5 @@ # This file is part of NIT ( http://www.nitlanguage.org ). # -# Copyright 2014-2015 Alexandre Terrasa -# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -14,23 +12,31 @@ # See the License for the specific language governing permissions and # limitations under the License. -NITC=nitc -NITU=nitunit +NITC ?= nitc +NITLS ?= nitls +NITUNIT ?= nitunit +NITDOC ?= nitdoc -all: listener web +.PHONY: all +all: bin/listener bin/web -listener: - $(NITC) src/listener.nit +bin/listener: $(shell $(NITLS) -M src/listener.nit) + mkdir -p bin/ + $(NITC) src/listener.nit -o bin/listener -web: - $(NITC) src/web.nit +bin/web: $(shell $(NITLS) -M src/web.nit) + mkdir -p bin/ + $(NITC) src/web.nit -o bin/web +.PHONY: check check: - $(NITU) src/game.nit - $(NITU) src/events.nit - $(NITU) src/statistics.nit - $(NITU) src/achievements.nit - $(NITU) src/listener.nit + $(NITUNIT) . + +.PHONY: doc +doc: + $(NITDOC) . -o doc/ +.PHONY: clean clean: - rm listener web + rm -rf bin/ + rm -rf doc/ diff --git a/contrib/refund/Makefile b/contrib/refund/Makefile index 6cbe02f..eae12aa 100644 --- a/contrib/refund/Makefile +++ b/contrib/refund/Makefile @@ -1,7 +1,5 @@ # This file is part of NIT ( http://www.nitlanguage.org ). # -# Copyright 2015 Alexandre Terrasa -# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -14,15 +12,29 @@ # See the License for the specific language governing permissions and # limitations under the License. -all: refund +NITC ?= nitc +NITLS ?= nitls +NITUNIT ?= nitunit +NITDOC ?= nitdoc + +.PHONY: all +all: bin/refund -refund: - mkdir -p bin - nitc src/refund.nit -o bin/refund +bin/refund: $(shell $(NITLS) -M src/refund.nit) + mkdir -p bin/ + $(NITC) src/refund.nit -o bin/refund -check: refund +.PHONY: check +check: bin/refund + $(NITUNIT) . cd tests; make +.PHONY: doc +doc: + $(NITDOC) . -o doc/ + +.PHONY: clean clean: - rm -rf bin + rm -rf bin/ + rm -rf doc/ cd tests; make clean diff --git a/contrib/sort_downloads/Makefile b/contrib/sort_downloads/Makefile index 903d020..0f0e026 100644 --- a/contrib/sort_downloads/Makefile +++ b/contrib/sort_downloads/Makefile @@ -1,6 +1,42 @@ -build: +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +NITC ?= nitc +NITLS ?= nitls +NITUNIT ?= nitunit +NITDOC ?= nitdoc + +.PHONY: all +all: bin/sort_downloads + +bin/sort_downloads: $(shell $(NITLS) -M src/sort_downloads.nit) mkdir -p bin/ - nitc --dir bin/ src/*.nit + $(NITC) src/sort_downloads.nit -o bin/sort_downloads +.PHONY: install install: install bin/sort_downloads /usr/local/bin/ + +.PHONY: check +check: + $(NITUNIT) . + +.PHONY: doc +doc: + $(NITDOC) . -o doc/ + +.PHONY: clean +clean: + rm -rf bin/ + rm -rf doc/