1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
# $Id: Makefile,v 1.10 2002/01/19 15:34:14 ukai Exp $
prefix = /
exec_prefix = ${prefix}
etcdir = ${prefix}/etc
sbindir = ${exec_prefix}/sbin
mandir = ${prefix}/usr/share/man
srcdir = .
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
TOPDIR=/
DIRS= /sbin \
/etc/hotplug \
/etc/init.d/ \
/var/run/usb \
/usr/share/man/man8
# New style, /etc/hotplug
# Driven by modutils output, and (for USB) exceptions
DISTRIB_FILES = \
README \
ChangeLog \
hotplug.8 \
Makefile \
mkinstalldirs \
hotplug.spec
DISTRIB_DIRS = \
etc \
sbin \
fxload \
debian
NAME=hotplug
REV=$(shell date "+%Y_%m_%d"| awk '{print $$1}')
RELEASE_DIR = $(NAME)-$(REV)
default: distrib
# This rule simply makes a distribution tarball. It collects the files
# from various distribution subdirectories.
distrib:
chmod +x sbin/hotplug
chmod +x etc/rc.d/init.d/hotplug
chmod +x etc/hotplug/*.agent etc/hotplug/*.rc
-rm -rf $(RELEASE_DIR)
mkdir $(RELEASE_DIR)
cp -r $(DISTRIB_DIRS) $(DISTRIB_FILES) $(RELEASE_DIR)
tar czv --exclude CVS --exclude .cvsignore \
--exclude '.*.swp' --exclude '.#*' --exclude '*~' \
-f $(RELEASE_DIR).tar.gz $(RELEASE_DIR)
rm -rf $(RELEASE_DIR)
all:
make -C fxload all
clean:
rm -f $(NAME)-*.tar.gz Log *~
make -C fxload clean
install: installdirs
for i in sbin/*;do [[ -d $$i ]] && continue;install -m755 $$i $(sbindir)/;done
for i in etc/hotplug/*;do [[ $$i == *CVS* ]] && continue;cp -a -r $$i $(etcdir)/hotplug;done
for i in etc/rc.d/init.d/*;do [[ $$i == *CVS* ]] && continue;cp -a -r $$i $(etcdir)/rc.d/init.d/;done
$(INSTALL_DATA) hotplug.8 $(mandir)/man8/hotplug.8
make -C fxload prefix=$(prefix) sbindir=$(sbindir) mandir=$(mandir) install
installdirs: mkinstalldirs
$(srcdir)/mkinstalldirs $(sbindir) $(etcdir)/hotplug $(etcdir)/rc.d/init.d $(mandir)/man8 $(prefix)/var/run/usb
chmod 0700 $(prefix)/var/run/usb
|