Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Commit

Permalink
build: remove dependencies from various install recipes, to reduce th…
Browse files Browse the repository at this point in the history
…e amount of double (and triple) recompile duing build
  • Loading branch information
RMerl committed Jul 24, 2017
1 parent c798ac2 commit 01c62f7
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions release/src/router/Makefile
Expand Up @@ -1586,7 +1586,7 @@ openssl-1.0.0q-clean:
[ ! -f openssl-1.0.0q/Makefile ] || $(MAKE) -C openssl-1.0.0q clean
@rm -f openssl-1.0.0q/Makefile

openssl-1.0.0q-install: openssl-1.0.0q
openssl-1.0.0q-install:
install -D openssl-1.0.0q/libcrypto-1.0.0q.so.1.0.0 $(INSTALLDIR)/openssl-1.0.0q/usr/lib/libcrypto-1.0.0q.so.1.0.0
$(STRIP) $(INSTALLDIR)/openssl-1.0.0q/usr/lib/libcrypto-1.0.0q.so.1.0.0
cd $(INSTALLDIR)/openssl-1.0.0q/usr/lib && ln -sf libcrypto-1.0.0q.so.1.0.0 libcrypto-1.0.0q.so
Expand Down Expand Up @@ -1623,7 +1623,7 @@ openssl-clean:
[ ! -f openssl/Makefile ] || $(MAKE) -C openssl clean
@rm -f openssl/Makefile

openssl-install: openssl
openssl-install:
install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
$(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
Expand Down Expand Up @@ -1904,7 +1904,7 @@ iptables-1.4.21: iptables-1.4.21/Makefile
@$(SEP)
$(MAKE) -C $@ KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"

iptables-1.4.21-install: iptables-1.4.21
iptables-1.4.21-install:
install -D iptables-1.4.21/iptables/.libs/xtables-multi $(INSTALLDIR)/iptables-1.4.21/usr/sbin/xtables-multi
cd $(INSTALLDIR)/iptables-1.4.21/usr/sbin && \
ln -sf xtables-multi iptables-restore && \
Expand Down Expand Up @@ -1942,7 +1942,7 @@ iptables-1.4.x: iptables-1.4.x/Makefile libnfnetlink
CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/libnfnetlink/include" \
LDFLAGS="-L$(TOP)/libnfnetlink/src/.libs -lnfnetlink"

iptables-1.4.x-install: iptables-1.4.x
iptables-1.4.x-install:
install -D iptables-1.4.x/iptables/.libs/xtables-multi $(INSTALLDIR)/iptables-1.4.x/usr/sbin/xtables-multi
cd $(INSTALLDIR)/iptables-1.4.x/usr/sbin && \
ln -sf xtables-multi iptables-save && \
Expand Down Expand Up @@ -2075,7 +2075,7 @@ else
endif
$(MAKE) -C vsftpd

vsftpd-install: vsftpd
vsftpd-install:
install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
$(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd

Expand All @@ -2088,7 +2088,7 @@ else
endif
$(MAKE) -C $@

vsftpd-3.x-install: vsftpd-3.x
vsftpd-3.x-install:
install -D vsftpd-3.x/vsftpd $(INSTALLDIR)/vsftpd-3.x/usr/sbin/vsftpd
$(STRIP) -s $(INSTALLDIR)/vsftpd-3.x/usr/sbin/vsftpd

Expand Down Expand Up @@ -2854,7 +2854,7 @@ iproute2:
@$(SEP)
@$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(RTCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)" $(PARALLEL_BUILD)

iproute2-install: iproute2
iproute2-install:
install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/realtc
$(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
Expand All @@ -2866,7 +2866,7 @@ iproute2-3.x: kernel_header iptables-1.4.x
@$(SEP)
@$(MAKE) -C $@ IPTABLES_DIR=$(TOP)/iptables-1.4.x KERNEL_INCLUDE=$(TOP)/kernel_header/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(RTCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)" && $(MAKE) -C $@ stage

iproute2-3.x-install: iproute2-3.x
iproute2-3.x-install:
install -D iproute2-3.x/tc/tc $(INSTALLDIR)/iproute2-3.x/usr/sbin/tc
install -D iproute2-3.x/tc/tc $(INSTALLDIR)/iproute2-3.x/usr/sbin/realtc
$(STRIP) $(INSTALLDIR)/iproute2-3.x/usr/sbin/tc
Expand Down Expand Up @@ -2946,7 +2946,7 @@ sqlite-clean:
-@$(MAKE) -C sqlite clean
@rm -f sqlite/stamp-h1

sqlite-install: sqlite
sqlite-install:
@$(SEP)

# commented out for mt-daapd-svn-1696
Expand Down Expand Up @@ -3000,7 +3000,7 @@ ffmpeg-clean:
-@$(MAKE) -C ffmpeg clean
@rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak

ffmpeg-install: ffmpeg
ffmpeg-install:
@$(SEP)
ifneq ($(MEDIA_SERVER_STATIC),y)
install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
Expand All @@ -3025,7 +3025,7 @@ libogg-clean:
-@$(MAKE) -C libogg clean
@rm -f libogg/stamp-h1

libogg-install: libogg
libogg-install:
@$(SEP)
ifneq ($(MEDIA_SERVER_STATIC),y)
install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
Expand All @@ -3049,7 +3049,7 @@ flac-clean:
-@$(MAKE) -C flac clean
@rm -f flac/stamp-h1

flac-install: flac
flac-install:
@$(SEP)
ifneq ($(MEDIA_SERVER_STATIC),y)
install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
Expand All @@ -3068,7 +3068,7 @@ jpeg-clean:
-@$(MAKE) -C jpeg clean
@rm -f jpeg/stamp-h1

jpeg-install: jpeg
jpeg-install:
@$(SEP)
ifneq ($(MEDIA_SERVER_STATIC),y)
install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
Expand All @@ -3089,7 +3089,7 @@ libexif-clean:
-@$(MAKE) -C libexif clean
@rm -f libexif/stamp-h1

libexif-install: libexif
libexif-install:
@$(SEP)
ifneq ($(MEDIA_SERVER_STATIC),y)
install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
Expand All @@ -3109,7 +3109,7 @@ zlib-clean:
-@$(MAKE) -C zlib clean
@rm -f zlib/stamp-h1

zlib-install: zlib
zlib-install:
@$(SEP)
# commented out for mt-daapd-svn-1696
ifneq ($(MEDIA_SERVER_STATIC),y)
Expand Down Expand Up @@ -3138,7 +3138,7 @@ libid3tag-clean:
-@$(MAKE) -C libid3tag clean
@rm -f libid3tag/stamp-h1

libid3tag-install: libid3tag
libid3tag-install:
@$(SEP)
#commented out for mt-daapd-svn-1696
ifneq ($(MEDIA_SERVER_STATIC),y)
Expand All @@ -3164,7 +3164,7 @@ libvorbis-clean:
-@$(MAKE) -C libvorbis clean
@rm -f libvorbis/stamp-h1

libvorbis-install: libvorbis
libvorbis-install:
@$(SEP)
ifneq ($(MEDIA_SERVER_STATIC),y)
install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
Expand Down Expand Up @@ -3230,7 +3230,7 @@ libgdbm-clean:
-@$(MAKE) -C libgdbm clean
@rm -f libgdbm/stamp-h1

libgdbm-install: libgdbm
libgdbm-install:
@$(SEP)
ifneq ($(MEDIA_SERVER_STATIC),y)
install -D libgdbm/.libs/libgdbm.so.3.0.0 $(INSTALLDIR)/libgdbm/usr/lib/libgdbm.so.3.0.0
Expand Down Expand Up @@ -3533,7 +3533,7 @@ lzo-clean:
-@$(MAKE) -C lzo clean
@rm -f lzo/stamp-h1

lzo-install: lzo
lzo-install:
install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
$(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
Expand All @@ -3551,7 +3551,7 @@ openpam-configure:
--without-doc --with-pam-unix \
)

openpam-install: openpam
openpam-install:
install -D openpam/lib/libpam/.libs/libpam.so.2.0.0 $(INSTALLDIR)/openpam/usr/lib/libpam.so.2
$(STRIP) -s $(INSTALLDIR)/openpam/usr/lib/libpam.so.2
install -D openpam/modules/pam_unix/.libs/pam_unix.so.2.0.0 $(INSTALLDIR)/openpam/usr/lib/pam_unix.so
Expand Down Expand Up @@ -3587,7 +3587,7 @@ openvpn-clean:
[ ! -f openvpn/Makefile ] || $(MAKE) -C openvpn clean
@rm -f openvpn/Makefile

openvpn-install: openvpn
openvpn-install:
install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
$(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
Expand Down Expand Up @@ -3756,7 +3756,7 @@ pcre-8.31/stamp-h1:

pcre-8.31: pcre-8.31/stamp-h1

pcre-8.31-install: pcre-8.31
pcre-8.31-install:
@$(SEP)
install -D pcre-8.31/.libs/libpcre.so.1.0.1 $(INSTALLDIR)/pcre-8.31/usr/lib/libpcre.so.1.0.1
cd $(INSTALLDIR)/pcre-8.31/usr/lib && ln -sf libpcre.so.1.0.1 libpcre.so.1
Expand All @@ -3780,7 +3780,7 @@ libxml2/stamp-h1:
libxml2: libxml2/stamp-h1
$(MAKE) -C libxml2 all $(PARALLEL_BUILD)

libxml2-install: libxml2
libxml2-install:
@$(SEP)
install -D libxml2/.libs/libxml2.so.2 $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2
$(STRIP) $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2
Expand All @@ -3799,7 +3799,7 @@ libiconv-1.14/stamp-h1:
libiconv-1.14:libiconv-1.14/stamp-h1
@$(MAKE) -C libiconv-1.14

libiconv-1.14-install: libiconv-1.14
libiconv-1.14-install:
@$(SEP)
install -D libiconv-1.14/lib/.libs/libiconv.so.2.5.1 $(INSTALLDIR)/libiconv-1.14/usr/lib/libiconv.so.2.5.1
$(STRIP) $(INSTALLDIR)/libiconv-1.14/usr/lib/libiconv.so.2.5.1
Expand All @@ -3819,7 +3819,7 @@ ftpclient/stamp-h1:

ftpclient:ftpclient/stamp-h1

ftpclient-install: ftpclient
ftpclient-install:
@$(SEP)
install -D ftpclient/ftpclient $(INSTALLDIR)/ftpclient/usr/sbin/ftpclient
$(STRIP) $(INSTALLDIR)/ftpclient/usr/sbin/ftpclient
Expand All @@ -3839,7 +3839,7 @@ sambaclient/stamp-h1:
sambaclient: sambaclient/stamp-h1
@$(MAKE) -C sambaclient

sambaclient-install: sambaclient
sambaclient-install:
@$(SEP)
install -D sambaclient/sambaclient $(INSTALLDIR)/sambaclient/usr/sbin/sambaclient
$(STRIP) $(INSTALLDIR)/sambaclient/usr/sbin/sambaclient
Expand All @@ -3860,7 +3860,7 @@ usbclient/stamp-h1:
usbclient: usbclient/stamp-h1
@$(MAKE) -C usbclient

usbclient-install: usbclient
usbclient-install:
@$(SEP)
install -D usbclient/usbclient $(INSTALLDIR)/usbclient/usr/sbin/usbclient
$(STRIP) $(INSTALLDIR)/usbclient/usr/sbin/usbclient
Expand Down Expand Up @@ -3927,7 +3927,7 @@ neon/stamp-h1 neon/config.h:
neon: libxml2 neon/stamp-h1 neon/config.h
$(MAKE) -C neon && $(MAKE) $@-stage

neon-install: neon
neon-install:
@$(SEP)
install -D neon/src/.libs/libneon.so.27.2.6 $(INSTALLDIR)/neon/usr/lib/libneon.so.27.2.6
$(STRIP) $(INSTALLDIR)/neon/usr/lib/libneon.so.27.2.6
Expand All @@ -3947,7 +3947,7 @@ webdav_client$(BCMEX)/stamp-h1:
webdav_client$(BCMEX): webdav_client$(BCMEX)/stamp-h1 nvram$(BCMEX) zlib libxml2 neon
@$(MAKE) -C webdav_client$(BCMEX)

webdav_client$(BCMEX)-install: webdav_client$(BCMEX)
webdav_client$(BCMEX)-install:
@$(SEP)
install -D webdav_client$(BCMEX)/webdav_client $(INSTALLDIR)/webdav_client$(BCMEX)/usr/sbin/webdav_client
$(STRIP) $(INSTALLDIR)/webdav_client$(BCMEX)/usr/sbin/webdav_client
Expand Down Expand Up @@ -3993,7 +3993,7 @@ curl/Makefile: curl/configure
LDFLAGS='$(LDFLAGS) -L$(TOP)/openssl' LIBS='-lcrypto -lssl -ldl' \
--with-ca-bundle=/rom/ca-bundle.crt

curl-install: curl
curl-install:
@$(SEP)
install -D curl/lib/.libs/libcurl.so.4.4.0 $(INSTALLDIR)/curl/usr/lib/libcurl.so.4.4.0
$(STRIP) $(INSTALLDIR)/curl/usr/lib/libcurl.so.4.4.0
Expand Down Expand Up @@ -4076,7 +4076,7 @@ dropbox_client/stamp-h1:
dropbox_client: dropbox_client/stamp-h1
@$(MAKE) -C dropbox_client

dropbox_client-install: dropbox_client
dropbox_client-install:
@$(SEP)
install -D dropbox_client/dropbox_client $(INSTALLDIR)/dropbox_client/usr/sbin/dropbox_client
$(STRIP) $(INSTALLDIR)/dropbox_client/usr/sbin/dropbox_client
Expand Down Expand Up @@ -4119,7 +4119,7 @@ libgpg-error-1.10: libgpg-error-1.10/stamp-h1
@$(SEP)
@$(MAKE) -C libgpg-error-1.10

libgpg-error-1.10-install: libgpg-error-1.10
libgpg-error-1.10-install:
install -D libgpg-error-1.10/src/.libs/libgpg-error.so.0.8.0 $(INSTALLDIR)/libgpg-error-1.10/usr/lib/libgpg-error.so.0.8.0
$(STRIP) $(INSTALLDIR)/libgpg-error-1.10/usr/lib/libgpg-error.so.0.8.0
cd $(INSTALLDIR)/libgpg-error-1.10/usr/lib && ln -sf libgpg-error.so.0.8.0 libgpg-error.so.0
Expand All @@ -4139,7 +4139,7 @@ libgcrypt-1.5.1: libgcrypt-1.5.1/stamp-h1
@$(SEP)
@$(MAKE) -C libgcrypt-1.5.1

libgcrypt-1.5.1-install: libgcrypt-1.5.1
libgcrypt-1.5.1-install:
install -D libgcrypt-1.5.1/src/.libs/libgcrypt.so.11.8.0 $(INSTALLDIR)/libgcrypt-1.5.1/usr/lib/libgcrypt.so.11.8.0
$(STRIP) $(INSTALLDIR)/libgcrypt-1.5.1/usr/lib/libgcrypt.so.11.8.0
cd $(INSTALLDIR)/libgcrypt-1.5.1/usr/lib && ln -sf libgcrypt.so.11.8.0 libgcrypt.so.11
Expand Down Expand Up @@ -4182,7 +4182,7 @@ db-4.8.30: db-4.8.30/build_unix/stamp-h1
@$(SEP)
@$(MAKE) -C db-4.8.30/build_unix $(PARALLEL_BUILD)

db-4.8.30-install: db-4.8.30
db-4.8.30-install:
install -D db-4.8.30/build_unix/.libs/libdb-4.8.so $(INSTALLDIR)/db-4.8.30/usr/lib/libdb-4.8.so
$(STRIP) $(INSTALLDIR)/db-4.8.30/usr/lib/libdb-4.8.so
cd $(INSTALLDIR)/db-4.8.30/usr/lib && ln -sf libdb-4.8.so libdb.so
Expand Down Expand Up @@ -4272,7 +4272,7 @@ expat-2.0.1: expat-2.0.1/stamp-h1
@$(SEP)
@$(MAKE) -C expat-2.0.1 $(PARALLEL_BUILD) && $(MAKE) $@-stage

expat-2.0.1-install: expat-2.0.1
expat-2.0.1-install:
install -D expat-2.0.1/.libs/libexpat.so.1.5.2 $(INSTALLDIR)/expat-2.0.1/usr/lib/libexpat.so.1.5.2
$(STRIP) $(INSTALLDIR)/expat-2.0.1/usr/lib/libexpat.so.1.5.2
cd $(INSTALLDIR)/expat-2.0.1/usr/lib && ln -sf libexpat.so.1.5.2 libexpat.so.1
Expand Down Expand Up @@ -4836,7 +4836,7 @@ email-3.1.3-clean:
-@$(MAKE) -C email-3.1.3 clean
@rm -f email-3.1.3/stamp-h1

email-3.1.3-install: email-3.1.3
email-3.1.3-install:
install -D email-3.1.3/src/email $(INSTALLDIR)/email-3.1.3/usr/sbin/email
$(STRIP) $(INSTALLDIR)/email-3.1.3/usr/sbin/email

Expand Down Expand Up @@ -5273,7 +5273,7 @@ json-c/stamp-h1:
json-c: json-c/stamp-h1
$(MAKE) -C $@

json-c-install: json-c
json-c-install:
install -D json-c/.libs/libjson-c.so.2.0.1 $(INSTALLDIR)/json-c/usr/lib/libjson-c.so.2.0.1
$(STRIP) $(INSTALLDIR)/json-c/usr/lib/libjson-c.so.2.0.1
cd $(INSTALLDIR)/json-c/usr/lib && ln -sf libjson-c.so.2.0.1 libjson-c.so
Expand All @@ -5293,7 +5293,7 @@ phddns/stamp-h1:
phddns: phddns/stamp-h1
$(MAKE) -C phddns

phddns-install: phddns
phddns-install:
install -D phddns/src/phddns $(INSTALLDIR)/phddns/usr/sbin/phddns
$(STRIP) $(INSTALLDIR)/phddns/usr/sbin/phddns

Expand Down

2 comments on commit 01c62f7

@bsd-source
Copy link

@bsd-source bsd-source commented on 01c62f7 Jul 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have extensive knowledge reference how MAKE files are processed. I'm curious as to why you did not remove all the other code after -install: in the rest of the Makefile?

example:
ntfs-3g-install: ntfs-3g

ntfs-3g remains. Why is that?

@RMerl
Copy link
Owner Author

@RMerl RMerl commented on 01c62f7 Jul 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of the build rules are broken, and would result in the same component being recompiled 2-3 times when doing a complete build, which significantly increases the build time for a firmware.

I didn't remove it systematically for everything, only for components where it mattered the most. Tor and netatalk for instance would each be recompiled three times per build.

ntfs-3g doesn't matter, because it's not used by Asuswrt-Merlin anyway.

Please sign in to comment.