Skip to content

Commit

Permalink
Added make uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
alquerci committed Aug 28, 2014
1 parent 6ae0d60 commit ca3a839
Showing 1 changed file with 17 additions and 2 deletions.
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

0 comments on commit ca3a839

Please sign in to comment.