Updated Filelist.mk generation

This commit is contained in:
Maix0 2024-06-06 23:18:23 +02:00
parent ff73e4ced4
commit f80d3611b1
5 changed files with 2101 additions and 2094 deletions

View file

@ -6,7 +6,7 @@
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
# Updated: 2024/05/30 19:57:48 by maiboyer ### ########.fr #
# Updated: 2024/06/06 23:17:20 by maiboyer ### ########.fr #
# #
# **************************************************************************** #
@ -22,4 +22,10 @@ libparser.a:
libgmr.a:
@$(MAKE) --no-print-directory -f Grammar.mk "LIB_NAME=$(shell realpath .)/" "BUILD_DIR=$(shell realpath $(BUILD_DIR))" libgmr.a
.PHONY: all bonus clean fclean re libparser.a libgmr.a
build_filelist:
@rm Filelist.mk
@printf '%-78s\\\n' "SRC_FILES =" > Filelist.mk
@tree static -ifF | rg 'static/(.*)\.c$$' --replace '$$1' | sed -re 's/^(.*)_([0-9]+)$$/\1|\2/g' | sort -t'|' --key=1,1 --key=2,2n | sed -e's/|/_/' | sed -e 's/^.*$$/&.c/' | xargs printf '%-78s\\\n' >> Filelist.mk
@echo "" >> Filelist.mk
.PHONY: all bonus clean fclean re libparser.a libgmr.a build_filelist