Skip to content

Commit

Permalink
makefile/build: Delete unnecessary bin and kbin folders
Browse files Browse the repository at this point in the history
1. Calling CLEAN on these folders did not have any effect
2. bin,kbin will be created during the context construction process

Signed-off-by: wangmingrong1 <[email protected]>
  • Loading branch information
W-M-R authored and xiaoxiang781216 committed Nov 9, 2024
1 parent 09b299d commit 6dd3139
Show file tree
Hide file tree
Showing 19 changed files with 41 additions and 444 deletions.
16 changes: 9 additions & 7 deletions libs/libc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,13 @@ endif

# Context

context::
bin:
$(Q) mkdir $@

kbin:
$(Q) mkdir $@

context:: bin kbin
ifeq ($(CONFIG_LIBC_ZONEINFO_ROMFS),y)
$(Q) $(MAKE) -C zoneinfo context BIN=$(BIN)
endif
Expand Down Expand Up @@ -203,8 +209,6 @@ depend:: .depend
# Clean most derived files, retaining the configuration

clean::
$(Q) $(MAKE) -C bin clean
$(Q) $(MAKE) -C kbin clean
$(Q) $(MAKE) -C zoneinfo clean BIN=$(BIN)
$(call DELFILE, $(BIN))
$(call DELFILE, $(KBIN))
Expand All @@ -213,13 +217,11 @@ clean::
# Deep clean -- removes all traces of the configuration

distclean:: clean
$(Q) $(MAKE) -C bin distclean
$(Q) $(MAKE) -C kbin distclean
$(Q) $(MAKE) -C zoneinfo distclean BIN=$(BIN)
$(call DELFILE, exec_symtab.c)
$(call DELFILE, bin$(DELIM)Make.dep)
$(call DELFILE, kbin$(DELIM)Make.dep)
$(call DELFILE, .depend)
$(call DELDIR, bin)
$(call DELDIR, kbin)

-include bin$(DELIM)Make.dep
-include kbin$(DELIM)Make.dep
21 changes: 0 additions & 21 deletions libs/libc/bin/CMakeLists.txt

This file was deleted.

35 changes: 0 additions & 35 deletions libs/libc/bin/Makefile

This file was deleted.

22 changes: 0 additions & 22 deletions libs/libc/kbin/CMakeLists.txt

This file was deleted.

35 changes: 0 additions & 35 deletions libs/libc/kbin/Makefile

This file was deleted.

16 changes: 10 additions & 6 deletions libs/libm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,26 @@ endif

depend: .depend

bin:
$(Q) mkdir $@

kbin:
$(Q) mkdir $@

context: bin kbin

# Clean most derived files, retaining the configuration

clean:
$(Q) $(MAKE) -C bin clean
$(Q) $(MAKE) -C kbin clean
$(call DELFILE, $(BIN))
$(call DELFILE, $(KBIN))
$(call CLEAN)

# Deep clean -- removes all traces of the configuration

distclean:: clean
$(Q) $(MAKE) -C bin distclean
$(Q) $(MAKE) -C kbin distclean
$(call DELFILE, bin$(DELIM)Make.dep)
$(call DELFILE, kbin$(DELIM)Make.dep)
$(call DELDIR, bin)
$(call DELDIR, kbin)
$(call DELFILE, .depend)

-include bin$(DELIM)Make.dep
Expand Down
35 changes: 0 additions & 35 deletions libs/libm/bin/Makefile

This file was deleted.

35 changes: 0 additions & 35 deletions libs/libm/kbin/Makefile

This file was deleted.

18 changes: 10 additions & 8 deletions libs/libnx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,17 @@ depend: .depend

# Generate configuration context

context: gensources
bin:
$(Q) mkdir $@

kbin:
$(Q) mkdir $@

context:: gensources bin kbin

# Clean most derived files, retaining the configuration

clean:
$(Q) $(MAKE) -C bin clean
$(Q) $(MAKE) -C kbin clean
$(Q) $(MAKE) -C nxfonts -f Makefile.sources clean EXTRAFLAGS="$(EXTRAFLAGS)"
$(call DELFILE, $(BIN))
$(call DELFILE, $(KBIN))
Expand All @@ -256,12 +260,10 @@ clean:
# Deep clean -- removes all traces of the configuration

distclean: clean
$(Q) $(MAKE) -C bin distclean
$(Q) $(MAKE) -C kbin distclean
$(Q) $(MAKE) -C nxfonts -f Makefile.sources distclean EXTRAFLAGS="$(EXTRAFLAGS)"
$(call DELFILE, bin/Make.dep)
$(call DELFILE, kbin/Make.dep)
$(call DELDIR, bin)
$(call DELDIR, kbin)
$(call DELFILE, .depend)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources distclean EXTRAFLAGS="$(EXTRAFLAGS)"

-include bin/Make.dep
-include kbin/Make.dep
22 changes: 0 additions & 22 deletions libs/libnx/bin/CMakeLists.txt

This file was deleted.

35 changes: 0 additions & 35 deletions libs/libnx/bin/Makefile

This file was deleted.

22 changes: 0 additions & 22 deletions libs/libnx/kbin/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 6dd3139

Please sign in to comment.