# 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 2002.12.18 # this Makefile is intended to be run as root, it will fail if run as user! # --- read in setup, if it exists already (not so when doing make setup) # need to set WORKDIR, so that I can read script that sets var (incl itsself) -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: $(WORKDIR)/root-dphys.bin.gz $(WORKDIR)/root-dphys.bin.gz: Makefile setup-dphys2 makeroot \ dbootstrap lilo.conf debconf-preload @# --- 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: $(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=$(WORKDIR)/root-dphys.bin.gz of=$(CONF_INST_FLOPPY) bs=1024 rescue: $(WORKDIR)/rescue.bin $(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: $(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=$(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 $(WORKDIR) ] ; then \ rm -rf $(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 -r0.9 FAQ INSTALL Makefile README dbootstrap debconf-preload \ index.html.en makeroot makerescue 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)/RCS \ $(DIR)/README $(DIR)/dbootstrap $(DIR)/debconf-preload \ $(DIR)/index.html.de $(DIR)/index.html.en $(DIR)/lilo.conf \ $(DIR)/makeroot $(DIR)/makerescue $(DIR)/potato_today \ $(DIR)/setup-dphys2 $(DIR)/sfdisk $(DIR)/woody_new