Make sure to create manifest file in the correct directory

This commit is contained in:
Reinhard Müller 2019-03-10 01:08:46 +01:00
parent 0162ae68fe
commit 8a66b0e1f3

View File

@ -231,6 +231,7 @@ PROCESSOR = "$basedir/build/process_file.sh"
PROCFLAGS = --source "$basedir" --statusdir "$statusdir" --domain "$domain"
INPUTDIR = $input
OUTPUTDIR = $output
STATUSDIR = $statusdir
LANGUAGES = $(echo $(get_languages))
# -----------------------------------------------------------------------------
@ -342,11 +343,11 @@ clean:
@echo "Cleaning up excess files"
@# Write all destination filenames into "manifest" file, one per line
\$(file >manifest,)
\$(foreach filename,\$(ALL_DST),\$(file >>manifest,\$(filename)))
@sort manifest > manifest.sorted
\$(foreach filename,\$(ALL_DST),\$(file >>$(STATUSDIR)/manifest,\$(filename)))
@sort $(STATUSDIR)/manifest > $(STATUSDIR)/manifest.sorted
@find -L \$(OUTPUTDIR) -type f \\
| sort \\
| diff - manifest.sorted \\
| diff - $(STATUSDIR)/manifest.sorted \\
| sed -rn 's;^< ;;p' \\
| while read file; do echo "* Deleting \$\${file}"; rm "\$\${file}"; done