Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Added make uninstall #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Default target
all:: build tools doc
all:: build tools doc manifest

# vars utils
UTIL_SPACE := $() #
Expand All @@ -15,6 +15,9 @@ GZ = /bin/gzip --best
TAR = /bin/tar
PYTHON = /usr/bin/python
MAKE ?= /usr/bin/make
TOUCH = /bin/touch
FIND = /bin/find
SED = /bin/sed

# Source directories
SD_ROOT = $(subst $(UTIL_SPACE),\$(UTIL_SPACE),$(shell pwd))
Expand Down Expand Up @@ -55,17 +58,29 @@ doc: FORCE
tools: FORCE
@cd $(SD_TOOLS); $(MAKE)

manifest: build doc tools
$(TOUCH) $(SD_BUILD)/$(ID_DATA)/doc/$(EXENAME)/MANIFEST;
cd $(SD_BUILD); $(FIND) -P . -type f -or -type l | $(SED) -r "s/^\\./$$(echo $(ID_ROOT) | $(SED) s/\\//\\\\\\//g)/" > $(SD_BUILD)/$(ID_DATA)/doc/$(EXENAME)/MANIFEST;

test: build FORCE
@cd $(SD_TEST); $(MAKE)

installtest: install FORCE
@cd $(SD_TEST); $(MAKE) $@

install: FORCE
install: install-manifest FORCE
@cd $(SD_SRC); $(MAKE) $@
@cd $(SD_DOC); $(MAKE) $@
@cd $(SD_TOOLS); $(MAKE) $@

install-manifest: manifest
$(CP) $(SD_BUILD)/$(ID_DATA)/doc/$(EXENAME)/MANIFEST $(ID_ROOT)/$(ID_DATA)/doc/$(EXENAME)/MANIFEST;

uninstall: FORCE
while read path; do\
$(RM) "$$path";\
done < $(ID_ROOT)/$(ID_DATA)/doc/$(EXENAME)/MANIFEST;

$(SD_DIST)/$(EXENAME)-$(VERSION): build doc tools
$(MKDIR) $(SD_DIST)/$(EXENAME)-$(VERSION)
cd $(SD_BUILD); pwd; $(TAR) -jcf $(SD_DIST)/$(EXENAME)-$(VERSION)/$(EXENAME)-$(VERSION).tar.bz2 *
Expand Down