Commit 297019fb authored by Mike Hibler's avatar Mike Hibler
Browse files

Cleanup Makefiles:

1. "make clean" will just remove stuff built in the process of a regular build
2. "make distclean" will also clean out configure generated files.

This is how it was always supposed to be, there was just some bitrot.
parent 56acaee5
......@@ -30,6 +30,10 @@ TMLIBS += -lssl -lcrypto
SSLOBJ = ssl.o
ifeq ($(SYSTEM),Linux)
TMLIBS += -ldl
MDSUBDIR = linux
endif
ifeq ($(SYSTEM),FreeBSD)
MDSUBDIR = freebsd
endif
ifeq ($(EVENTSYS),1)
......@@ -71,16 +75,7 @@ install: $(INSTALL_SBINDIR)/tmcd \
client-install: tmcc-nossl findif
ifeq ($(SYSTEM),FreeBSD)
@$(MAKE) -C freebsd install
else
ifeq ($(SYSTEM),Linux)
@$(MAKE) -C linux install
else
@echo "unknown OS, nothing to install"
endif
endif
#endif
@$(MAKE) -C $(MDSUBDIR) install
$(INSTALL_BINDIR)/tmcd/%: %
@echo "Installing $<"
......@@ -96,5 +91,8 @@ ${OBJDIR}/event/lib/%:
${OBJDIR}/lib/libtb/%:
cd ${OBJDIR}/lib/tbdb && gmake $<
clean:
rm -f *.o core tmcd tmcd.restart tmcc tmcc-nossl findif version.c
clean: subdir-clean
rm -f *.o core tmcd tmcc tmcc-nossl findif version.c
subdir-clean:
@$(MAKE) -C $(MDSUBDIR) clean
......@@ -173,4 +173,4 @@ locrem-install:
$(BINDIR)/control_interface
clean:
/bin/rm -f injail
rm -f injail
......@@ -57,7 +57,7 @@ basefbsd-install: dir-install
(cd ../freebsd; $(MAKE) all install)
rm -f $(SYSETCDIR)/start_if.*
sup-install: dir-install
sup-install: dir-install supfile
$(INSTALL) -m 755 ./supfile $(ETCDIR)/supfile
bin-install: dir-install
......@@ -84,6 +84,3 @@ jail-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/jail/jailsetup $(BINDIR)/jailsetup
$(INSTALL) -m 755 $(SRCDIR)/jail/mkjail.pl $(BINDIR)/mkjail.pl
$(INSTALL) -m 755 ./injail $(JAILDIR)/injail
clean:
/bin/rm -f supfile
......@@ -61,7 +61,7 @@ dir-install:
common-install: dir-install
(cd ../common; $(MAKE) local-install)
sup-install: dir-install
sup-install: dir-install supfile
$(INSTALL) -m 755 ./supfile $(ETCDIR)/supfile
$(INSTALL) -m 750 -o root -g wheel -d $(DESTDIR)/root/.cvsup
$(INSTALL) -m 600 $(SRCDIR)/cvsup.auth $(DESTDIR)/root/.cvsup/auth
......@@ -77,7 +77,7 @@ etc-install: dir-install sysetc-remove sysetc-install
$(INSTALL) -m 600 $(SRCDIR)/gshadow $(ETCDIR)/gshadow
$(INSTALL) -m 644 $(SRCDIR)/hosts $(ETCDIR)/hosts
sysetc-install: dir-install
sysetc-install: dir-install pump.conf
$(INSTALL) -m 644 ./pump.conf $(SYSETCDIR)/pump.conf
$(INSTALL) -m 755 $(SRCDIR)/dhclient-exit-hooks \
$(SYSETCDIR)/dhclient-exit-hooks
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2002, 2004 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = utils
SUBDIR = tools
include $(OBJDIR)/Makeconf
SUBDIRS = pcapper teachswitch
all: all-subdirs
all: all-subdirs
include $(TESTBED_SRCDIR)/GNUmakerules
clean: clean-subdirs
# How to recursively descend into subdirectories to make general
# targets such as `all'.
%.MAKE:
@$(MAKE) -C $(dir $@) $(basename $(notdir $@))
%-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ;
clean:
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -56,6 +56,9 @@ control-install:
# Automate this part at some point.
#
subdir-install:
@$(MAKE) -C nsgen install
@$(MAKE) -C nsgen install
clean:
clean: subdir-clean
subdir-clean:
@$(MAKE) -C nsgen clean
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment