]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/Targets.make
release: 0.1.59
[lilypond.git] / make / Targets.make
index d84b62e30432f8b31915b137c62d0d68ab57e766..c696163f145b32bc013165fc5e166dc9e47fc1c0 100644 (file)
 # target all:
 #
 all:    default
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i all; done
-endif
-
-#
-
-# platform specific variables,
-#
-include ./$(depth)/make/out/Site.make
-#
-
-# where to do this ?
-.PRECIOUS:  $(makeout)/Site.make
-
+       $(LOOP)
 # dependency list of executable:
 #
 
-$(EXECUTABLE): $(build) $(OFILES) $(outdir)/version.hh
-       $(MAKE) $(MODULE_LIBDEPS) 
-       $(INCREASE_BUILD)
-       $(MAKE) -S $(OFILES)  $(SILENT_LOG)
+$(EXECUTABLE): $(configheader) $(OFILES) $(outdir)/version.hh
+ifdef MODULE_LIBDEPS
+       $(MAKE) $(MODULE_LIBDEPS)
+endif
 ifdef STABLEOBS
        $(DO_STRIP) $(STABLEOBS)
 endif
@@ -41,43 +28,46 @@ endif
 
 exe: $(EXECUTABLE)
 
-$(build): $(depth)/VERSION
-       echo 0 > $@
 
 # dependency list of library:
 #
-LIBRARY = $(outdir)/$(LIB_PREFIX)$(NAME).a
-$(LIBRARY): $(build) $(OFILES)
-       $(INCREASE_BUILD)
-       $(MAKE) $(OFILES)  $(SILENT_LOG)
+$(LIBRARY): $(configheader) $(OFILES)
        $(AR_COMMAND) $(OFILES)
        $(RANLIB_COMMAND)
 
-SHAREDLIBRARY=$(outdir)/$(LIB_PREFIX)$(NAME).so
-$(SHAREDLIBRARY):  $(build) $(OFILES) $(MODULE_LIBDEPS)
-       $(INCREASE_BUILD)
-       $(MAKE) $(OFILES)  $(SILENT_LOG)
-       $(LD_COMMAND) $(OFILES) -o $@
-#      ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $(outdir)/$(LIB_PREFIX)$(NAME).so
+$(SHAREDLIBRARY):  $(configheader) $(OFILES) $(MODULE_LIBDEPS)
+       $(LD_COMMAND) $(OFILES) -o $@.$(VERSION)
+       rm -f $@
+       ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $@.$(MAJOR_VERSION)
+       ln -sf $(LIB_PREFIX)$(NAME).so.$(VERSION) $@
+
 #
 lib: $(LIBRARY)
 #
 
+
+outdirs: outdir
+       $(LOOP)
+
+outdir:
+       -mkdir $(outdir)
+
 # be careful about deletion.
 clean: localclean
-       rm -f core 
-ifdef EXECUTABLE
-       rm -f $(EXECUTABLE)
-endif
-ifdef OFILES
-       rm -f $(OFILES)
-endif
-ifdef DEPFILES
-       rm -f $(DEPFILES)
-endif
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
-endif
+       -rm -f $(outdir)/*
+       touch $(outdir)/dummy.dep
+       $(LOOP)
+
+distclean: clean 
+       $(LOOP)
+       $(MAKE) local-distclean
+
+maintainerclean: 
+       $(LOOP)
+       $(MAKE) local-maintainerclean
+       $(MAKE) local-distclean
+
+
 
 # configure:
 #
@@ -108,12 +98,13 @@ dos:
 # target help:
 #
 help:
+       @echo "Makefile for LilyPond $(TOPLEVEL_VERSION)"
        @echo "Usage:"
        @echo " $(MAKE) ["VARIABLE=value" ...] [target]"
        @echo
        @echo "targets:"
        @echo " all clean config dist distclean doc doc++"
-       @echo " exe help lib moduledist TAGS"
+       @echo " exe help lib TAGS"
        @echo " dos:    xcomplile to dos"
        @echo " windows32: native cygnus-gnu compile" 
 #
@@ -121,17 +112,16 @@ help:
 doc:
        $(MAKE) -C $(depth)/Documentation do-doc
 
-# doc++ documentation of classes
-doc++: $(progdocs)     
-       $(docxx) $(docxx-opts) -d $(DOCDIR) $^
 
 # ugh. should generate in out/
 dist:
+       rm -rf $(distdir)
        -mkdir $(distdir)
        $(MAKE) localdist
-       chmod -Rf a+rX $(distdir)
+       chmod -R a+r $(distdir)
+       chmod  a+x `find $(distdir) -type d -print`
 
-       (cd ./$(depth); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
+       (cd ./$(depth)/$(outdir); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
 
 # should be trapped
        rm -rf $(distdir)/
@@ -155,42 +145,30 @@ doosdist:
        rm -rf $(distdir)/
 
 
-localdist: $(DISTFILES)
-       if [ -d out ]; then mkdir $(distdir)/$(localdir)/out; fi
+localdist: $(DISTFILES) $(OUT_DISTFILES)
+       touch $(outdir)/dummy.dep; \
+       mkdir $(distdir)/$(localdir)/out; \
        $(LN) $(DISTFILES) $(distdir)/$(localdir)
+       $(LN) $(outdir)/dummy.dep $(OUT_DISTFILES) $(distdir)/$(localdir)/out
 ifdef SUBDIRS
        set -e; for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; \
                $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
 endif
 
-moduledist:
-       -mkdir $(module-distdir)
-       $(MAKE) localmoduledist
-       (cd ./$(depth); $(TAR) cfz $(MODULE_DIST_NAME).tar.gz $(MODULE_DIST_NAME))
-       rm -rf $(module-distdir)/ 
-
-localmoduledist:
-       $(LN) $(DISTFILES) $(module-distdir)/$(localdir)
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do mkdir $(module-distdir)/$(localdir)/$$i; done
-       set -e; for i in $(SUBDIRS); do $(MAKE) localdir=$(localdir)/$$i -C $$i localmoduledist; done
-endif
 
 TAGS:$(all-tag-sources)
 ifdef all-tag-sources
        -etags -CT $(all-tag-sources) $(ERROR_LOG)
        -ctags -CT $(all-tag-sources) $(ERROR_LOG)
 endif
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i TAGS ; done
-endif
+       $(LOOP)
 
 
 # version stuff:
 #
 
 $(outdir)/version.hh: VERSION
-       ./$(lily_bindir)/make-version > $@
+       sh ./$(lily_bindir)/make-version.sh > $@
 
 
 # should this be in Rules?
@@ -200,20 +178,20 @@ configure: configure.in aclocal.m4
 
 localclean:
 
+local-distclean:
+
+local-maintainerclean:
+
 install-strip:
        $(MAKE) INSTALL="$(INSTALL) -s" install
 
 install: localinstall
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
-endif
+       $(LOOP)
 
 localinstall:
 
 uninstall: localuninstall
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i uninstall; done
-endif
+       $(LOOP)
 
 localuninstall:
 
@@ -238,20 +216,21 @@ $(LIBLILY): dummy
 #
 rpm: check-rpm-doc-deps
        -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
-       -cp $< $(rpm-sources)
+#      -cp $(wildcard $(depth)/Documentation/*.xpm) $(rpm-sources)
+       -cp $(wildcard $(depth)/Documentation/$(outdir)/*.gif) $(rpm-sources)
        $(MAKE) -C $(make-dir) spec
        rpm -ba $(makeout)/lilypond.spec
 
 check-rpm-doc-deps: 
-       $(MAKE) -C $(depth)/Documentation/ xpms
+       $(MAKE) -C $(depth)/Documentation gifs
+
+check-mf-deps:
+       $(MAKE) -C $(depth)/mf
 
+$(configheader): $(depth)/$(configuration).hh
+       cp $< $@
 
-installexe:
-       $(INSTALL) -d $(bindir)
-       $(INSTALL) -m 755 $(EXECUTABLES) $(bindir)
 
-uninstallexe:
-       for a in $(EXECUTABLES); do rm -f $(bindir)/`basename $$a`; done
 
 ifneq ($(DEPFILES),)
 include $(DEPFILES)