Makefile 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. ETCDIR=/etc
  2. EXTDIR=${DESTDIR}${ETCDIR}
  3. MODE=754
  4. DIRMODE=755
  5. CONFMODE=644
  6. all: install
  7. create-dirs:
  8. install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc0.d
  9. install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc1.d
  10. install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc2.d
  11. install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc3.d
  12. install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc4.d
  13. install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc5.d
  14. install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc6.d
  15. install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rcsysinit.d
  16. install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d
  17. install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
  18. create-service-dir:
  19. install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
  20. install: create-dirs create-service-dir
  21. install -m ${MODE} lfs/init.d/checkfs ${EXTDIR}/rc.d/init.d/
  22. install -m ${MODE} lfs/init.d/cleanfs ${EXTDIR}/rc.d/init.d/
  23. install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
  24. install -m ${MODE} lfs/init.d/halt ${EXTDIR}/rc.d/init.d/
  25. install -m ${MODE} lfs/init.d/console ${EXTDIR}/rc.d/init.d/
  26. install -m ${MODE} lfs/init.d/consolelog ${EXTDIR}/rc.d/init.d/
  27. install -m ${MODE} lfs/init.d/localnet ${EXTDIR}/rc.d/init.d/
  28. install -m ${MODE} lfs/init.d/modules ${EXTDIR}/rc.d/init.d/
  29. install -m ${MODE} lfs/init.d/mountfs ${EXTDIR}/rc.d/init.d/
  30. install -m ${MODE} lfs/init.d/mountkernfs ${EXTDIR}/rc.d/init.d/
  31. install -m ${MODE} lfs/init.d/network ${EXTDIR}/rc.d/init.d/
  32. install -m ${MODE} lfs/init.d/rc ${EXTDIR}/rc.d/init.d/
  33. install -m ${MODE} lfs/init.d/reboot ${EXTDIR}/rc.d/init.d/
  34. install -m ${MODE} lfs/init.d/sendsignals ${EXTDIR}/rc.d/init.d/
  35. install -m ${MODE} lfs/init.d/setclock ${EXTDIR}/rc.d/init.d/
  36. install -m ${MODE} lfs/init.d/sysklogd ${EXTDIR}/rc.d/init.d/
  37. install -m ${MODE} lfs/init.d/swap ${EXTDIR}/rc.d/init.d/
  38. install -m ${MODE} lfs/init.d/sysctl ${EXTDIR}/rc.d/init.d/
  39. install -m ${MODE} lfs/init.d/template ${EXTDIR}/rc.d/init.d/
  40. install -m ${MODE} lfs/init.d/udev ${EXTDIR}/rc.d/init.d/
  41. install -m ${MODE} lfs/init.d/udev_retry ${EXTDIR}/rc.d/init.d/
  42. ln -sf ../init.d/network ${EXTDIR}/rc.d/rc0.d/K80network
  43. ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc0.d/K90sysklogd
  44. ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
  45. ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc0.d/S70mountfs
  46. ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc0.d/S80swap
  47. ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rc0.d/S90localnet
  48. ln -sf ../init.d/halt ${EXTDIR}/rc.d/rc0.d/S99halt
  49. ln -sf ../init.d/network ${EXTDIR}/rc.d/rc1.d/K80network
  50. ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc1.d/K90sysklogd
  51. ln -sf ../init.d/network ${EXTDIR}/rc.d/rc2.d/K80network
  52. ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc2.d/K90sysklogd
  53. ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc3.d/S10sysklogd
  54. ln -sf ../init.d/network ${EXTDIR}/rc.d/rc3.d/S20network
  55. ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc4.d/S10sysklogd
  56. ln -sf ../init.d/network ${EXTDIR}/rc.d/rc4.d/S20network
  57. ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc5.d/S10sysklogd
  58. ln -sf ../init.d/network ${EXTDIR}/rc.d/rc5.d/S20network
  59. ln -sf ../init.d/network ${EXTDIR}/rc.d/rc6.d/K80network
  60. ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc6.d/K90sysklogd
  61. ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
  62. ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc6.d/S70mountfs
  63. ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc6.d/S80swap
  64. ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rc6.d/S90localnet
  65. ln -sf ../init.d/reboot ${EXTDIR}/rc.d/rc6.d/S99reboot
  66. ln -sf ../init.d/mountkernfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountkernfs
  67. ln -sf ../init.d/consolelog ${EXTDIR}/rc.d/rcsysinit.d/S02consolelog
  68. ln -sf ../init.d/modules ${EXTDIR}/rc.d/rcsysinit.d/S05modules
  69. ln -sf ../init.d/udev ${EXTDIR}/rc.d/rcsysinit.d/S10udev
  70. ln -sf ../init.d/swap ${EXTDIR}/rc.d/rcsysinit.d/S20swap
  71. ln -sf ../init.d/setclock ${EXTDIR}/rc.d/rcsysinit.d/S25setclock
  72. ln -sf ../init.d/checkfs ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs
  73. ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs
  74. ln -sf ../init.d/cleanfs ${EXTDIR}/rc.d/rcsysinit.d/S45cleanfs
  75. ln -sf ../init.d/udev_retry ${EXTDIR}/rc.d/rcsysinit.d/S50udev_retry
  76. ln -sf ../init.d/console ${EXTDIR}/rc.d/rcsysinit.d/S70console
  77. ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rcsysinit.d/S80localnet
  78. ln -sf ../init.d/sysctl ${EXTDIR}/rc.d/rcsysinit.d/S90sysctl
  79. if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then install -m ${CONFMODE} lfs/sysconfig/createfiles ${EXTDIR}/sysconfig/; fi
  80. if [ ! -f ${EXTDIR}/sysconfig/modules ]; then install -m ${CONFMODE} lfs/sysconfig/modules ${EXTDIR}/sysconfig/; fi
  81. if [ ! -f ${EXTDIR}/sysconfig/rc ]; then install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/; fi
  82. install -m ${MODE} lfs/sysconfig/network-devices/ifup ${EXTDIR}/sysconfig/network-devices/
  83. install -m ${MODE} lfs/sysconfig/network-devices/ifdown ${EXTDIR}/sysconfig/network-devices/
  84. install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static ${EXTDIR}/sysconfig/network-devices/services/
  85. install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static-route ${EXTDIR}/sysconfig/network-devices/services/
  86. install-consolelog: create-dirs
  87. install -m ${MODE} contrib/init.d/consolelog ${EXTDIR}/rc.d/init.d
  88. ln -sf ../init.d/consolelog ${EXTDIR}/rc.d/rcsysinit.d/S00consolelog
  89. install-lsb-compliant:
  90. make -C contrib/lsb
  91. install-service-mtu: create-service-dir
  92. install -m ${MODE} contrib/sysconfig/network-devices/services/mtu ${EXTDIR}/sysconfig/network-devices/services
  93. minimal: create-dirs create-service-dir
  94. install -m ${MODE} lfs/init.d/checkfs ${EXTDIR}/rc.d/init.d/
  95. install -m ${MODE} lfs/init.d/cleanfs ${EXTDIR}/rc.d/init.d/
  96. install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
  97. install -m ${MODE} lfs/init.d/halt ${EXTDIR}/rc.d/init.d/
  98. install -m ${MODE} lfs/init.d/localnet ${EXTDIR}/rc.d/init.d/
  99. install -m ${MODE} lfs/init.d/mountfs ${EXTDIR}/rc.d/init.d/
  100. install -m ${MODE} lfs/init.d/mountkernfs ${EXTDIR}/rc.d/init.d/
  101. install -m ${MODE} lfs/init.d/rc ${EXTDIR}/rc.d/init.d/
  102. install -m ${MODE} lfs/init.d/reboot ${EXTDIR}/rc.d/init.d/
  103. install -m ${MODE} lfs/init.d/sendsignals ${EXTDIR}/rc.d/init.d/
  104. install -m ${MODE} lfs/init.d/setclock ${EXTDIR}/rc.d/init.d/
  105. install -m ${MODE} lfs/init.d/swap ${EXTDIR}/rc.d/init.d/
  106. install -m ${MODE} lfs/init.d/udev ${EXTDIR}/rc.d/init.d/
  107. ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
  108. ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc0.d/S70mountfs
  109. ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc0.d/S80swap
  110. ln -sf ../init.d/halt ${EXTDIR}/rc.d/rc0.d/S99halt
  111. ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
  112. ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc6.d/S70mountfs
  113. ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc6.d/S80swap
  114. ln -sf ../init.d/reboot ${EXTDIR}/rc.d/rc6.d/S99reboot
  115. ln -sf ../init.d/mountkernfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountkernfs
  116. ln -sf ../init.d/udev ${EXTDIR}/rc.d/rcsysinit.d/S10udev
  117. ln -sf ../init.d/swap ${EXTDIR}/rc.d/rcsysinit.d/S20swap
  118. ln -sf ../init.d/setclock ${EXTDIR}/rc.d/rcsysinit.d/S25setclock
  119. ln -sf ../init.d/checkfs ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs
  120. ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs
  121. ln -sf ../init.d/cleanfs ${EXTDIR}/rc.d/rcsysinit.d/S45cleanfs
  122. if [ ! -f ${EXTDIR}/sysconfig/rc ]; then install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/; fi
  123. .PHONY: all create-dirs create-service-dir \
  124. install install-service-mtu