Commit 23b2ce8f authored by David Byers's avatar David Byers
Browse files

Makefile can build to any target name

parent 393a3693
...@@ -129,16 +129,14 @@ header.el: $(HEADER) ...@@ -129,16 +129,14 @@ header.el: $(HEADER)
fast: $(HEADER-ELC) $(SOURCES-ELC) fast: $(HEADER-ELC) $(SOURCES-ELC)
cat $(HEADER-ELC) $(SOURCES-ELC) > $(TARGET) cat $(HEADER-ELC) $(SOURCES-ELC) > $(TARGET)
lyskom.el: $(HEADER) $(SOURCES) $(TARGET-EL): $(HEADER) $(SOURCES)
cat $(HEADER) $(SOURCES) > lyskom.el cat $(HEADER) $(SOURCES) > $(TARGET-EL)
$(TARGET): lyskom.el $(TARGET): $(TARGET-EL)
cp lyskom.el $(TARGET-EL)
$(EMACS-BATCH) -l ./lpath.el -f batch-byte-compile $(TARGET-EL) $(EMACS-BATCH) -l ./lpath.el -f batch-byte-compile $(TARGET-EL)
rm $(TARGET-EL)
check: lyskom.el check: $(TARGET-EL)
$(EMACS-BATCH) -l ./lpath.el -l ./lyskom.el -l ./check-strings.el \ $(EMACS-BATCH) -l ./lpath.el -l ./$(TARGET-EL) -l ./check-strings.el \
-f lyskom-check-strings -f lyskom-check-strings
.PHONY: verbose .PHONY: verbose
...@@ -148,23 +146,23 @@ verbose: verbose-el $(TARGET) ...@@ -148,23 +146,23 @@ verbose: verbose-el $(TARGET)
verbose-el: $(HEADER) $(SOURCES) verbose-el: $(HEADER) $(SOURCES)
@echo "Building lyskom.el" @echo "Building lyskom.el"
@echo "" > lyskom.el @echo "" > $(TARGET-EL)
@for i in $(HEADER) $(SOURCES) ; do \ @for i in $(HEADER) $(SOURCES) ; do \
echo '(eval-when-compile (message "Compiling %s" "'$$i'"))' \ echo '(eval-when-compile (message "Compiling %s" "'$$i'"))' \
>> lyskom.el ;\ >> $(TARGET-EL) ;\
cat $$i >> lyskom.el ; \ cat $$i >> $(TARGET-EL) ; \
done done
TAGS: $(HEADER) $(SOURCES) TAGS: $(HEADER) $(SOURCES)
etags $(HEADER) $(SOURCES) etags $(HEADER) $(SOURCES)
install: $(TARGET) lyskom.el install: $(TARGET) $(TARGET-EL)
cp lyskom.el $(TARGET) $(LISPDIR) cp $(TARGET-EL) $(TARGET) $(LISPDIR)
release: release-files release-cleanup release-move release: release-files release-cleanup release-move
release-files: $(HEADER) $(SOURCES) $(DISTSRC) $(MISC) lyskom.el release-files: $(HEADER) $(SOURCES) $(DISTSRC) $(MISC) $(TARGET-EL)
mkdir lyskom-$(CLIENTVERSION) mkdir lyskom-$(CLIENTVERSION)
cp $(HEADER) $(SOURCES) $(MISC) lyskom-$(CLIENTVERSION) cp $(HEADER) $(SOURCES) $(MISC) lyskom-$(CLIENTVERSION)
for i in $(DISTFILES) ; do \ for i in $(DISTFILES) ; do \
...@@ -183,7 +181,7 @@ release-cleanup: ...@@ -183,7 +181,7 @@ release-cleanup:
release-move: release-files release-move: release-files
if [ -d $(FTPDIR) ]; then \ if [ -d $(FTPDIR) ]; then \
mv lyskom-$(CLIENTVERSION).tar.gz $(FTPDIR) ; \ mv lyskom-$(CLIENTVERSION).tar.gz $(FTPDIR) ; \
mv lyskom.el $(FTPDIR)/lyskom-$(CLIENTVERSION).el ; \ mv $(TARGET-EL) $(FTPDIR)/lyskom-$(CLIENTVERSION).el ; \
else \ else \
echo "Flyttade inte release-filerna till $(FTPDIR)." ; \ echo "Flyttade inte release-filerna till $(FTPDIR)." ; \
fi fi
...@@ -199,7 +197,7 @@ debian-build: release-files ...@@ -199,7 +197,7 @@ debian-build: release-files
cd lyskom-elisp-client-$(DEBIANCLIENTVERSION) && dpkg-buildpackage cd lyskom-elisp-client-$(DEBIANCLIENTVERSION) && dpkg-buildpackage
clean: clean:
$(RM) *.el.gz *.elc.gz lyskom.el english-lyskom.el $(RM) *.el.gz *.elc.gz $(TARGET-EL)
$(RM) -rf lyskom-$(CLIENTVERSION) \ $(RM) -rf lyskom-$(CLIENTVERSION) \
lyskom-$(CLIENTVERSION).tar \ lyskom-$(CLIENTVERSION).tar \
lyskom-$(CLIENTVERSION).tar.gz \ lyskom-$(CLIENTVERSION).tar.gz \
......
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