diff --git a/Makefile b/Makefile index da722f9..bb2ed0c 100644 --- a/Makefile +++ b/Makefile @@ -17,17 +17,17 @@ export TEXTURES := $(wildcard $(TEXTURESET_FOLDER)/*) ### RECIPE PART ### -all : previews del_obsolete export +all : del_obsolete export -previews: $(SBSARFILES) +previews: $(SBSARFILES) | subformats $(MAKE) -f Makefile_previews all subformats: $(SBSARFILES) $(MAKE) -f Makefile_subformats all -del_obsolete: $(SBS_DIR) - @ for material in $(TEXTURES); do \ - rootname=$$(echo $$material | sed -r 's|$(TEXTURESET_FOLDER)/(.*)_.*|\1|');\ +del_obsolete: $(SBS_DIR) | previews + @ for material in $$(ls $(SBSAR_DIR)); do \ + rootname=$$(echo $$material | sed -r 's|(.*)\.sbsar|\1|');\ sbs_name=$(SBS_DIR)/$$rootname.sbs ;\ if [ ! -f $$sbs_name ] ;\ then echo "CLEANUP : The corresponding $$sbs_name doesn’t exist any more, deleting the corresponding obsolete files :" ;\