I am pretty new to GNUmakefiles.
I am going to place two rules with same target patters as follows:
$(TGTSIP)/$(VERILOG_DIR)/src/%: $(TGTDDVAPI)/$(VERILOG_DIR)/%
$(test_file)
$(TGTSIP)/$(VERILOG_DIR)/src/%: $(TGTMODEL)/%
$(test_file)
i Mentioned above in makefiles. because for few files the pre-requisit will change.Build works fine as expected. But i am not very sure whether this is the right way of having such rules ? If this is not the right way . Could anyone share the best way how we can simplify this?
For more understanding i am trying to copy files from 2 different paths to one same location. In this case target is the path where we are copying and prerequisites are the different paths. How can we handle it in single rule?