Have 'make dist' work with builddir != srcdir.

This commit is contained in:
Elliot Lee 1999-08-19 20:17:40 +00:00
parent 4a90180bd5
commit 0bd6d7504a
18 changed files with 70 additions and 65 deletions

View File

@ -1,3 +1,6 @@
1999-08-19 Elliot Lee <sopwith@redhat.com>
* */Makefile.in: Have 'make dist' work with builddir != srcdir.
1999-08-19 Federico Mena Quintero <federico@redhat.com>
* doc-gnome/C/gmc.sgml: Index fixes.

View File

@ -6,7 +6,7 @@ rootdir = $(srcdir)
foreigndirs=pc
codedirs=vfs lib doc slang gtkedit edit src gnome new_icons icons idl syntax
unixdirs=intl $(codedirs) @POSUB@
unixdirs=intl $(codedirs) doc-gnome @POSUB@
alldirs=$(unixdirs) $(foreigndirs)
subdirs=$(alldirs)
@ -18,7 +18,7 @@ DISTMAIN = configure configure.in NEWS README INSTALL INSTALL.FAST \
Makefile.in FAQ COPYING create_vcs install-sh \
config.h.in mc-aclocal.m4 aclocal.m4 acconfig.h \
VERSION mcfn_install.in Make.common.in README.PC \
mc.spec mc.spec.in Specfile README.QNX VERSION.in \
mc.spec mc.spec.in README.QNX VERSION.in \
mkinstalldirs autogen.sh ABOUT-NLS gettext.m4 \
config.guess config.sub README.smbfs
@ -103,36 +103,37 @@ distclean:
cd vfs/samba && $(MAKE) $@
distcopy:
sed -e "s/^%define ver .*/%define ver $(VERSION)/; s/^%define rel .*/%define rel 1/" mc.spec > Specfile
mkdir ../mc-$(VERSION)
cp $(DISTMAIN) ../mc-$(VERSION);
for I in $(alldirs); do \
mkdir ../mc-$(VERSION)/$$I; \
cd $$I ; \
echo Processing $$I; \
$(MAKE) distcopy VERSION=$(VERSION) PACKAGE=mc || exit 1; \
cd ..; done
mkdir ../mc-$(VERSION)/macros
cp $(GNOME_M4_FILES) ../mc-$(VERSION)/macros
cd po; $(MAKE) || exit 1; cd ..;
cp po/Makefile.in.in ../mc-$(VERSION)/po;
cp po/POTFILES.in ../mc-$(VERSION)/po;
cp po/*.po po/*.gmo po/mc.pot po/stamp-cat-id po/cat-id-tbl.c ../mc-$(VERSION)/po;
(cd ..; tar cvf - mc-$(VERSION) | \
gzip -f9 > mc-$(VERSION).tar.gz)
rm -rf $(top_srcdir)/mc-$(VERSION)
mkdir $(top_srcdir)/mc-$(VERSION)
for I in $(DISTMAIN); do cp $(top_srcdir)/$$I $(top_srcdir)/mc-$(VERSION) || cp $$I $(top_srcdir)/mc-$(VERSION); done
for I in $(unixdirs); do \
mkdir $(top_srcdir)/mc-$(VERSION)/$$I; \
$(MAKE) -C $$I distcopy VERSION=$(VERSION) PACKAGE=mc || exit 1; \
done
mkdir $(top_srcdir)/mc-$(VERSION)/macros
for I in $(GNOME_M4_FILES); do cp $(top_srcdir)/$$I $(top_srcdir)/mc-$(VERSION)/macros; done
$(MAKE) || exit 1; cd ..;
cp $(top_srcdir)/po/Makefile.in.in $(top_srcdir)/mc-$(VERSION)/po;
cp $(top_srcdir)/po/POTFILES.in $(top_srcdir)/mc-$(VERSION)/po;
cp $(top_srcdir)/po/*.po $(top_srcdir)/po/*.gmo $(top_srcdir)/po/mc.pot $(top_srcdir)/po/stamp-cat-id $(top_srcdir)/po/cat-id-tbl.c $(top_srcdir)/mc-$(VERSION)/po;
(cd $(top_srcdir); tar cvf - mc-$(VERSION) | \
gzip -f9) > mc-$(VERSION).tar.gz
dist: configure config.h.in distcopy
@:
# rm -rf $(top_srcdir)/mc-$(VERSION) mc-$(VERSION)
mycheck: Makefile
rm -rf ../mc-$(VERSION)
tar xzvf ../mc-$(VERSION).tar.gz
rm -rf mc-$(VERSION)
tar xzvf $(top_srcdir)/mc-$(VERSION).tar.gz
mkdir mc-$(VERSION)/=build
mkdir mc-$(VERSION)/=inst
dc_install_base=`cd mc-$(VERSION)/=inst && pwd`; \
cd mc-$(VERSION)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) \
&& make install \
&& make install
-rm -rf mc-$(VERSION)
mydistcheck: dist mycheck

View File

@ -267,10 +267,11 @@ distdir: $(DISTFILES)
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
distcopy:
mkdir ../../../mc-$(VERSION)/doc-gnome/C/figs
$(CP) $(DISTDOCS) ../../../mc-$(VERSION)/doc-gnome/C/
$(CP) $(DISTFIGS) ../../../mc-$(VERSION)/doc-gnome/C/figs
mkdir $(top_srcdir)/mc-$(VERSION)/doc-gnome/C/figs
for I in $(DISTDOCS) $(DISTFIGS); do $(CP) $(top_srcdir)/doc-gnome/C/$$I $(top_srcdir)/mc-$(VERSION)/doc-gnome/C; done
info-am:
info: info-am
dvi-am:

View File

@ -380,7 +380,9 @@ distclean-am: distclean-tags distclean-generic clean-am
distclean: distclean-recursive
distcopy:
$(CP) $(DISTDOCS) ../../mc-$(VERSION)/doc-gnome
mkdir $(top_srcdir)/mc-$(VERSION)/doc-gnome/C
$(MAKE) -C C distcopy VERSION=$(VERSION) PACKAGE=mc
for I in $(DISTDOCS); do $(CP) $(top_srcdir)/doc-gnome/$$I $(top_srcdir)/mc-$(VERSION)/doc-gnome; done
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
distclean-am

View File

@ -78,6 +78,6 @@ distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/Makefile $(srcdir)/*.1 $(srcdir)/*.8
distcopy:
$(CP) $(DISTDOC) ../../mc-$(VERSION)/doc
for I in $(DISTDOC); do $(CP) $(top_srcdir)/doc/$$I $(top_srcdir)/mc-$(VERSION)/doc; done
depend dep:

View File

@ -90,7 +90,7 @@ uninstall:
-$(RMF) $(DESTDIR)$(bindir)/$(binprefix)mcedit
distcopy:
$(CP) $(DIST) ../../mc-$(VERSION)/edit
for I in $(DIST); do $(CP) $(top_srcdir)/edit/$$I $(top_srcdir)/mc-$(VERSION)/edit; done
depend dep: mcdep

View File

@ -200,7 +200,8 @@ DISTGNOME_NEW = \
DISTGNOME = \
Makefile.in ChangeLog $(EXTRA_DIST) $(CORBA_SOURCES) \
$(PIXMAPS) $(ICONS) $(GNOMESRCS) $(GNOMEHDRS) $(DISTGNOME_NEW)
$(PIXMAPS) $(ICONS) $(GNOMESRCS) $(GNOMEHDRS) $(DISTGNOME_NEW) \
gmc-window.c gmc-window.h
.c.o:
$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
@ -288,7 +289,7 @@ distclean: cleansourcelinks
-$(RMF) $(srcdir)/Makefile
distcopy:
$(CP) $(DISTGNOME) ../../mc-$(VERSION)/gnome
for I in $(DISTGNOME); do $(CP) $(top_srcdir)/gnome/$$I $(top_srcdir)/mc-$(VERSION)/gnome; done
install: install_@mx@

View File

@ -75,7 +75,7 @@ uninstall:
-$(RMF) $(DESTDIR)$(bindir)/$(binprefix)mcedit
distcopy:
$(CP) $(DIST) ../../mc-$(VERSION)/gtkedit
for I in $(DIST); do $(CP) $(top_srcdir)/gtkedit/$$I $(top_srcdir)/mc-$(VERSION)/gtkedit; done
depend dep: mcdep

View File

@ -67,6 +67,6 @@ distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/Makefile
distcopy:
$(CP) $(DISTICONS) ../../mc-$(VERSION)/icons
for I in $(DISTICONS); do $(CP) $(top_srcdir)/icons/$$I $(top_srcdir)/mc-$(VERSION)/icons; done
depend dep:

View File

@ -38,7 +38,7 @@ uninstall:
do $(RMF) $(DESTDIR)$(idldir)/$$I; done
distcopy:
$(CP) $(DISTFILES) ../../mc-$(VERSION)/idl
for I in $(DISTFILES); do $(CP) $(top_srcdir)/idl/$$I $(top_srcdir)/mc-$(VERSION)/idl; done
depend dep:

View File

@ -74,6 +74,6 @@ uninstall:
-rmdir $(DESTDIR)$(mclibdir)
distcopy:
$(CP) $(DISTLIB) ../../mc-$(VERSION)/lib
for I in $(DISTLIB); do $(CP) $(top_srcdir)/lib/$$I $(top_srcdir)/mc-$(VERSION)/lib; done
depend dep:

View File

@ -98,6 +98,6 @@ distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/Makefile
distcopy:
$(CP) $(DISTICONS) ../../mc-$(VERSION)/new_icons
for I in $(DISTICONS); do $(CP) $(top_srcdir)/new_icons/$$I $(top_srcdir)/mc-$(VERSION)/new_icons; done
depend dep:

View File

@ -65,7 +65,7 @@ distclean:
-$(RMF) $(srcdir)/Makefile
distcopy:
$(CP) $(DISTSLANG) ../../mc-$(VERSION)/slang
for I in $(DISTSLANG); do $(CP) $(top_srcdir)/slang/$$I $(top_srcdir)/mc-$(VERSION)/slang; done
install uninstall:

View File

@ -144,7 +144,7 @@ uninstall:
$(RMF) $(mclibdir)/$(libprefix)mc.hlp
distcopy: $(srcdir)/mc.hlp
$(CP) $(DISTFILES) ../../mc-$(VERSION)/src
for I in $(DISTFILES); do $(CP) $(top_srcdir)/src/$$I $(top_srcdir)/mc-$(VERSION)/src; done
depend dep: mcdep

View File

@ -66,8 +66,6 @@ distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/Makefile
distcopy:
$(CP) $(DISTSYNTAX) ../../mc-$(VERSION)/syntax
for I in $(DISTSYNTAX); do $(CP) $(top_srcdir)/syntax/$$I $(top_srcdir)/mc-$(VERSION)/syntax; done
depend dep:

View File

@ -126,7 +126,7 @@ distclean: cleansourcelinks
-$(RMF) $(srcdir)/Makefile gui.tcl
distcopy:
$(CP) $(DISTTK) ../../mc-$(VERSION)/tk
for I in $(DISTTK); do $(CP) $(top_srcdir)/tk/$$I $(top_srcdir)/mc-$(VERSION)/tk; done
install: install_@tkmc@

View File

@ -355,26 +355,26 @@ uninstall:
-$(RMF) $(DESTDIR)$(bindir)/$(binprefix)mcserv
distcopy:
$(CP) $(DISTVFS) ../../mc-$(VERSION)/vfs
mkdir ../../mc-$(VERSION)/vfs/extfs
(cd extfs; $(CP) $(EXTFSSTUFF) ../../../mc-$(VERSION)/vfs/extfs)
mkdir ../../mc-$(VERSION)/vfs/samba
mkdir ../../mc-$(VERSION)/vfs/samba/include
mkdir ../../mc-$(VERSION)/vfs/samba/lib
mkdir ../../mc-$(VERSION)/vfs/samba/libsmb
mkdir ../../mc-$(VERSION)/vfs/samba/param
mkdir ../../mc-$(VERSION)/vfs/samba/smbwrapper
mkdir ../../mc-$(VERSION)/vfs/samba/tests
mkdir ../../mc-$(VERSION)/vfs/samba/ubiqx
for I in $(DISTVFS); do $(CP) $(top_srcdir)/vfs/$$I $(top_srcdir)/mc-$(VERSION)/vfs; done
mkdir $(top_srcdir)/mc-$(VERSION)/vfs/extfs
for I in $(EXTFSSTUFF); do $(CP) $(top_srcdir)/vfs/extfs/$$I $(top_srcdir)/mc-$(VERSION)/vfs/extfs; done
mkdir $(top_srcdir)/mc-$(VERSION)/vfs/samba
mkdir $(top_srcdir)/mc-$(VERSION)/vfs/samba/include
mkdir $(top_srcdir)/mc-$(VERSION)/vfs/samba/lib
mkdir $(top_srcdir)/mc-$(VERSION)/vfs/samba/libsmb
mkdir $(top_srcdir)/mc-$(VERSION)/vfs/samba/param
mkdir $(top_srcdir)/mc-$(VERSION)/vfs/samba/smbwrapper
mkdir $(top_srcdir)/mc-$(VERSION)/vfs/samba/tests
mkdir $(top_srcdir)/mc-$(VERSION)/vfs/samba/ubiqx
(cd samba; $(CP) $(SAMBA_DIST_TOPLEVEL) ../../../mc-$(VERSION)/vfs/samba)
(cd samba/include; $(CP) $(SAMBA_DIST_INCLUDE)* ../../../../mc-$(VERSION)/vfs/samba/include)
(cd samba/lib; $(CP) $(SAMBA_DIST_LIB) ../../../../mc-$(VERSION)/vfs/samba/lib)
(cd samba/libsmb; $(CP) $(SAMBA_DIST_LIBSMB) ../../../../mc-$(VERSION)/vfs/samba/libsmb)
(cd samba/param; $(CP) $(SAMBA_DIST_PARAM) ../../../../mc-$(VERSION)/vfs/samba/param)
(cd samba/smbwrapper; $(CP) $(SAMBA_DIST_SMBWRAPPER) ../../../../mc-$(VERSION)/vfs/samba/smbwrapper)
(cd samba/tests; $(CP) $(SAMBA_DIST_TESTS) ../../../../mc-$(VERSION)/vfs/samba/tests)
(cd samba/ubiqx; $(CP) $(SAMBA_DIST_UBIQX) ../../../../mc-$(VERSION)/vfs/samba/ubiqx)
for I in $(SAMBA_DIST_TOPLEVEL); do $(CP) $(top_srcdir)/vfs/samba/$$I $(top_srcdir)/mc-$(VERSION)/vfs/samba; done
for I in $(SAMBA_DIST_INCLUDE); do $(CP) $(top_srcdir)/vfs/samba/include/$$I $(top_srcdir)/mc-$(VERSION)/vfs/samba/include; done
for I in $(SAMBA_DIST_LIB); do $(CP) $(top_srcdir)/vfs/samba/lib/$$I $(top_srcdir)/mc-$(VERSION)/vfs/samba/lib; done
for I in $(SAMBA_DIST_LIBSMB); do $(CP) $(top_srcdir)/vfs/samba/libsmb/$$I $(top_srcdir)/mc-$(VERSION)/vfs/samba/libsmb; done
for I in $(SAMBA_DIST_PARAM); do $(CP) $(top_srcdir)/vfs/samba/param/$$I $(top_srcdir)/mc-$(VERSION)/vfs/samba/param; done
for I in $(SAMBA_DIST_SMBWRAPPER); do $(CP) $(top_srcdir)/vfs/samba/smbwrapper/$$I $(top_srcdir)/mc-$(VERSION)/vfs/samba/smbwrapper; done
for I in $(SAMBA_DIST_TESTS); do $(CP) $(top_srcdir)/vfs/samba/tests/$$I $(top_srcdir)/mc-$(VERSION)/vfs/samba/tests; done
for I in $(SAMBA_DIST_UBIQX); do $(CP) $(top_srcdir)/vfs/samba/ubiqx/$$I $(top_srcdir)/mc-$(VERSION)/vfs/samba/ubiqx; done
depend dep: mcdep

View File

@ -133,11 +133,10 @@ distclean: cleansourcelinks
-$(RMF) $(srcdir)/Makefile
distcopy:
$(CP) $(DISTXV) ../../mc-$(VERSION)/xv
mkdir ../../mc-$(VERSION)/xv/support
mkdir ../../mc-$(VERSION)/xv/support/xview_private
cd support/xview_private; $(CP) $(XVSUPPXVHDRS) \
../../../../mc-$(VERSION)/xv/support/xview_private
for I in $(DISTXV); do $(CP) $(top_srcdir)/xv/$$I $(top_srcdir)/mc-$(VERSION)/xv; done
mkdir $(top_srcdir)/mc-$(VERSION)/xv/support
mkdir $(top_srcdir)/mc-$(VERSION)/xv/support/xview_private
for I in $(XVSUPPXVHDRS); do $(CP) $(top_srcdir)/xv/support/xview_private $(top_srcdir)/mc-$(VERSION)/xv/support/xview_private; done
install: install_@mxc@