source: bootscripts-embedded/Makefile @ df6a922

Last change on this file since df6a922 was df6a922, checked in by Andrew Bradford <bradfa@…>, 12 years ago

Fixed curly bracket expansion in Makefile

Updated Makefile to have each directory in target "create-dirs" target
have its own line. Curly bracket expansion may not work like bash
when used in a Makefile.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1VERSION         := 1.0-pre5
2
3ETCDIR          := /etc
4EXTDIR          := ${DESTDIR}${ETCDIR}
5MODE            := 754
6DIRMODE         := 755
7CONFMODE        := 644
8
9all:
10        @grep "^install" Makefile | cut -d ":" -f 1
11        @echo dist
12        @echo "Select an appropriate install target from the above list" ; exit 1
13
14dist:
15        rm -rf "dist/clfs-embedded-bootscripts-$(VERSION)"
16        mkdir -p "dist/clfs-embedded-bootscripts-$(VERSION)"
17        tar --exclude dist -c * | tar -x -C "dist/clfs-embedded-bootscripts-$(VERSION)"
18        (cd dist; tar -cjf "clfs-embedded-bootscripts-$(VERSION).tar.bz2" "clfs-embedded-bootscripts-$(VERSION)")
19        rm -rf "dist/clfs-embedded-bootscripts-$(VERSION)"
20
21create-dirs:
22        install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d
23        install -d -m ${DIRMODE} ${EXTDIR}/rc.d/start
24        install -d -m ${DIRMODE} ${EXTDIR}/rc.d/stop
25
26install-bootscripts: create-dirs
27        install -m ${CONFMODE} clfs/rc.d/init.d/functions ${EXTDIR}/rc.d/init.d/
28        install -m ${MODE} clfs/rc.d/startup         ${EXTDIR}/rc.d/
29        install -m ${MODE} clfs/rc.d/shutdown        ${EXTDIR}/rc.d/
30        install -m ${MODE} clfs/rc.d/init.d/network  ${EXTDIR}/rc.d/init.d/
31        install -m ${MODE} clfs/rc.d/init.d/syslog   ${EXTDIR}/rc.d/init.d/
32        install -m ${MODE} clfs/rc.d/init.d/bridge   ${EXTDIR}/rc.d/init.d/
33        ln -sf ../init.d/syslog ${EXTDIR}/rc.d/start/S05syslog
34        ln -sf ../init.d/syslog ${EXTDIR}/rc.d/stop/K99syslog
35        ln -sf ../init.d/network ${EXTDIR}/rc.d/start/S10network
36        ln -sf ../init.d/network ${EXTDIR}/rc.d/stop/K80network
37        ln -sf ../init.d/bridge ${EXTDIR}/rc.d/start/S09bridge
38        ln -sf ../init.d/bridge ${EXTDIR}/rc.d/stop/K81bridge
39
40install-bcm47xx: create-dirs
41        install -m ${MODE} clfs/rc.d/init.d/bcm47xx-switch ${EXTDIR}/rc.d/init.d/
42        ln -sf ../init.d/bcm47xx-switch ${EXTDIR}/rc.d/start/S08bcm47xx-switch
43        ln -sf ../init.d/bcm47xx-switch ${EXTDIR}/rc.d/stop/K82bcm47xx-switch
44
45install-dropbear: create-dirs
46        install -m ${MODE} clfs/rc.d/init.d/sshd   ${EXTDIR}/rc.d/init.d/
47        ln -sf ../init.d/sshd ${EXTDIR}/rc.d/start/S30sshd
48        ln -sf ../init.d/sshd ${EXTDIR}/rc.d/stop/K30sshd
49
50install-hostapd: create-dirs
51        install -m ${MODE} clfs/rc.d/init.d/hostapd ${EXTDIR}/rc.d/init.d
52        ln -sf ../init.d/hostapd ${EXTDIR}/rc.d/start/S08hostapd
53        ln -sf ../init.d/hostapd ${EXTDIR}/rc.d/stop/K82hostapd
54
55.PHONY: dist all create-dirs install install-bcm47xx install-dropbear \
56        install-hostapd
Note: See TracBrowser for help on using the repository browser.