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>
This commit is contained in:
commit
b206acf1ff
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user