summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Alejandro Melo <rmelo@inti.gob.ar>2017-11-24 13:27:34 -0300
committerRodrigo Alejandro Melo <rmelo@inti.gob.ar>2017-11-24 13:30:57 -0300
commit436f8a18014bc0614e3181ee1fd2679d682eea07 (patch)
tree17c235e950a2280bd7435f4d6eb1f627c316696b
parent508777e34fe7ff0a1580695a18924768dca0ab59 (diff)
downloadvhdl2vl-436f8a18014bc0614e3181ee1fd2679d682eea07.tar.gz
vhdl2vl-436f8a18014bc0614e3181ee1fd2679d682eea07.zip
Implemented a mechanism to exclude files in the main Makefile
-rw-r--r--Makefile31
-rw-r--r--examples/.exclude5
2 files changed, 25 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 0c29395..666dae0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,29 +1,38 @@
#!/usr/bin/make
-VHDLS = $(wildcard examples/*.vhd)
-VHDLS := $(notdir $(VHDLS))
-VHDLS := $(filter-out todo.vhd,$(VHDLS))
+TEMP = temp
+
+EXCLUDE = $(shell cat examples/.exclude)
+EXCLUDE := $(basename $(EXCLUDE))
+EXCLUDE := $(addsuffix .vhd,$(EXCLUDE))
+
+VHDLS = $(wildcard examples/*.vhd)
+VHDLS := $(notdir $(VHDLS))
+
+ifndef WIP
+VHDLS := $(filter-out $(EXCLUDE),$(VHDLS))
+DIFFOPT = --exclude-from=examples/.exclude
+else
+DIFFOPT = --exclude=Makefile
+endif
all: diff
translate:
@make -C src
@make -C examples
- @mkdir -p temp/verilog
+ @rm -fr $(TEMP)/verilog
+ @mkdir $(TEMP)/verilog
@echo "##### Translating Examples #####################################"
@cd examples; $(foreach VHDL,$(VHDLS), echo "Translating: $(VHDL)";\
- ../src/vhd2vl --quiet $(VHDL) ../temp/verilog/$(basename $(VHDL)).v;)
+ ../src/vhd2vl --quiet $(VHDL) ../$(TEMP)/verilog/$(basename $(VHDL)).v;)
@make -C translated_examples
diff: translate
@echo "##### Diff #####################################################"
- diff -u --exclude=Makefile translated_examples temp/verilog
+ diff -u $(DIFFOPT) translated_examples $(TEMP)/verilog
@echo "PASS"
-todo:
- @make -C src
- src/vhd2vl --quiet examples/todo.vhd temp/todo.v
-
clean:
make -C src clean
- rm -fr temp
+ rm -fr $(TEMP)
diff --git a/examples/.exclude b/examples/.exclude
new file mode 100644
index 0000000..458a443
--- /dev/null
+++ b/examples/.exclude
@@ -0,0 +1,5 @@
+Makefile
+todo.*
+bigfile.*
+for.*
+partselect.*
OpenPOWER on IntegriCloud