[build] Clean up any .pc/ directories left by quilt (#5196)
`quilt` may leave behind a `.pc/` directory, which will show up in `git status`. Delete it if it is present as part of cleaning up after `quilt` operations.
This commit is contained in:
parent
fa4af0d372
commit
d370ba7ca2
16
slave.mk
16
slave.mk
@ -347,7 +347,7 @@ $(addprefix $(FILES_PATH)/, $(SONIC_MAKE_FILES)) : $(FILES_PATH)/% : .platform $
|
||||
# Build project and take package
|
||||
make DEST=$(shell pwd)/$(FILES_PATH) -C $($*_SRC_PATH) $(shell pwd)/$(FILES_PATH)/$* $(LOG)
|
||||
# Clean up
|
||||
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; popd; fi
|
||||
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
||||
|
||||
# Save the target deb into DPKG cache
|
||||
$(call SAVE_CACHE,$*,$@)
|
||||
@ -390,7 +390,7 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_MAKE_DEBS)) : $(DEBS_PATH)/% : .platform $$(a
|
||||
# Build project and take package
|
||||
DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS_GENERIC}" make DEST=$(shell pwd)/$(DEBS_PATH) -C $($*_SRC_PATH) $(shell pwd)/$(DEBS_PATH)/$* $(LOG)
|
||||
# Clean up
|
||||
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; popd; fi
|
||||
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
||||
|
||||
# Save the target deb into DPKG cache
|
||||
$(call SAVE_CACHE,$*,$@)
|
||||
@ -433,7 +433,7 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(a
|
||||
)
|
||||
popd $(LOG_SIMPLE)
|
||||
# Clean up
|
||||
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; popd; fi
|
||||
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
||||
# Take built package(s)
|
||||
mv $(addprefix $($*_SRC_PATH)/../, $* $($*_DERIVED_DEBS) $($*_EXTRA_DEBS)) $(DEBS_PATH) $(LOG)
|
||||
|
||||
@ -533,7 +533,7 @@ $(addprefix $(PYTHON_DEBS_PATH)/, $(SONIC_PYTHON_STDEB_DEBS)) : $(PYTHON_DEBS_PA
|
||||
python setup.py --command-packages=stdeb.command bdist_deb $(LOG)
|
||||
popd $(LOG_SIMPLE)
|
||||
# Clean up
|
||||
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; popd; fi
|
||||
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
||||
# Take built package(s)
|
||||
mv $(addprefix $($*_SRC_PATH)/deb_dist/, $* $($*_DERIVED_DEBS)) $(PYTHON_DEBS_PATH) $(LOG)
|
||||
|
||||
@ -570,7 +570,7 @@ $(addprefix $(PYTHON_WHEELS_PATH)/, $(SONIC_PYTHON_WHEELS)) : $(PYTHON_WHEELS_PA
|
||||
if [ ! "$($*_TEST)" = "n" ]; then python$($*_PYTHON_VERSION) setup.py test $(LOG); fi
|
||||
python$($*_PYTHON_VERSION) setup.py bdist_wheel $(LOG)
|
||||
# clean up
|
||||
if [ -f ../$(notdir $($*_SRC_PATH)).patch/series ]; then quilt pop -a -f; fi
|
||||
if [ -f ../$(notdir $($*_SRC_PATH)).patch/series ]; then quilt pop -a -f; [ -d .pc ] && rm -rf .pc; fi
|
||||
popd $(LOG_SIMPLE)
|
||||
mv $($*_SRC_PATH)/dist/$* $(PYTHON_WHEELS_PATH) $(LOG)
|
||||
|
||||
@ -623,7 +623,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES)) : $(TARGET_PATH)/%.g
|
||||
-t $* $($*.gz_PATH) $(LOG)
|
||||
docker save $* | gzip -c > $@
|
||||
# Clean up
|
||||
if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && quilt pop -a -f; popd; fi
|
||||
if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
||||
$(FOOTER)
|
||||
|
||||
SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES))
|
||||
@ -708,7 +708,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform
|
||||
-t $* $($*.gz_PATH) $(LOG)
|
||||
docker save $* | gzip -c > $@
|
||||
# Clean up
|
||||
if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && quilt pop -a -f; popd; fi
|
||||
if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
||||
|
||||
# Save the target deb into DPKG cache
|
||||
$(call SAVE_CACHE,$*.gz,$@)
|
||||
@ -749,7 +749,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_DBG_IMAGES)) : $(TARGET_PATH)/%-$(DBG_IMAG
|
||||
-t $*-dbg $($*.gz_PATH) $(LOG)
|
||||
docker save $*-dbg | gzip -c > $@
|
||||
# Clean up
|
||||
if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && quilt pop -a -f; popd; fi
|
||||
if [ -f $($*.gz_PATH).patch/series ]; then pushd $($*.gz_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi
|
||||
|
||||
# Save the target deb into DPKG cache
|
||||
$(call SAVE_CACHE,$*-$(DBG_IMAGE_MARK).gz,$@)
|
||||
|
Loading…
Reference in New Issue
Block a user