# http://www.phys.ethz.ch/~franklin/Projects/dphys2/Makefile # copyright ETH Zuerich Physics Deparement, use under either BSD or GPL license # author Neil Franklin, last modification 2003.07.25 # this Makefile is intended to be run as root, it will fail if run as user! # --- read in setup # needed to set CONF_WORKDIR, so that we can even test what to do -include ./setup-dphys2 # --- no user configurable stuff below here DIR = dphys2 # --- code for acting out the various make targets # make root is the default action all: root root: $(CONF_WORKDIR)/root-dphys.bin.gz $(CONF_WORKDIR)/root-dphys.bin.gz: Makefile setup-dphys2 makeroot \ dbootstrap sfdisk lilo.conf debconf-preload endfirstrun @# --- test if we can work @if [ ! $$USER = root ] ; then \ echo sorry, you need to "make" this as root ; \ kill $$PPID ; \ fi @# --- run script to do it @echo making root disk from mirror and our files ... @./makeroot install: $(CONF_WORKDIR)/root-dphys.bin.gz @# --- test if we can work @if [ ! $$USER = root ] ; then \ echo sorry, you need to "make" this as root ; \ kill $$PPID ; \ fi @# --- install is just copy to floppy @echo installing root disk ... @dd if=$(CONF_WORKDIR)/root-dphys.bin.gz of=$(CONF_INST_FLOPPY) bs=1024 rescue: $(CONF_WORKDIR)/rescue.bin $(CONF_WORKDIR)/rescue.bin: Makefile setup-dphys2 makerescue @# --- test if we can work @if [ ! $$USER = root ] ; then \ echo sorry, you need to "make" this as root ; \ kill $$PPID ; \ fi @# --- run script to do it @echo downloading rescue disk from mirror ... @./makerescue installrescue: $(CONF_WORKDIR)/rescue.bin @# --- test if we can work @if [ ! $$USER = root ] ; then \ echo sorry, you need to "make" this as root ; \ kill $$PPID ; \ fi @# --- install is just copy to floppy @echo installing rescue disk on floppy ... @dd if=$(CONF_WORKDIR)/rescue.bin of=$(CONF_INST_FLOPPY) bs=1024 clean: @# --- test if we can work @if [ ! $$USER = root ] ; then \ echo sorry, you need to "make" this as root ; \ kill $$PPID ; \ fi @# --- delete work directory @echo cleaning up work directory ... @if [ -d $(CONF_WORKDIR) ] ; then \ rm -rf $(CONF_WORKDIR) ; \ else \ echo nothing to clean up ; \ fi ci: @# the -r?.? has to fixed before each make ci @# best on the first Makefile edit after last make ci @echo checking source files into RCS archive ... @ci -l -r2.3 FAQ INSTALL Makefile Makefile.debian-local README \ dbootstrap debconf-preload dphys-setup.pl endfirstrun index.html.en \ makepackage makerescue makeroot potato_today setup-dphys2 woody_new tar: @# package this project into an .tar.gz for one nice download @echo packaging source and doc files into an .tar.gz ... @tar zcf ../$(DIR).tar.gz -C .. \ $(DIR)/FAQ $(DIR)/INSTALL $(DIR)/Logfile $(DIR)/Makefile \ $(DIR)/Makefile.debian-local $(DIR)/RCS $(DIR)/README \ $(DIR)/dbootstrap $(DIR)/debconf $(DIR)/debconf-preload \ $(DIR)/dphys-setup.pl $(DIR)/endfirstrun $(DIR)/index.html.de \ $(DIR)/index.html.en $(DIR)/lilo.conf $(DIR)/makepackage \ $(DIR)/makerescue $(DIR)/makeroot $(DIR)/potato_today \ $(DIR)/setup-dphys2 $(DIR)/sfdisk $(DIR)/woody_new