NAME=initscripts CFLAGS=-g -O2 -Wall ROOT=/ SH := $(shell echo *.sh) listhome $(shell echo mandrake_*) rc.modules mdv-network-event network-up mandir=/usr/share VERSION:=$(shell rpm -q --qf '%{VERSION}\n' --specfile ../$(NAME).spec | head -n 1) RELEASE:=$(shell rpm -q --qf '%{RELEASE}\n' --specfile ../$(NAME).spec | head -n 1) RH_TAG:=rh$(subst .,_,$(VERSION)) SUBDIRS = partmon vpn PROFILE_LEVEL=10 all: check: @for i in $(SH);do /bin/bash -n $$i || exit 1;echo $$i syntax OK;done @for i in $(SUBDIRS);do make -C $$i check;done clean: install: all check mkdir -p $(ROOT)/usr/{bin/,sbin/,man/man8} mkdir -p $(ROOT)/usr/sbin mkdir -p $(ROOT)/etc/modprobe.preload.d/ mkdir -p $(ROOT)/etc/rc.d/init.d/ mkdir -p $(ROOT)/usr/lib/lsb mkdir -p $(ROOT)/etc/profile.d/ mkdir -p $(ROOT)/etc/ppp/ip-{up,down}.d/ mkdir -p $(ROOT)/etc/sysconfig/network-scripts/if{up,down}.d mkdir -p $(ROOT)/etc/sysconfig/network-scripts/cellular.d mkdir -p $(ROOT)/etc/sysconfig/network-scripts/hostname.d mkdir -p $(ROOT)/etc/sysconfig/network-scripts/wireless.d mkdir -p $(ROOT)/etc/X11/xsetup.d install -m755 if{up,down}-hso $(ROOT)/etc/sysconfig/network-scripts/ install -m755 rc.modules $(ROOT)/etc/ install -m644 modules $(ROOT)/etc/ for profile in {inputrc,tmpdir}.{c,}sh; do \ install -m644 $$profile $(ROOT)/etc/profile.d/$(PROFILE_LEVEL)$$profile; \ done install -m755 listhome $(ROOT)/usr/bin/ install -m755 mandrake_{firstime,everytime} network-auth network-up $(ROOT)/etc/rc.d/init.d/ install -D -m644 autofsck $(ROOT)/etc/sysconfig/autofsck @for i in $(SUBDIRS);do make -C $$i install;done install -m755 hibernate-cleanup.sh $(ROOT)/usr/sbin/ install -m755 lsb-init-functions $(ROOT)/usr/lib/lsb/init-functions install -m755 mdv-network-event $(ROOT)/usr/sbin/