Based on input from Arndt Kritzner & Bernhard Fischer.
avahi: uclibc busybox libdaemon $(AVAHI_TARGETS)
avahi-clean:
- $(MAKE) -C $(AVAHI_DIR) distclean
+ -$(MAKE) -C $(AVAHI_DIR) distclean
-rm -rf $(TARGET_DIR)/etc/avahi
-rm -f $(TARGET_DIR)/var/lib/avahi-autoipd
-rm -f $(TARGET_DIR)/etc/init.d/S*avahi*
berkeleydb-headers: $(TARGET_DIR)/usr/lib/libdb.a
berkeleydb-clean:
- $(MAKE) -C $(DB_DIR)/build_unix clean
+ -$(MAKE) -C $(DB_DIR)/build_unix clean
berkeleydb-dirclean:
rm -rf $(DB_DIR)
boa-source: $(DL_DIR)/$(BOA_SOURCE)
boa-clean:
- @if [ -d $(BOA_WORKDIR)/Makefile ]; then \
- $(MAKE) -C $(BOA_WORKDIR) clean; \
- fi
+ -$(MAKE) -C $(BOA_WORKDIR) clean
+ rm -rf $(TARGET_DIR)/usr/sbin/boa \
+ $(TARGET_DIR)/usr/lib/boa/boa_indexer \
+ $(TARGET_DIR)/etc/mime.types $(TARGET_DIR)/etc/boa
boa-dirclean:
rm -rf $(BOA_DIR) $(BOA_WORKDIR)
dillo-source: $(DL_DIR)/$(DILLO_SOURCE)
dillo-clean:
- @if [ -d $(DILLO_DIR)/Makefile ]; then \
- $(MAKE) -C $(DILLO_DIR) clean; \
- fi
+ -$(MAKE) -C $(DILLO_DIR) clean
dillo-dirclean:
rm -rf $(DILLO_DIR)
dm: uclibc $(DM_TARGET_BINARY) $(DM_TARGET_LIBRARY) #$(DM_TARGET_HEADER)
dm-clean:
- rm $(DM_TARGET_BINARY) $(DM_TARGET_LIBRARY) \
+ rm -f $(DM_TARGET_BINARY) $(DM_TARGET_LIBRARY) \
$(DM_TARGET_LIBRARY).$(DM_BASEVER) $(DM_TARGET_HEADER)
- $(MAKE) -C $(DM_DIR) clean
+ -$(MAKE) -C $(DM_DIR) clean
dm-dirclean:
rm -rf $(DM_DIR)
dmalloc: uclibc $(TARGET_DIR)/$(DMALLOC_TARGET_BINARY)
dmalloc-clean:
- rm -f $(TARGET_DIR)/usr/lib/libdmalloc*
- rm -f $(STAGING_DIR)/usr/lib/libdmalloc*
+ -rm -f $(TARGET_DIR)/usr/lib/libdmalloc*
+ -rm -f $(STAGING_DIR)/usr/lib/libdmalloc*
rm -f $(STAGING_DIR)/usr/include/dmalloc.h
rm -f $(TARGET_DIR)/$(DMALLOC_TARGET_BINARY)
- $(MAKE) -C $(DMALLOC_DIR) clean
+ -$(MAKE) -C $(DMALLOC_DIR) clean
dmalloc-dirclean:
rm -rf $(DMALLOC_DIR)
dmraid-clean:
rm -f $(DMRAID_TARGET_BINARY) $(TARGET_DIR)/etc/init.d/dmraid
- $(MAKE) -C $(DMRAID_DIR) clean
+ -$(MAKE) -C $(DMRAID_DIR) clean
dmraid-dirclean:
rm -rf $(DMRAID_DIR)
dropbear: uclibc zlib $(TARGET_DIR)/$(DROPBEAR_TARGET_BINARY)
dropbear-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) $(TARGET_CONFIGURE_OPTS) \
- LD=$(TARGET_CC) -C $(DROPBEAR_DIR) uninstall
-$(MAKE) -C $(DROPBEAR_DIR) clean
+ rm -f $(TARGET_DIR)/$(DROPBEAR_TARGET_BINARY)
+ rm -f $(TARGET_DIR)/usr/bin/{scp,ssh,dbclient,dropbearkey,dropbearconvert}
+ rm -f $(TARGET_DIR)/etc/init.d/S50dropbear
dropbear-dirclean:
rm -rf $(DROPBEAR_DIR)
host-fakeroot: uclibc $(STAGING_DIR)/usr/bin/fakeroot
host-fakeroot-clean:
- $(MAKE) -C $(FAKEROOT_DIR1) clean
+ -$(MAKE) -C $(FAKEROOT_DIR1) clean
host-fakeroot-dirclean:
rm -rf $(FAKEROOT_DIR1)
fakeroot: uclibc $(TARGET_DIR)/usr/bin/fakeroot
fakeroot-clean:
- $(MAKE) -C $(FAKEROOT_DIR2) clean
+ -$(MAKE) -C $(FAKEROOT_DIR2) clean
rm -f $(TARGET_DIR)/usr/bin/fake{d,root}
fakeroot-dirclean:
host-file: $(TOOL_BUILD_DIR)/bin/file
host-file-clean:
- $(MAKE) -C $(FILE_DIR1) clean
+ -$(MAKE) -C $(FILE_DIR1) clean
host-file-dirclean:
rm -rf $(FILE_DIR1)
iperf-source: $(DL_DIR)/$(IPERF_SOURCE)
iperf-clean:
- @if [ -d $(IPERF_KDIR)/Makefile ]; then \
- $(MAKE) -C $(IPERF_DIR) clean; \
- fi
+ rm -f $(TARGET_DIR)/usr/bin/iperf
+ -$(MAKE) -C $(IPERF_DIR) clean
iperf-dirclean:
rm -rf $(IPERF_DIR)
ipsec-tools-uninstall:
ipsec-tools-clean:
- $(MAKE) -C $(IPSEC_TOOLS_DIR) DESTDIR=$(TARGET_DIR) uninstall
- $(MAKE) -C $(IPSEC_TOOLS_DIR) clean
+ -$(MAKE) -C $(IPSEC_TOOLS_DIR) DESTDIR=$(TARGET_DIR) uninstall
+ -$(MAKE) -C $(IPSEC_TOOLS_DIR) clean
ifeq ($(strip $(BR2_PACKAGE_IPSEC_TOOLS_LIBS)),y)
rm -f $(addprefix $(STAGING_DIR)/lib/, \
libipsec.a libipsec.la libracoon.a libracoon.la)
rm -f $(IPSEC_TOOLS_DIR)/.configured
ipsec-tools-dirclean:
- @echo $(LINUX_DIR)
rm -rf $(IPSEC_TOOLS_DIR)
ifeq ($(strip $(BR2_PACKAGE_IPSEC_TOOLS)), y)
libeXosip2-source: $(DL_DIR)/$(LIBEXOSIP2_SOURCE)
libeXosip2-clean:
- @if [ -d $(LIBEXOSIP2_DIR)/Makefile ]; then \
- $(MAKE) -C $(LIBEXOSIP2_DIR) clean; \
- fi
- rm -f $(STAGING_DIR)/usr/lib/libeXosip2.*
- rm -f $(TARGET_DIR)/usr/lib/libeXosip2.*
+ -$(MAKE) -C $(LIBEXOSIP2_DIR) clean
+ -rm -f $(STAGING_DIR)/usr/lib/libeXosip2.*
+ -rm -f $(TARGET_DIR)/usr/lib/libeXosip2.*
libeXosip2-dirclean:
$(LIBFLOAT_DIR)/.unpacked: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH)
$(LIBFLOAT_CAT) $(DL_DIR)/$(LIBFLOAT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
# Remove the binary files distributed with the the package.
- $(MAKE) -C $(LIBFLOAT_DIR) clean
+ -$(MAKE) -C $(LIBFLOAT_DIR) clean
toolchain/patch-kernel.sh $(LIBFLOAT_DIR) $(DL_DIR) $(LIBFLOAT_PATCH)
toolchain/patch-kernel.sh $(LIBFLOAT_DIR) package/libfloat/ libfloat\*.patch
touch $@
ifneq ($(BR2_HAVE_MANPAGES),y)
rm -rf $(STAGING_DIR)/usr/share/man
endif
- $(MAKE) -C $(LIBLOCKFILE_DIR) clean
+ -$(MAKE) -C $(LIBLOCKFILE_DIR) clean
liblockfile-dirclean:
rm -rf $(LIBLOCKFILE_DIR)
libmad-source: $(DL_DIR)/$(LIBMAD_SOURCE)
libmad-clean:
- @if [ -d $(LIBMAD_DIR)/Makefile ]; then \
- $(MAKE) -C $(LIBMAD_DIR) clean; \
- fi
- rm -f $(STAGING_DIR)/usr/lib/libmad.*
+ -$(MAKE) -C $(LIBMAD_DIR) clean
+ -rm -f $(STAGING_DIR)/usr/lib/libmad.*
rm -f $(STAGING_DIR)/usr/include/mad.h
- rm -f $(TARGET_DIR)/usr/lib/libmad.*
+ -rm -f $(TARGET_DIR)/usr/lib/libmad.*
rm -f $(TARGET_DIR)/usr/include/mad.h
libosip2-source: $(DL_DIR)/$(LIBOSIP2_SOURCE)
libosip2-clean:
- @if [ -d $(LIBOSIP2_DIR)/Makefile ]; then \
- $(MAKE) -C $(LIBOSIP2_DIR) clean; \
- fi
- rm -f $(STAGING_DIR)/usr/lib/libosip2.*
- rm -f $(TARGET_DIR)/usr/lib/libosip2.*
-
+ -$(MAKE) -C $(LIBOSIP2_DIR) clean
+ -rm -f $(STAGING_DIR)/usr/lib/libosip2.*
+ -rm -f $(STAGING_DIR)/usr/lib/libosipparser2.*
+ -rm -f $(TARGET_DIR)/usr/lib/libosip2.*
+ -rm -f $(TARGET_DIR)/usr/lib/libosipparser2.*
libosip2-dirclean:
rm -rf $(LIBOSIP2_DIR)
install -c $(LINKS_DIR)/links $(TARGET_DIR)/usr/bin/links
links-clean:
- $(MAKE) -C $(LINKS_DIR) clean
+ -$(MAKE) -C $(LINKS_DIR) clean
+ rm -f $(TARGET_DIR)/usr/bin/links
links-dirclean:
rm -rf $(LINKS_DIR)
lockfile-progs: uclibc liblockfile $(TARGET_DIR)/$(LOCKFILE_PROGS_BINARY)
lockfile-progs-clean:
- rm -f $(TARGET_DIR)/usr/bin/lockfile-*
- $(MAKE) -C $(LOCKFILE_PROGS_DIR) clean
+ -rm -f $(TARGET_DIR)/usr/bin/lockfile-*
+ -$(MAKE) -C $(LOCKFILE_PROGS_DIR) clean
lockfile-progs-dirclean:
rm -rf $(LOCKFILE_PROGS_DIR)
ltp-testsuite: uclibc host-fakeroot $(LTP_TESTSUITE_DIR)/.installed
ltp-testsuite-clean:
- $(MAKE) -C $(LTP_TESTSUITE_DIR) clean
+ -$(MAKE) -C $(LTP_TESTSUITE_DIR) clean
ltp-testsuite-dirclean:
rm -rf $(LTP_TESTSUITE_DIR)
host-ltt-tracevisualizer: $(TOOL_BUILD_DIR)/bin/tracevisualizer
host-ltt-clean:
- $(MAKE) -C $(LTT_DIR1) clean
+ -$(MAKE) -C $(LTT_DIR1) clean
host-ltt-dirclean:
rm -rf $(LTT_DIR1)
LUA_DIR=$(BUILD_DIR)/lua-$(LUA_VERSION)
-LUA_CFLAGS=-DLUA_USE_LINUX
+LUA_CFLAGS=-DLUA_USE_LINUX
LUA_MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
$(DL_DIR)/$(LUA_SOURCE):
cp -dpf $(STAGING_DIR)/usr/bin/luac $(TARGET_DIR)/usr/bin/luac
-lua-bins: $(TARGET_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/luac
+lua-bins: $(TARGET_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/luac
lua-libs: $(TARGET_DIR)/usr/lib/liblua.a
lua-source: $(DL_DIR)/$(LUA_SOURCE)
lua-clean:
- @if [ -d $(LUA_DIR)/Makefile ]; then \
- $(MAKE) -C $(LUA_DIR) clean; \
- fi
+ rm -f $(STAGING_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/luac
+ rm -f $(STAGING_DIR)/usr/lib/liblua.a
+ rm -f $(TARGET_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/luac
+ rm -f $(TARGET_DIR)/usr/lib/liblua.a
+ -$(MAKE) -C $(LUA_DIR) clean
lua-dirclean:
rm -rf $(LUA_DIR)
madplay-clean:
rm -f $(TARGET_DIR)/$(MADPLAY_TARGET_BIN)
- $(MAKE) -C $(MADPLAY_DIR) clean
+ -$(MAKE) -C $(MADPLAY_DIR) clean
madplay-dirclean:
rm -rf $(MADPLAY_DIR)
nbd-source: $(DL_DIR)/$(NBD_SOURCE)
nbd-clean:
- @if [ -d $(NBD_DIR)/Makefile ]; then \
- $(MAKE) -C $(NBD_DIR) clean; \
- fi
+ rm -f $(TARGET_DIR)/sbin/nbd-client
+ -$(MAKE) -C $(NBD_DIR) clean
nbd-dirclean:
rm -rf $(NBD_DIR)
ncftp: uclibc $(addprefix $(TARGET_DIR)/usr/bin/, $(NCFTP_TARGET_BINS))
ncftp-clean:
- $(MAKE) -C $(NCFTP_DIR) clean
+ -$(MAKE) -C $(NCFTP_DIR) clean
rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(NCFTP_TARGET_BINS))
ncftp-dirclean:
netsnmp-source: $(DL_DIR)/$(NETSNMP_SOURCE)
netsnmp-clean:
- $(MAKE) PREFIX=$(TARGET_DIR) INSTALL_PREFIX=$(TARGET_DIR) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETSNMP_DIR) uninstall
- $(MAKE) -C $(NETSNMP_DIR) clean
- rm -rf $(TARGET_DIR)/etc/snmp/{snmpd{,trapd},mib2c*}.conf \
+ -$(MAKE) PREFIX=$(TARGET_DIR) INSTALL_PREFIX=$(TARGET_DIR) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETSNMP_DIR) uninstall
+ -$(MAKE) -C $(NETSNMP_DIR) clean
+ -rm -rf $(TARGET_DIR)/etc/snmp/{snmpd{,trapd},mib2c*}.conf \
$(TARGET_DIR)/etc/default/snmpd \
$(TARGET_DIR)/usr/include/net-snmp
openssh-source: $(DL_DIR)/$(OPENSSH_SOURCE)
openssh-clean:
- $(MAKE) -C $(OPENSSH_DIR) clean
- $(MAKE) CC=$(TARGET_CC) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) uninstall
+ -$(MAKE) -C $(OPENSSH_DIR) clean
+ -$(MAKE) CC=$(TARGET_CC) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) uninstall
openssh-dirclean:
rm -rf $(OPENSSH_DIR)
openssl-source: $(DL_DIR)/$(OPENSSL_SOURCE)
openssl-clean:
- $(MAKE) -C $(OPENSSL_DIR) clean
+ -$(MAKE) -C $(OPENSSL_DIR) clean
rm -f $(STAGING_DIR)/usr/bin/openssl $(TARGET_DIR)/usr/bin/openssl
- rm -f $(STAGING_DIR)/usr/lib/libcrypto.so* $(TARGET_DIR)/usr/lib/libcrypto.so*
- rm -f $(STAGING_DIR)/usr/lib/libssl.so* $(TARGET_DIR)/usr/lib/libssl.so*
+ -rm -f $(STAGING_DIR)/usr/lib/libcrypto.so* $(TARGET_DIR)/usr/lib/libcrypto.so*
+ -rm -f $(STAGING_DIR)/usr/lib/libssl.so* $(TARGET_DIR)/usr/lib/libssl.so*
rm -rf $(STAGING_DIR)/usr/include/openssl $(TARGET_DIR)/usr/include/openssl
openssl-dirclean:
$(MAKE) python Parser/pgen && \
mv python hostpython && \
mv Parser/pgen Parser/hostpgen && \
- $(MAKE) distclean \
+ -$(MAKE) distclean \
) && \
touch $@
python-clean:
-$(MAKE) -C $(PYTHON_DIR) distclean
- rm $(PYTHON_DIR)/.configured $(TARGET_DIR)/$(PYTHON_TARGET_BINARY)
+ rm -f $(PYTHON_DIR)/.configured $(TARGET_DIR)/$(PYTHON_TARGET_BINARY)
+ -rm -rf $(TARGET_DIR)/usr/lib/python* $(TARGET_DIR)/usr/include/python*
python-dirclean:
rm -rf $(PYTHON_DIR)
$(RDESKTOP_DIR)/rdesktop: $(RDESKTOP_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(RDESKTOP_DIR)
-$(RDESKTOP_DIR)/.installed: $(RDESKTOP_DIR)/rdesktop
- cp $(RDESKTOP_DIR)/rdesktop $(TARGET_DIR)/usr/bin
- touch $(RDESKTOP_DIR)/.installed
+$(TARGET_DIR)/usr/bin/rdesktop: $(RDESKTOP_DIR)/rdesktop
+ cp $^ $@
-rdesktop: uclibc openssl $(XSERVER) $(RDESKTOP_DIR)/.installed
+rdesktop: uclibc openssl $(XSERVER) $(TARGET_DIR)/usr/bin/rdesktop
rdesktop-source: $(DL_DIR)/$(RDESKTOP_SOURCE)
rdesktop-clean:
- @if [ -d $(RDESKTOP_DIR)/Makefile ]; then \
- $(MAKE) -C $(RDESKTOP_DIR) clean; \
- fi
+ -$(MAKE) -C $(RDESKTOP_DIR) clean
+ rm -f $(TARGET_DIR)/usr/bin/rdesktop
rdesktop-dirclean:
rm -rf $(RDESKTOP_DIR) $(RDESKTOP_DIR)
rm -f $@
$(MAKE) -C $(SOCAT_WORKDIR)
-$(SOCAT_WORKDIR)/.installed: $(SOCAT_WORKDIR)/socat
+$(TARGET_DIR)/usr/bin/socat: $(SOCAT_WORKDIR)/socat
mkdir -p $(TARGET_DIR)/usr/man/man1
$(MAKE) -C $(SOCAT_WORKDIR) install prefix=$(TARGET_DIR)/usr DESTDIR=$(TARGET_DIR)
touch $@
-socat: uclibc $(SOCAT_WORKDIR)/.installed
+socat: uclibc $(TARGET_DIR)/usr/bin/socat
socat-source: $(DL_DIR)/$(SOCAT_SOURCE)
socat-clean:
- @if [ -d $(SOCAT_WORKDIR)/Makefile ]; then \
- $(MAKE) -C $(SOCAT_WORKDIR) clean; \
- fi
+ -$(MAKE) -C $(SOCAT_WORKDIR) clean
+ rm -f $(TARGET_DIR)/usr/bin/{socat,filan,procan}
socat-dirclean:
rm -rf $(SOCAT_DIR) $(SOCAT_WORKDIR)
$(TARGET_DIR)/usr/lib/libspeex.so: $(TARGET_DIR)/usr/bin/speexenc
cp -dpf $(STAGING_DIR)/usr/lib/libspeex.so* $(TARGET_DIR)/usr/lib
-speex-bins:
+speex-bins:
speex: uclibc libogg $(TARGET_DIR)/usr/lib/libspeex.so
speex-source: $(DL_DIR)/$(SPEEX_SOURCE)
speex-clean:
- @if [ -d $(SPEEX_DIR)/Makefile ]; then \
- $(MAKE) -C $(SPEEX_DIR) clean; \
- fi
+ -$(MAKE) -C $(SPEEX_DIR) clean
+ -rm -f $(STAGING_DIR)/usr/lib/libspeex.so*
+ rm -f $(STAGING_DIR)/usr/bin/speexenc $(STAGING_DIR)/usr/bin/speexdec
+ -rm -f $(TARGET_DIR)/usr/lib/libspeex.so*
+ rm -f $(TARGET_DIR)/usr/bin/speexenc $(TARGET_DIR)/usr/bin/speexdec
+
speex-dirclean:
rm -rf $(SPEEX_DIR)
sqlite-source: $(DL_DIR)/$(SQLITE_SOURCE)
sqlite-clean:
- @if [ -d $(SQLITE_DIR)/Makefile ]; then \
- $(MAKE) -C $(SQLITE_DIR) clean; \
- fi
+ -$(MAKE) -C $(SQLITE_DIR) clean
+ -rm -rf $(STAGING_DIR)/usr/lib/libsqlite*
+ -rm -rf $(STAGING_DIR)/usr/bin/sqlite3
+ -rm -rf $(TARGET_DIR)/usr/lib/libsqlite*
+ -rm -rf $(TARGET_DIR)/usr/bin/sqlite3
sqlite-dirclean:
rm -rf $(SQLITE_DIR)
strace-clean:
rm -f $(TARGET_DIR)/usr/bin/strace
- $(MAKE) -C $(STRACE_DIR) clean
+ -$(MAKE) -C $(STRACE_DIR) clean
strace-dirclean:
rm -rf $(STRACE_DIR)
stunnel: uclibc $(TARGET_DIR)/usr/bin/stunnel
stunnel-clean:
- $(MAKE) -C $(STUNNEL_DIR) clean
+ -$(MAKE) -C $(STUNNEL_DIR) clean
+ rm -f $(TARGET_DIR)/usr/bin/stunnel
stunnel-dirclean:
rm -rf $(STUNNEL_DIR)
tinyhttpd: uclibc $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY)
tinyhttpd-clean:
- $(MAKE) -C $(TINYHTTPD_DIR) clean
+ -$(MAKE) -C $(TINYHTTPD_DIR) clean
@rm -f $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY)
@rm -f $(TARGET_DIR)/etc/init.d/S85tinyhttpd
@rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/var/www
tn5250-source: $(DL_DIR)/$(TN5250_SOURCE)
tn5250-clean:
- $(MAKE) -C $(TN5250_DIR) clean
+ -$(MAKE) -C $(TN5250_DIR) clean
+ rm -f $(TARGET_DIR)/usr/bin/tn5250
tn5250-dirclean:
rm -rf $(TN5250_DIR)
valgrind-source: $(DL_DIR)/$(VALGRIND_SOURCE)
valgrind-clean:
- $(MAKE) -C $(VALGRIND_DIR) clean
+ -$(MAKE) -C $(VALGRIND_DIR) clean
+ -rm -f $(TARGET_DIR)/usr/bin/valgrind*
+ rm -rf $(TARGET_DIR)/usr/lib/valgrind
valgrind-dirclean:
rm -rf $(VALGRIND_DIR)