Skip to content

Commit

Permalink
use --delete flag on clean-remote targets only; fix .gitignore file; …
Browse files Browse the repository at this point in the history
…minor improvements in FPGAs' Makefiles
  • Loading branch information
JDLopes committed Oct 11, 2021
1 parent 0f931c4 commit f397a29
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ hardware/fpga/*/*/*
!hardware/fpga/quartus/*/*.sdc

#asic
hardware/asic/*/*/*
hardware/asic/*/*
!hardware/asic/asic.mk
!hardware/asic/*/Makefile
!hardware/asic/*/*.sh
!hardware/asic/*/synscript.tcl
!hardware/asic/*/powscript.tcl
!hardware/asic/*/verilog/initial.v

#DOCUMENT
document/*/*
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ test-doc-clean:
make doc-clean DOC=pb
make doc-clean DOC=presentation

test: test-clean test-pc-emul test-sim test-fpga test-asic test-doc
test: test-clean test-pc-emul test-sim test-fpga test-doc

test-clean: test-pc-emul-clean test-sim-clean test-fpga-clean test-asic-clean test-doc-clean

Expand Down
4 changes: 2 additions & 2 deletions hardware/asic/umc130/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ endif
#

clean: clean-remote
@rm -rf *.txt rc.cmd* rc.* fv libscore_work *.sdc *.lib *.lef *.db
@find *.tcl -type f -not -name synscript.tcl -not -name powscript.tcl -delete
rm -rf *.txt rc.cmd* rc.* fv libscore_work *.sdc *.lib *.lef *.db
find *.tcl -type f -not -name synscript.tcl -not -name powscript.tcl -delete

.PHONY: gen-bootrom gen-sram \
fix-mems fix-lefs fix-bootrom-sim-model fix-sram-sim-model \
Expand Down
6 changes: 3 additions & 3 deletions hardware/fpga/fpga.mk
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ test3: clean
# Clean
#

clean-remote:
clean-remote: hw-clean
ifneq ($(FPGA_SERVER),)
ssh $(FPGA_USER)@$(FPGA_SERVER) 'if [ ! -d $(REMOTE_ROOT_DIR) ]; then mkdir -p $(REMOTE_ROOT_DIR); fi'
rsync -avz --exclude .git $(ROOT_DIR) $(FPGA_USER)@$(FPGA_SERVER):$(REMOTE_ROOT_DIR)
rsync -avz --delete --exclude .git $(ROOT_DIR) $(FPGA_USER)@$(FPGA_SERVER):$(REMOTE_ROOT_DIR)
ssh $(FPGA_USER)@$(FPGA_SERVER) 'make -C $(REMOTE_ROOT_DIR)/hardware/fpga/$(TOOL)/$(BOARD) clean CLEANIP=$(CLEANIP)'
endif
ifneq ($(BOARD_SERVER),)
ssh $(BOARD_USER)@$(BOARD_SERVER) 'if [ ! -d $(REMOTE_ROOT_DIR) ]; then mkdir -p $(REMOTE_ROOT_DIR); fi'
rsync -avz --exclude .git $(ROOT_DIR) $(BOARD_USER)@$(BOARD_SERVER):$(REMOTE_ROOT_DIR)
rsync -avz --delete --exclude .git $(ROOT_DIR) $(BOARD_USER)@$(BOARD_SERVER):$(REMOTE_ROOT_DIR)
ssh $(BOARD_USER)@$(BOARD_SERVER) 'make -C $(REMOTE_ROOT_DIR)/hardware/fpga/$(TOOL)/$(BOARD) clean'
endif

Expand Down
2 changes: 1 addition & 1 deletion hardware/fpga/quartus/quartus.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ post-build:
mv output_files/top_system.fit.summary $(FPGA_LOG)


clean: hw-clean clean-remote
clean: clean-remote
rm -rf db incremental_db output_files *.summary *.rpt *.smsg *.txt *.done \
*.jdi *.pin *.sof *.sld *.qpf *.qsf *~ system.v

Expand Down
2 changes: 1 addition & 1 deletion hardware/fpga/vivado/vivado.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export RDI_VERBOSE = False

post-build:

clean: hw-clean clean-remote
clean: clean-remote
rm -rf .Xil/ *.map *. *~ synth_*.mmi synth_*.bit top_system*.v \
*_tb table.txt tab_*/ *webtalk* *.jou xelab.* xsim[._]* xvlog.* \
uart_loader *.ltx system.v fsm_encoding.os
Expand Down
2 changes: 1 addition & 1 deletion hardware/simulation/simulation.mk
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ clean-testlog:
@rm -f test.log
ifneq ($(SIM_SERVER),)
ssh $(SIM_USER)@$(SIM_SERVER) 'if [ ! -d $(REMOTE_ROOT_DIR) ]; then mkdir -p $(REMOTE_ROOT_DIR); fi'
rsync -avz --delete --exclude .git $(ROOT_DIR) $(SIM_USER)@$(SIM_SERVER):$(REMOTE_ROOT_DIR)
rsync -avz --exclude .git $(ROOT_DIR) $(SIM_USER)@$(SIM_SERVER):$(REMOTE_ROOT_DIR)
ssh $(SIM_USER)@$(SIM_SERVER) 'rm -f $(REMOTE_ROOT_DIR)/hardware/simulation/$(SIMULATOR)/test.log'
endif

Expand Down

0 comments on commit f397a29

Please sign in to comment.