Skip to content

Commit ce741df

Browse files
committed
btrfs-progs: build: clean up tags files enumeration
There are 3 rules repeating the pattern for tags files but it gets out of sync, e.g. it lacks crypto/. To fix that generate the list in one place from one place. Signed-off-by: David Sterba <[email protected]>
1 parent 3924a1b commit ce741df

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

Makefile

+6-13
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ tune_objects = tune/main.o tune/seeding.o tune/change-uuid.o tune/change-metadat
292292
all_objects = $(objects) $(cmds_objects) $(libbtrfs_objects) $(convert_objects) \
293293
$(mkfs_objects) $(image_objects) $(tune_objects) $(libbtrfsutil_objects)
294294

295+
tags_files = $(addsuffix /*.[ch], . check cmds common convert crypto image include mkfs tune \
296+
kernel-lib kernel-shared libbtrfs libbtrfsutil libbtrfsutil/python tests)
297+
295298
udev_rules = 64-btrfs-dm.rules 64-btrfs-zoned.rules
296299

297300
ifeq ("$(origin V)", "command line")
@@ -893,25 +896,15 @@ compile_commands.json: FORCE
893896

894897
tags: FORCE
895898
@echo " TAGS $(TAGS_CMD)"
896-
$(Q)$(TAGS_CMD) *.[ch] image/*.[ch] convert/*.[ch] mkfs/*.[ch] \
897-
check/*.[ch] kernel-lib/*.[ch] kernel-shared/*.[ch] \
898-
kernel-shared/*/*.[ch] \
899-
cmds/*.[ch] common/*.[ch] tune/*.[ch] \
900-
libbtrfsutil/*.[ch]
899+
$(Q)$(TAGS_CMD) $(tags_files)
901900

902901
etags: FORCE
903902
@echo " ETAGS $(ETAGS_CMD)"
904-
$(Q)$(ETAGS_CMD) *.[ch] image/*.[ch] convert/*.[ch] mkfs/*.[ch] \
905-
check/*.[ch] kernel-lib/*.[ch] kernel-shared/*.[ch] \
906-
cmds/*.[ch] common/*.[ch] tune/*.[ch] \
907-
libbtrfsutil/*.[ch]
903+
$(Q)$(ETAGS_CMD) $(tags_files)
908904

909905
cscope: FORCE
910906
@echo " CSCOPE $(CSCOPE_CMD)"
911-
$(Q)ls -1 *.[ch] image/*.[ch] convert/*.[ch] mkfs/*.[ch] check/*.[ch] \
912-
kernel-lib/*.[ch] kernel-shared/*.[ch] libbtrfsutil/*.[ch] \
913-
cmds/*.[ch] common/*.[ch] tune/*.[ch] \
914-
> cscope.files
907+
$(Q)ls -1 $(tags_files) > cscope.files
915908
$(Q)$(CSCOPE_CMD)
916909

917910
clean-all: clean clean-doc clean-gen

0 commit comments

Comments
 (0)