1# Common Makefile 2include $(MAKEFILEPATH)/CoreOS/ReleaseControl/Common.make 3 4# The following files vary by target platform. Start with the MacOSX defaults 5# and override as necessary. 6SRC_PASSWD= 7SRC_GROUP= 8SRC_TTYS=ttys 9 10ifdef RC_TARGET_CONFIG 11Product=$(RC_TARGET_CONFIG) 12else 13Product=MacOSX 14endif 15ifeq "$(Product)" "iPhone" 16SRC_PASSWD=master.passwd.iPhone 17SRC_GROUP=group.iPhone 18SRC_TTYS=ttys.embedded 19endif 20 21install:: validate-all install-files 22 23validate-all: 24 @echo "Validating files are UTF-8" 25 $(_v) for X in * ; do \ 26 [ \! -f "$$X" ] || iconv -f UTF-8 -t UTF-8 "$$X" >/dev/null ; \ 27 done 28 29install-files: 30 @echo "Installing $(Destination) for $(Product)" 31 $(_v) $(INSTALL_FILE) -m 0644 -c afpovertcp.cfg "$(Destination)/afpovertcp.cfg" 32ifeq "$(Product)" "MacOSX" 33 $(_v) $(INSTALL_FILE) -m 0644 -c asl.conf "$(Destination)/asl.conf" 34else 35 $(_v) $(INSTALL_FILE) -m 0644 -c asl.conf.ios "$(Destination)/asl.conf" 36endif 37 $(_v) $(INSTALL_FILE) -m 0644 -c /dev/null "$(Destination)/find.codes" 38 $(_v) $(INSTALL_FILE) -m 0644 -c ftpusers "$(Destination)/ftpusers" 39ifeq "$(Product)" "iPhone" 40 $(_v) $(INSTALL_FILE) -m 0644 -c fstab "$(Destination)/fstab" 41endif 42 $(_v) $(INSTALL_FILE) -m 0644 -c fstab.hd "$(Destination)/fstab.hd" 43 $(_v) $(INSTALL_FILE) -m 0644 -c gettytab "$(Destination)/gettytab" 44 $(_v) $(INSTALL_FILE) -m 0644 -c /dev/null "$(Destination)/hosts.equiv" 45 $(_v) $(INSTALL_FILE) -m 0644 -c kern_loader.conf "$(Destination)/kern_loader.conf" 46 $(_v) $(INSTALL_FILE) -m 0644 -c /dev/null "$(Destination)/rmtab" 47 $(_v) $(INSTALL_FILE) -m 0644 -c shells "$(Destination)/shells" 48 $(_v) $(INSTALL_FILE) -m 0644 -c syslog.conf "$(Destination)/syslog.conf" 49 $(_v) $(INSTALL_FILE) -m 0644 -c $(SRC_TTYS) "$(Destination)/ttys" 50 $(_v) $(INSTALL_FILE) -m 0644 -c /dev/null "$(Destination)/xtab" 51ifeq "$(Product)" "MacOSX" 52 $(_v) $(LN) -hfs ../var/run/resolv.conf "$(Destination)" 53endif 54ifneq "$(SRC_GROUP)" "" 55 $(_v) $(INSTALL_FILE) -m 0644 -c $(SRC_GROUP) "$(Destination)/group" 56endif 57 $(_v) $(INSTALL_FILE) -m 0644 -c hosts "$(Destination)/hosts" 58 $(_v) $(INSTALL_FILE) -m 0644 -c manpaths "$(Destination)/manpaths" 59ifneq "$(SRC_PASSWD)" "" 60 $(_v) $(INSTALL_FILE) -m 0600 -c $(SRC_PASSWD) "$(Destination)/master.passwd" 61 $(_v) cat $(SRC_PASSWD) | cut -d ':' -f 1-4,8-10 > "$(Destination)/passwd" 62 $(_v) chmod 0644 "$(Destination)/passwd" ; chown root:wheel "$(Destination)/passwd" 63endif 64 $(_v) $(INSTALL_FILE) -m 0644 -c networks "$(Destination)/networks" 65 $(_v) $(INSTALL_FILE) -m 0644 -c paths "$(Destination)/paths" 66ifeq "$(Product)" "iPhone" 67 $(_v) cat paths.iPhone >> "$(Destination)/paths" 68endif 69 $(_v) $(INSTALL_FILE) -m 0644 -c protocols "$(Destination)/protocols" 70 $(_v) $(INSTALL_FILE) -m 0644 -c rpc "$(Destination)/rpc" 71 $(_v) $(INSTALL_FILE) -m 0644 -c services "$(Destination)/services" 72