Sony's Developer World forum

    • Home
    • Forum guidelines

    What is the difference between "make clean" and "make distclean"?

    Spresense
    2
    5
    97
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gyps last edited by

      Excuse my simple question.
      I have a half-baked understanding that "make clean" clears the files generated by make, and "make distclean" initializes the config files in addition to those files.

      What files exactly are deleted? And specifically what makefiles do I need to look at to understand this?

      C 1 Reply Last reply Reply Quote
      • C
        CamilaSouza DeveloperWorld @gyps last edited by CamilaSouza

        Hi @gyps!

        Make clean removes most generated files but keeps the sdk config
        Make distclean removes all generated files + sdk config

        You can learn more about the types of make in the Makefile inside the sdk folder.
        Ex: make savedefconfig exports the current defconfig. Super useful!

        As an experiment I logged all the files that were deleted while using make clean and make distclean (after making hello example). Will post them here.

        C 1 Reply Last reply Reply Quote
        • C
          CamilaSouza DeveloperWorld @CamilaSouza last edited by

          Files deleted with make clean (after make with hello example):

          apps/ DELETE libapps.a
          apps/builtin/ DELETE builtin_list.h
          apps/builtin/ DELETE builtin_proto.h
          apps/builtin/ DELETE builtin_list.c.spresense.sdk.apps.builtin.o
          apps/builtin/ DELETE exec_builtin.c.spresense.sdk.apps.builtin.o
          apps/system/cle/ DELETE cle.c.spresense.sdk.apps.system.cle.o
          apps/system/nsh/ DELETE nsh_main.c.spresense.sdk.apps.system.nsh.o
          apps/system/nsh/ DELETE sh_main.c.spresense.sdk.apps.system.nsh.o
          apps/system/readline/ DELETE readline.c.spresense.sdk.apps.system.readline.o
          apps/system/readline/ DELETE readline_common.c.spresense.sdk.apps.system.readline.o
          apps/fsutils/mkfatfs/ DELETE configfat.c.spresense.sdk.apps.fsutils.mkfatfs.o
          apps/fsutils/mkfatfs/ DELETE mkfatfs.c.spresense.sdk.apps.fsutils.mkfatfs.o
          apps/fsutils/mkfatfs/ DELETE writefat.c.spresense.sdk.apps.fsutils.mkfatfs.o
          apps/fsutils/mksmartfs/ DELETE mksmartfs.c.spresense.sdk.apps.fsutils.mksmartfs.o
          apps/nshlib/ DELETE nsh_builtin.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_command.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_console.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_consolemain.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_dbgcmds.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_ddcmd.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_envcmds.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_fscmds.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_fsutils.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_init.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_mmcmds.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_mntcmds.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_netcmds.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_parse.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_proccmds.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_script.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_session.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_syscmds.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_system.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_test.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_timcmds.c.spresense.sdk.apps.nshlib.o
          apps/nshlib/ DELETE nsh_usbconsole.c.spresense.sdk.apps.nshlib.o
          apps/netutils/netinit/ DELETE netinit.c.spresense.sdk.apps.netutils.netinit.o
          apps/netutils/netlib/ DELETE netlib_ethaddrconv.c.spresense.sdk.apps.netutils.netlib.o
          apps/netutils/netlib/ DELETE netlib_getifstatus.c.spresense.sdk.apps.netutils.netlib.o
          apps/netutils/netlib/ DELETE netlib_getmacaddr.c.spresense.sdk.apps.netutils.netlib.o
          apps/netutils/netlib/ DELETE netlib_ipv4addrconv.c.spresense.sdk.apps.netutils.netlib.o
          apps/netutils/netlib/ DELETE netlib_parsehttpurl.c.spresense.sdk.apps.netutils.netlib.o
          apps/netutils/netlib/ DELETE netlib_setifstatus.c.spresense.sdk.apps.netutils.netlib.o
          apps/netutils/netlib/ DELETE netlib_setmacaddr.c.spresense.sdk.apps.netutils.netlib.o
          apps/spresense/ DELETE Kconfig
          system/lateinit/ DELETE lateinit.c.spresense.sdk.system.lateinit.o
          system/lateinit/ DELETE Make.dep
          apps/examples/hello/ DELETE Make.dep
          apps/system/nsh/ DELETE Make.dep
          apps/system/readline/ DELETE Make.dep
          apps/system/cle/ DELETE Make.dep
          apps/builtin/ DELETE Make.dep
          apps/netutils/netlib/ DELETE Make.dep
          apps/netutils/netinit/ DELETE Make.dep
          apps/platform/ DELETE Make.dep
          apps/fsutils/mksmartfs/ DELETE Make.dep
          apps/fsutils/mkfatfs/ DELETE Make.dep
          apps/nshlib/ DELETE Make.dep
          system/lateinit/ DELETE .depend
          apps/examples/hello/ DELETE .depend
          apps/system/nsh/ DELETE .depend
          apps/system/readline/ DELETE .depend
          apps/system/cle/ DELETE .depend
          apps/builtin/ DELETE .depend
          apps/ DELETE .depend
          apps/netutils/netlib/ DELETE .depend
          apps/netutils/netinit/ DELETE .depend
          apps/platform/ DELETE .depend
          apps/fsutils/mksmartfs/ DELETE .depend
          apps/fsutils/mkfatfs/ DELETE .depend
          apps/nshlib/ DELETE .depend
          apps/platform/ DELETE dummy.c.spresense.sdk.apps.platform.o
          apps/ DELETE Kconfig

          C 1 Reply Last reply Reply Quote
          • C
            CamilaSouza DeveloperWorld @CamilaSouza last edited by

            Files deleted with make distclean (after make with hello example and after make clean):

            apps/examples/ DELETE Kconfig
            apps/examples/ DELETE .kconfig
            apps/crypto/ DELETE Kconfig
            apps/crypto/ DELETE .kconfig
            apps/builtin/registry/ DELETE sh.pdat
            apps/builtin/registry/ DELETE nsh.pdat
            apps/builtin/registry/ DELETE hello.pdat
            apps/builtin/registry/ DELETE sh.bdat
            apps/builtin/registry/ DELETE hello.bdat
            apps/builtin/registry/ DELETE nsh.bdat
            apps/builtin/registry/ DELETE .updated
            apps/gpsutils/ DELETE Kconfig
            apps/gpsutils/ DELETE .kconfig
            apps/system/libuv/ DELETE Kconfig
            apps/system/libuv/ DELETE .kconfig
            apps/system/ DELETE Kconfig
            apps/system/ DELETE .kconfig
            apps/boot/ DELETE Kconfig
            apps/boot/ DELETE .kconfig
            apps/fsutils/ DELETE Kconfig
            apps/fsutils/ DELETE .kconfig
            apps/math/ DELETE Kconfig
            apps/math/ DELETE .kconfig
            apps/interpreters/ DELETE Kconfig
            apps/interpreters/ DELETE .kconfig
            apps/lte/ DELETE Kconfig
            apps/lte/ DELETE .kconfig
            apps/testing/ DELETE Kconfig
            apps/testing/ DELETE .kconfig
            apps/graphics/ DELETE Kconfig
            apps/graphics/ DELETE .kconfig
            apps/netutils/ DELETE Kconfig
            apps/netutils/ DELETE .kconfig
            modules/ DELETE Kconfig
            system/ DELETE Kconfig
            apps/canutils/ DELETE Kconfig
            apps/canutils/ DELETE .kconfig
            apps/wireless/bluetooth/ DELETE Kconfig
            apps/wireless/bluetooth/ DELETE .kconfig
            apps/wireless/ieee802154/ DELETE Kconfig
            apps/wireless/ieee802154/ DELETE .kconfig
            apps/wireless/ DELETE Kconfig
            apps/wireless/ DELETE .kconfig
            apps/industry/ DELETE Kconfig
            apps/industry/ DELETE .kconfig
            apps/platform/ DELETE board

            G 1 Reply Last reply Reply Quote
            • G
              gyps @CamilaSouza last edited by

              @CamilaSouza Thank you very much for your kind answer.
              Your answers are helpful to understand.

              1 Reply Last reply Reply Quote
              • First post
                Last post
              Developer World
              Copyright © 2021 Sony Group Corporation. All rights reserved.
              • Contact us
              • Legal