kleine Makefile-Verbesserungen fuer nicht-svn-Nutzer

Formatierungskram
This commit is contained in:
lars 2006-07-29 16:23:30 +00:00
parent c0f43c5cf8
commit ba8cd27e60
2 changed files with 41 additions and 44 deletions

View file

@ -1,7 +1,7 @@
########## Variablendefinitionen ###########
# Revisions-Variablen
REVISIONS_NR := $(shell svn -R info| grep ^Revision| cut -f2 -d " " | sort | tail -1)
REVISIONS_NR := $(shell if test -d .svn; then svn -R info | grep ^Revision | cut -f2 -d " " | sort | tail -1; else date +%Y%m%d; fi)
REVISIONS_SUFFIX = _r$(REVISIONS_NR)
# Verzeichnisse
@ -88,8 +88,11 @@ $(CREATE_DIRS):
cd-template: verzeichnisstruktur
@rm -rf $(CCD_BUILD_DIR)
@# export local svn directory OR just copy the directories (for non-svn users)
@svn export cd-template "$(CCD_BUILD_DIR)" \
|| mkdir -p $(dir $(CCD_BUILD_DIR)) && cp -r cd-template $(CCD_BUILD_DIR)
@if test -d .svn ;\
then svn export cd-template "$(CCD_BUILD_DIR)" ;\
else mkdir -p $(dir $(CCD_BUILD_DIR)) ;\
cp -r cd-template $(CCD_BUILD_DIR) ;\
fi
doku: cd-template
@ -117,9 +120,15 @@ website: doku kopiere_programme
source: EXPORT_FILE_SUFFIX := _src
source:
@echo "Exportiere die gewaehlte svn-Revision ($(REVISIONS_NR)) ..." ;\
rm -rf "$(CCD_BUILD_DIR)" ;\
svn export . "$(CCD_BUILD_DIR)" | $(EINRUECKEN)
rm -rf "$(CCD_BUILD_DIR)"
if test -d .svn ;\
then mkdir -p "$(dir $(CCD_BUILD_DIR))" ;\
echo "Exportiere die gewaehlte svn-Revision ($(REVISIONS_NR)) ..." ;\
svn export . "$(CCD_BUILD_DIR)" | $(EINRUECKEN) ;\
else mkdir -p "$(CCD_BUILD_DIR)" ;\
make -C documents clean ;\
cp -r $(shell ls | grep -v "$(notdir $(TMP_ROOT))" | grep -v "$(notdir $(EXPORT_DIR))") "$(CCD_BUILD_DIR)" ;\
fi
@echo "Erzeuge source-Archiv ..."
@$(ERZEUGE_TAR)

View file

@ -61,18 +61,6 @@ install: $(EXPORT_DIRS)
cp -r "$$a/"* "$(CCD_BUILD_DIR)/doku/$$(dirname $$a)" ;\
fi ;\
done
@# copy general documents
#cp -r common $(CCD_BUILD_DIR)/doku/macos
#cp -r common $(CCD_BUILD_DIR)/doku/linux
#cp -r common $(CCD_BUILD_DIR)/doku/windows
@# copy os-specific stuff
#cp -r macos/* $(CCD_BUILD_DIR)/doku/macos
#cp -r linux/* $(CCD_BUILD_DIR)/doku/linux
#cp -r windows/* $(CCD_BUILD_DIR)/doku/windows
@# remove unnecessary files (eps, lyx, tex)
#find $(CCD_BUILD_DIR)/doku -name \*.tex -exec rm "{}" \;
#find $(CCD_BUILD_DIR)/doku -name \*.lyx -exec rm "{}" \;
#find $(CCD_BUILD_DIR)/doku -name \*.eps -exec rm "{}" \;
clean-targets: