mirror of https://github.com/openXC7/prjxray.git
063-gtp-common-conf: fix Makefile to clean only current part
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
This commit is contained in:
parent
5245999dc4
commit
50553b0c17
|
|
@ -10,16 +10,19 @@ SHELL = bash
|
|||
|
||||
N ?= 20
|
||||
|
||||
SPECIMENS := $(addprefix build/specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||
BUILD_DIR = build_${XRAY_PART}
|
||||
|
||||
SPECIMENS := $(addprefix ${BUILD_DIR}/specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
||||
FUZDIR ?= ${PWD}
|
||||
|
||||
|
||||
all: database
|
||||
|
||||
# generate.sh / top_generate.sh call make, hence the command must
|
||||
# have a + before it.
|
||||
$(SPECIMENS_OK): $(SPECIMENS_DEPS)
|
||||
mkdir -p build
|
||||
mkdir -p ${BUILD_DIR}
|
||||
bash ${XRAY_DIR}/utils/top_generate.sh $(subst /OK,,$@)
|
||||
|
||||
run:
|
||||
|
|
@ -29,22 +32,22 @@ run:
|
|||
touch run.${XRAY_PART}.ok
|
||||
|
||||
clean:
|
||||
rm -rf build run.ok
|
||||
rm -rf ${BUILD_DIR} run.${XRAY_PART}.ok
|
||||
|
||||
.PHONY: all run clean
|
||||
|
||||
database: build/segbits_gtp_common.db
|
||||
database: ${BUILD_DIR}/segbits_gtp_common.db
|
||||
|
||||
build/segbits_gtp_common.rdb: $(SPECIMENS_OK)
|
||||
${XRAY_SEGMATCH} -o build/segbits_gtp_common.rdb $$(find $(SPECIMENS) -name "segdata_gtp_common*")
|
||||
${BUILD_DIR}/segbits_gtp_common.rdb: $(SPECIMENS_OK)
|
||||
${XRAY_SEGMATCH} -o ${BUILD_DIR}/segbits_gtp_common.rdb $$(find $(SPECIMENS) -name "segdata_gtp_common*")
|
||||
|
||||
build/segbits_gtp_common.db: build/segbits_gtp_common.rdb
|
||||
${XRAY_DBFIXUP} --db-root build --zero-db bits.dbf \
|
||||
--seg-fn-in build/segbits_gtp_common.rdb \
|
||||
--seg-fn-out build/segbits_gtp_common.db
|
||||
${XRAY_MASKMERGE} build/mask_gtp_common.db $$(find $(SPECIMENS) -name "segdata_gtp_common*")
|
||||
${BUILD_DIR}/segbits_gtp_common.db: ${BUILD_DIR}/segbits_gtp_common.rdb
|
||||
${XRAY_DBFIXUP} --db-root ${BUILD_DIR} --zero-db bits.dbf \
|
||||
--seg-fn-in ${BUILD_DIR}/segbits_gtp_common.rdb \
|
||||
--seg-fn-out ${BUILD_DIR}/segbits_gtp_common.db
|
||||
${XRAY_MASKMERGE} ${BUILD_DIR}/mask_gtp_common.db $$(find $(SPECIMENS) -name "segdata_gtp_common*")
|
||||
|
||||
pushdb:
|
||||
source pushdb.sh
|
||||
BUILD_DIR=$(BUILD_DIR) source pushdb.sh
|
||||
|
||||
.PHONY: database pushdb
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@
|
|||
#
|
||||
# SPDX-License-Identifier: ISC
|
||||
|
||||
if ! test $(find . -name "segdata_gtp_common_mid_right.txt" | wc -c) -eq 0
|
||||
if ! test $(find ${BUILD_DIR} -name "segdata_gtp_common_mid_right.txt" | wc -c) -eq 0
|
||||
then
|
||||
${XRAY_MERGEDB} gtp_common_mid_right build/segbits_gtp_common.db
|
||||
${XRAY_MERGEDB} mask_gtp_common_mid_right build/mask_gtp_common.db
|
||||
${XRAY_MERGEDB} gtp_common_mid_left build/segbits_gtp_common.db
|
||||
${XRAY_MERGEDB} mask_gtp_common_mid_left build/mask_gtp_common.db
|
||||
${XRAY_MERGEDB} gtp_common_mid_right ${BUILD_DIR}/segbits_gtp_common.db
|
||||
${XRAY_MERGEDB} mask_gtp_common_mid_right ${BUILD_DIR}/mask_gtp_common.db
|
||||
${XRAY_MERGEDB} gtp_common_mid_left ${BUILD_DIR}/segbits_gtp_common.db
|
||||
${XRAY_MERGEDB} mask_gtp_common_mid_left ${BUILD_DIR}/mask_gtp_common.db
|
||||
fi
|
||||
|
||||
if ! test $(find . -name "segdata_gtp_common.txt" | wc -c) -eq 0
|
||||
if ! test $(find ${BUILD_DIR} -name "segdata_gtp_common.txt" | wc -c) -eq 0
|
||||
then
|
||||
${XRAY_MERGEDB} gtp_common build/segbits_gtp_common.db
|
||||
${XRAY_MERGEDB} mask_gtp_common build/mask_gtp_common.db
|
||||
${XRAY_MERGEDB} gtp_common ${BUILD_DIR}/segbits_gtp_common.db
|
||||
${XRAY_MERGEDB} mask_gtp_common ${BUILD_DIR}/mask_gtp_common.db
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue