Skip to content

Commit b206acf

Browse files
committed
Merge branch 'tools-ynl-make-clean'
Jakub Kicinski says: ==================== tools: ynl: clean up make clean First change renames the clean target which removes build results, to a more common name. Second one add missing .PHONY targets. Third one ensures that clean deletes __pycache__. v2: add patch 2 v1: https://lore.kernel.org/all/20240301235609.147572-1-kuba@kernel.org/ ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents db72b6f + 72fa191 commit b206acf

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

tools/net/ynl/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ $(SUBDIRS):
1111
$(MAKE) -C $@ ; \
1212
fi
1313

14-
clean hardclean:
14+
clean distclean:
1515
@for dir in $(SUBDIRS) ; do \
1616
if [ -f "$$dir/Makefile" ] ; then \
1717
$(MAKE) -C $$dir $@; \
1818
fi \
1919
done
2020

21-
.PHONY: clean all $(SUBDIRS)
21+
.PHONY: all clean distclean $(SUBDIRS)

tools/net/ynl/generated/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ protos.a: $(OBJS)
4343
clean:
4444
rm -f *.o
4545

46-
hardclean: clean
46+
distclean: clean
4747
rm -f *.c *.h *.a
4848

4949
regen:
5050
@../ynl-regen.sh
5151

52-
.PHONY: all clean hardclean regen
52+
.PHONY: all clean distclean regen
5353
.DEFAULT_GOAL: all

tools/net/ynl/lib/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ ynl.a: $(OBJS)
1717
ar rcs $@ $(OBJS)
1818
clean:
1919
rm -f *.o *.d *~
20+
rm -rf __pycache__
2021

21-
hardclean: clean
22+
distclean: clean
2223
rm -f *.a
2324

2425
%.o: %.c
2526
$(COMPILE.c) -MMD -c -o $@ $<
2627

27-
.PHONY: all clean
28+
.PHONY: all clean distclean
2829
.DEFAULT_GOAL=all

tools/net/ynl/samples/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ $(BINS): ../lib/ynl.a ../generated/protos.a $(SRCS)
2828
clean:
2929
rm -f *.o *.d *~
3030

31-
hardclean: clean
31+
distclean: clean
3232
rm -f $(BINS)
3333

34-
.PHONY: all clean
34+
.PHONY: all clean distclean
3535
.DEFAULT_GOAL=all

0 commit comments

Comments
 (0)