diff --git a/core/Makefile b/core/Makefile index e005485eb..bb714abfc 100644 --- a/core/Makefile +++ b/core/Makefile @@ -440,78 +440,9 @@ endif # Then we could traverse that without quite as much bash drama. define combine-notice-files $(1) $(2): PRIVATE_MESSAGE := $(3) -$(1) $(2) $(4)/hash-timestamp: PRIVATE_DIR := $(4) -$(4)/hash-timestamp: $(5) $(BUILD_SYSTEM)/Makefile - @echo Finding NOTICE files: $$@ - $$(hide) rm -rf $$@ $$(PRIVATE_DIR)/hash - $$(hide) mkdir -p $$(PRIVATE_DIR)/hash - $$(hide) for file in $$$$(find $$(PRIVATE_DIR)/src -type f); do \ - hash=$$$$($(MD5SUM) $$$$file | sed -e "s/ .*//"); \ - hashfile=$$(PRIVATE_DIR)/hash/$$$$hash; \ - echo $$$$file >> $$$$hashfile; \ - done - $$(hide) touch $$@ -$(1): $(4)/hash-timestamp - @echo Combining NOTICE files: $$@ - $$(hide) mkdir -p $$(dir $$@) - $$(hide) echo $$(PRIVATE_MESSAGE) > $$@ - $$(hide) find $$(PRIVATE_DIR)/hash -type f | xargs cat | sort | \ - sed -e "s:$$(PRIVATE_DIR)/src\(.*\)\.txt: \1:" >> $$@ - $$(hide) echo >> $$@ - $$(hide) echo >> $$@ - $$(hide) echo >> $$@ - $$(hide) for hashfile in $$$$(find $$(PRIVATE_DIR)/hash -type f); do \ - echo "============================================================"\ - >> $$@; \ - echo "Notices for file(s):" >> $$@; \ - cat $$$$hashfile | sort | \ - sed -e "s:$$(PRIVATE_DIR)/src\(.*\)\.txt: \1:" >> \ - $$@; \ - echo "------------------------------------------------------------"\ - >> $$@; \ - echo >> $$@; \ - orig=$$$$(head -n 1 $$$$hashfile); \ - cat $$$$orig >> $$@; \ - echo >> $$@; \ - echo >> $$@; \ - echo >> $$@; \ - done -$(2): $(4)/hash-timestamp - @echo Combining NOTICE files: $$@ - $$(hide) mkdir -p $$(dir $$@) - $$(hide) echo "
" > $$@ - $$(hide) echo "" >> $$@ - $$(hide) echo "" >> $$@ - $$(hide) echo "' % id_table.get(value[0])
+ print >> output_file, ' Notices for file(s): '
+ print >> output_file, ''
+ for filename in sorted(value):
+ print >> output_file, "%s "
+ print >> output_file
+ print >> output_file, '" % (SRC_DIR_STRIP_RE.sub(r"\1", filename)) + print >> output_file, " ' + print >> output_file, html_escape(open(value[0]).read()) + print >> output_file, "" + print >> output_file, " |