Commit b206acf1 authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parents db72b6fc 72fa191b
......@@ -11,11 +11,11 @@ $(SUBDIRS):
$(MAKE) -C $@ ; \
fi
clean hardclean:
clean distclean:
@for dir in $(SUBDIRS) ; do \
if [ -f "$$dir/Makefile" ] ; then \
$(MAKE) -C $$dir $@; \
fi \
done
.PHONY: clean all $(SUBDIRS)
.PHONY: all clean distclean $(SUBDIRS)
......@@ -43,11 +43,11 @@ protos.a: $(OBJS)
clean:
rm -f *.o
hardclean: clean
distclean: clean
rm -f *.c *.h *.a
regen:
@../ynl-regen.sh
.PHONY: all clean hardclean regen
.PHONY: all clean distclean regen
.DEFAULT_GOAL: all
......@@ -17,12 +17,13 @@ ynl.a: $(OBJS)
ar rcs $@ $(OBJS)
clean:
rm -f *.o *.d *~
rm -rf __pycache__
hardclean: clean
distclean: clean
rm -f *.a
%.o: %.c
$(COMPILE.c) -MMD -c -o $@ $<
.PHONY: all clean
.PHONY: all clean distclean
.DEFAULT_GOAL=all
......@@ -28,8 +28,8 @@ $(BINS): ../lib/ynl.a ../generated/protos.a $(SRCS)
clean:
rm -f *.o *.d *~
hardclean: clean
distclean: clean
rm -f $(BINS)
.PHONY: all clean
.PHONY: all clean distclean
.DEFAULT_GOAL=all
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment