]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/Targets.make
release: 0.1.65
[lilypond.git] / make / Targets.make
index 52f0f96e6a5e93c8c17949be68335b435c53be75..945587c0ff50cb30f86962e4a0cef3a848788b06 100644 (file)
@@ -7,81 +7,66 @@
 #      Jan Nieuwenhuizen <jan@digicash.com>
 #      Han-Wen Nienhuys <hanwen@stack.nl>
 
-.PHONY : all clean config default dist doc doc++ dummy exe help lib TAGS html\
-       check-flower-deps check-lily-deps check-doc-deps
+.PHONY : all clean config default dist doc doc++ dummy exe help html lib TAGS\
+       check-flower-deps check-lib-deps check-doc-deps check-html-deps
 
 # 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 = $(lily_bindir)/$(NAME)
-$(EXECUTABLE): $(build) $(OFILES)
-       $(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
        $(LD_COMMAND) $(OFILES) $(LOADLIBES)
 
 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)
+       $(AR) ts $@             #silly irix
        $(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)
 #
-TOCLEAN= $(allobs) $(alldeps)
+
+outdirs: outdir
+       $(LOOP)
+
+outdir:
+       -mkdir -p $(outdir)
+
+# be careful about deletion.
 clean: localclean
-ifdef allobs
-       rm -f $(allobs)
-endif
-ifdef alldeps
-       rm -f $(alldeps)
-endif
-       rm -f core
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
-endif
+       -rm -f $(outdir)/*
+       touch $(outdir)/dummy.dep
+       $(LOOP)
 
-distclean: localdistclean 
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i localdistclean; done
-endif
+distclean: clean 
+       $(LOOP)
+       $(MAKE) local-distclean
+
+maintainerclean: 
+       $(LOOP)
+       $(MAKE) local-maintainerclean
+       $(MAKE) local-distclean
 
-localdistclean:
 
 
 # configure:
@@ -95,104 +80,123 @@ config:
 dummydep: $(DUMMYDEPS)
 #
 
-# value of $(OSTYPE) on windhoos; "make $OSTYPE" if you use bash :-)
+# value of $(OSTYPE) on windhoos...; "make $OSTYPE" if you use bash :-)
+#
+win32:  windows32 # win/lose?
 #
-win32: 
-       $(MAKE) -C . CXX=g++ 
+windows32:
+       $(MAKE) -C . "CXX=g++ -D_WINDOWS32"
 #
 
 # xcompile to doze:
 #
 doze:  dos
 dos: 
-       $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WIN32 -Dcaddr_t=char* -DMAP_SHARED=0"
+       $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WINDOWS32 -Dcaddr_t=char* -DMAP_SHARED=0"
 #
 
 # 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 " win32:  native cygnus-win32 compile" 
+       @echo " windows32: native cygnus-gnu compile" 
 #
 
 doc:
-       $(MAKE) -C $(depth)/Documentation do-doc
+#      $(MAKE) -C $(depth)/Documentation do-doc
+       $(MAKE) -C $(depth)/Documentation all
 
-# doc++ documentation of classes
-doc++: $(progdocs)     
-       doc++ -k -p -d $(DOCDIR) $^
+html: $(HTMLFILES)
 
+# 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)/$(outdir); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
 
-       (cd ./$(depth); tar cfz $(DIST_NAME).tar.gz $(DIST_NAME))
 # should be trapped
        rm -rf $(distdir)/
 
-localdist: $(DISTFILES)
-       if [ -d out ]; then mkdir $(distdir)/$(localdir)/out; fi
-       ln $(DISTFILES) $(distdir)/$(localdir)
+# ugh. should generate in out/
+dozedist: doosdist
+doosdist: check-mf-deps
+       rm -rf $(distdir)
+       -mkdir $(distdir)
+       $(MAKE) localdist
+       chmod -Rf a+rX $(distdir)
+#      ugh, the ugly way, then
+       rm -f $(distdir)/mf/$(outdir)/*.log
+       # urg
+       (cd $(distdir)/init; ln -s ../../../mf/out/*.ly .)
+       (cd $(distdir)/tex; ln -s ../../../mf/out/*.tex .)
+       (cd $(distdir); rm -rf $(NO_DOOS_DIST))
+       ln $(lilyout)/lilypond $(distdir)/bin/lilypond.exe
+       -strip -s $(distdir)/bin/lilypond.exe
+       ln $(mi2muout)/mi2mu $(distdir)/bin/mi2mu.exe
+       -strip -s $(distdir)/bin/mi2mu.exe
+       (cd ./$(depth)/$(outdir); $(ZIP) $(DIST_NAME).exe.zip $(DIST_NAME))
+# should be trapped
+       rm -rf $(distdir)/
+
+
+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) /dev/null
-endif
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i TAGS ; done
+       -etags -CT $(all-tag-sources) $(ERROR_LOG)
+       -ctags -h ".h.hh.tcc.icc" $(all-tag-sources) $(ERROR_LOG)
 endif
+       $(LOOP)
 
 
 # version stuff:
 #
 
-$(outdir)/version.hh: .version
-       ./$(lily_bindir)/make_version > $@
+$(outdir)/version.hh: VERSION
+       sh ./$(lily_bindir)/make-version.sh > $@
 
 
 # should this be in Rules?
-configure: configure.in
+configure: configure.in aclocal.m4
        autoconf - < $<> $@
        chmod +x configure
 
 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:
 
@@ -203,22 +207,40 @@ $(LIBFLOWER): check-flower-deps
 check-flower-deps:
        $(MAKE)  -C $(depth)/flower/ default
 
-check-lily-deps: check-flower-deps
+check-lib-deps: check-flower-deps
        $(MAKE)  -C $(depth)/lib
 
 check-doc-deps:
        $(MAKE) -C $(depth)/Documentation
 
+check-html-deps:
+       $(MAKE) -C $(depth)/Documentation html
+
 $(LIBLILY): dummy
        $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
-#
+
 
 # RedHat rpm package:
 #
-rpm:
+rpm: check-rpm-doc-deps
        -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
-       -cp $(doc-dir)/*.gif $(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 gifs
+
+check-mf-deps:
+       $(MAKE) -C $(depth)/mf
+
+$(configheader): $(depth)/$(configuration).hh
+       cp $< $@
+
+WWW: local-WWW
+       $(LOOP)
+
+ifneq ($(DEPFILES),)
+include $(DEPFILES)
+endif