Skip to content

Commit 8bed575

Browse files
authored
Merge pull request #2366 from Pinata-Consulting/makefile-if-less-brittle
Makefile: fix make FOO= by not using ifndef/def
2 parents 68f3970 + 724df01 commit 8bed575

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

flow/Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export DIE_AREA ?=
150150
export CORE_AREA ?=
151151

152152
# If we are running headless use offscreen rendering for save_image
153-
ifndef DISPLAY
153+
ifeq ($(DISPLAY),)
154154
export QT_QPA_PLATFORM ?= offscreen
155155
endif
156156

@@ -261,7 +261,7 @@ export RESULTS_DIR = $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)/$(FLOW_
261261
# but not necessarily built by ORFS using the BLOCKS mechanism.
262262
export MACROS ?= $(BLOCKS)
263263

264-
ifdef BLOCKS
264+
ifneq ($(BLOCKS),)
265265
$(foreach block,$(BLOCKS),$(eval BLOCK_LEFS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lef))
266266
$(foreach block,$(BLOCKS),$(eval BLOCK_LIBS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lib))
267267
$(foreach block,$(BLOCKS),$(eval BLOCK_GDS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/6_final.gds))
@@ -271,7 +271,7 @@ ifdef BLOCKS
271271
export ADDITIONAL_LIBS += $(BLOCK_LIBS)
272272
export ADDITIONAL_GDS += $(BLOCK_GDS)
273273
export GDS_FILES += $(BLOCK_GDS)
274-
ifdef CDL_FILES
274+
ifneq ($(CDL_FILES),)
275275
export CDL_FILES += $(BLOCK_CDL)
276276
endif
277277
endif
@@ -689,10 +689,10 @@ $(eval $(call do-step,2_1_floorplan,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_sy
689689

690690
# STEP 2: IO Placement (random)
691691
#-------------------------------------------------------------------------------
692-
ifndef IS_CHIP
693-
$(eval $(call do-step,2_2_floorplan_io,$(RESULTS_DIR)/2_1_floorplan.odb $(IO_CONSTRAINTS),io_placement_random))
694-
else
692+
ifeq ($(IS_CHIP),1)
695693
$(eval $(call do-copy,2_2_floorplan_io,2_1_floorplan.odb,$(IO_CONSTRAINTS)))
694+
else
695+
$(eval $(call do-step,2_2_floorplan_io,$(RESULTS_DIR)/2_1_floorplan.odb $(IO_CONSTRAINTS),io_placement_random))
696696
endif
697697

698698
# STEP 3: Timing Driven Mixed Sized Placement
@@ -756,10 +756,10 @@ $(eval $(call do-step,3_1_place_gp_skip_io,$(RESULTS_DIR)/2_floorplan.odb $(RESU
756756

757757
# STEP 2: IO placement (non-random)
758758
#-------------------------------------------------------------------------------
759-
ifndef IS_CHIP
760-
$(eval $(call do-step,3_2_place_iop,$(RESULTS_DIR)/3_1_place_gp_skip_io.odb $(IO_CONSTRAINTS),io_placement))
761-
else
759+
ifeq ($(IS_CHIP),1)
762760
$(eval $(call do-copy,3_2_place_iop,3_1_place_gp_skip_io.odb,$(IO_CONSTRAINTS)))
761+
else
762+
$(eval $(call do-step,3_2_place_iop,$(RESULTS_DIR)/3_1_place_gp_skip_io.odb $(IO_CONSTRAINTS),io_placement))
763763
endif
764764

765765
# STEP 3: Global placement with placed IOs, timing-driven, and routability-driven.

0 commit comments

Comments
 (0)