mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
install: add an 'uninstall' make target
This commit is contained in:
13
Makefile
13
Makefile
@@ -1,5 +1,5 @@
|
||||
export MODULESHOME = $(shell pwd)
|
||||
.PHONY: doc www initdir install clean .makeinstallpath
|
||||
.PHONY: doc www initdir install uninstall clean .makeinstallpath
|
||||
|
||||
# load previously saved install paths if any
|
||||
-include .makeinstallpath
|
||||
@@ -69,6 +69,17 @@ install: ChangeLog .makeinstallpath
|
||||
make -C init install
|
||||
make -C doc install
|
||||
|
||||
uninstall:
|
||||
rm -f $(libexecdir)/modulecmd.tcl
|
||||
rm -f $(bindir)/envml
|
||||
rm -f $(addprefix $(docdir)/,ChangeLog NEWS README)
|
||||
make -C init uninstall
|
||||
make -C doc uninstall
|
||||
rmdir $(libexecdir)
|
||||
rmdir $(bindir)
|
||||
rmdir $(datarootdir)
|
||||
rmdir $(prefix)
|
||||
|
||||
distclean: clean
|
||||
|
||||
clean:
|
||||
|
||||
11
doc/Makefile
11
doc/Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: install clean .makeinstallpath
|
||||
.PHONY: install uninstall clean .makeinstallpath
|
||||
|
||||
VERSION_FILE := ../modulecmd.tcl
|
||||
MAN_VERSION := "modules-tcl $(shell grep '^set MODULES_CURRENT_VERSION' \
|
||||
@@ -72,6 +72,15 @@ install: all
|
||||
cp $(MAN1_DIR)/module.1 $(mandir)/man1/
|
||||
cp $(MAN4_DIR)/modulefile.4 $(mandir)/man4/
|
||||
|
||||
uninstall:
|
||||
rm -f $(docdir)/LICENSE.GPL
|
||||
rm -f $(docdir)/diff_with_c-version.txt
|
||||
rm -f $(mandir)/man1/module.1
|
||||
rm -f $(mandir)/man4/modulefile.4
|
||||
rmdir $(mandir)/man1 $(mandir)/man4
|
||||
rmdir $(mandir)
|
||||
rmdir $(docdir)
|
||||
|
||||
clean:
|
||||
rm -f $(HTML_DIR)/*.html
|
||||
rm -f $(MAN1_DIR)/*.1 $(MAN4_DIR)/*.4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.PHONY: install clean .makeinstallpath
|
||||
.PHONY: install uninstall clean .makeinstallpath
|
||||
|
||||
SH_LIKE = sh ksh bash zsh profile.sh
|
||||
CSH_LIKE = csh tcsh tcsh_completion profile.csh
|
||||
@@ -106,5 +106,12 @@ install: all
|
||||
cp ksh $(initdir)/ksh-functions/module
|
||||
cp $(ALL_CONFIG) $(initdir)/
|
||||
|
||||
uninstall:
|
||||
rm -f $(addprefix $(initdir)/,$(ALL_SHELLS) bash_completion ksh-functions/module)
|
||||
rm -f $(addprefix $(initdir)/,$(ALL_CONFIG))
|
||||
rmdir $(modulefilesdir)
|
||||
rmdir $(initdir)/ksh-functions
|
||||
rmdir $(initdir)
|
||||
|
||||
clean:
|
||||
rm -f $(ALL_SHELLS) modulerc .modulespath .makeinstallpath
|
||||
|
||||
Reference in New Issue
Block a user