Commit 91db8fb8 authored by Mark Donohoe's avatar Mark Donohoe

Moved install and removal of VERSION file to top level Makefile. Since the...

Moved install and removal of VERSION file to top level Makefile.  Since the top level makefile creates the file, it should also install it.  Removed VERSION implimentation from install Makefile.

git-svn-id: http://svn.code.sf.net/p/fossology/code/branches/fossology2.0/fossology@5119 a5643f74-2041-0410-a2b9-94ffef304a07
parent f1bc88a6
......@@ -17,6 +17,8 @@ UNINSTALLDIRS = $(DIRS:%=uninstall-%)
CLEANDIRS = $(DIRS:%=clean-%)
TESTDIRS = $(DIRS:%=test-%)
COVDIRS = $(DIRS:%=cov-%)
CONFPATH=$(SYSCONFDIR)
## Targets
# build
......@@ -45,10 +47,21 @@ VERSIONFILE:
install: all $(INSTALLDIRS)
$(INSTALLDIRS):
$(MAKE) -C $(@:install-%=%) install
if [ ! -f $(DESTDIR)$(CONFPATH)/VERSION -o "$(OVERWRITE)"]; then \
echo "NOTE: using default version for $(DESTDIR)$(CONFPATH)/VERSION"; \
$(INSTALL) -m 666 VERSION $(DESTDIR)$(CONFPATH)/VERSION; \
else \
echo "WARNING: $(DESTDIR)$(CONFPATH)/VERSION already exists."; \
echo " Not overwriting, consider checking it by hand or use the OVERWRITE option."; \
fi \
uninstall: $(UNINSTALLDIRS)
$(UNINSTALLDIRS):
$(MAKE) -C $(@:uninstall-%=%) uninstall
@echo "Configuration files will not be removed:"
@echo " $(DESTDIR)$(CONFPATH)/VERSION"
@echo " Remove by hand if you desire."
# test depends on everything being built first
test: all $(TESTDIRS)
......
......@@ -4,12 +4,15 @@
# Create and install:
# fo-postinstall
# SYSCONFDIR/db.conf
# SYSCONFDIR/VERSION
TOP=..
VARS=$(TOP)/Makefile.conf
include $(VARS)
CONFPATH=$(SYSCONFDIR)
# default version is the scm revision number
-DVERSION=$(SCM_REV)
all: fo-postinstall defconf/Db.conf defconf/fossology.conf
......@@ -55,14 +58,6 @@ install: all
echo " Not overwriting, consider checking it by hand or use the OVERWRITE option."; \
fi \
if [ ! -f $(DESTDIR)$(CONFPATH)/VERSION -o "$(OVERWRITE)"]; then \
echo "NOTE: using default version for $(DESTDIR)$(CONFPATH)/VERSION"; \
$(INSTALL) -m 666 defconf/VERSION $(DESTDIR)$(CONFPATH)/VERSION; \
else \
echo "WARNING: $(DESTDIR)$(CONFPATH)/VERSION already exists."; \
echo " Not overwriting, consider checking it by hand or use the OVERWRITE option."; \
fi \
uninstall:
rm -f $(DESTDIR)$(LIBEXECDIR)/fo-postinstall
......@@ -77,12 +72,11 @@ uninstall:
@echo "Configuration files will not be removed:"
@echo " $(DESTDIR)$(CONFPATH)/fossology.conf"
@echo " $(DESTDIR)$(CONFPATH)/Db.conf"
@echo " $(DESTDIR)$(CONFPATH)/VERSION"
@echo " Remove by hand if you desire."
clean:
rm -f fo-postinstall defconf/Db.conf defconf/fossology.conf defconf/VERSION
rm -f fo-postinstall defconf/Db.conf defconf/fossology.conf
test: all
@echo "NOTICE: no tests available for install"
......
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