Browse Source

another round of 'make distclean' fixing

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Thorsten Glaser 15 years ago
parent
commit
95c40793aa
2 changed files with 7 additions and 2 deletions
  1. 3 1
      config/Makefile
  2. 4 1
      mk/build.mk

+ 3 - 1
config/Makefile

@@ -1,7 +1,9 @@
 # This file is part of the OpenADK project. OpenADK is copyrighted
 # material, please see the LICENCE file in the top-level directory.
 
+ifneq ($(filter-out clean,${MAKECMDGOALS}),)
 include ${TOPDIR}/rules.mk
+endif
 
 CP=cp -fpR
 HOSTCFLAGS+=-DKBUILD_NO_NLS
@@ -124,5 +126,5 @@ ncurses:
 	fi
 
 clean:
-	rm -f *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) \
+	rm -f *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) zconf.hash.c \
 		conf mconf zconf.tab.c zconf.tab.h lex.zconf.c lkc_defs.h

+ 4 - 1
mk/build.mk

@@ -40,6 +40,7 @@ DEFCONFIG= 		ADK_DEVELSYSTEM=n \
 noconfig_targets:=	menuconfig \
 			_config \
 			_mconfig \
+			distclean \
 			tags
 
 MAKECLEAN_SYMBOLS=	ADK_TARGET_LIB_UCLIBC \
@@ -211,9 +212,11 @@ distclean:
 	rm -f .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
 	    ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk
 
-else # ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
+else # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
 
+ifneq ($(filter-out distclean,${MAKECMDGOALS}),)
 include $(TOPDIR)/prereq.mk
+endif
 
 all: menuconfig
 	@echo "Start the build with \"make\" or with \"make v\" to be verbose"