Skip to content

Commit

Permalink
Updates to Makefiles to prepare for transition to automake.
Browse files Browse the repository at this point in the history
Fix a few bugs with "all" and "uninstall" targets to work when
$(builddir) != $(srcdir).  Added $(DESTDIR) to uninstall target.
Made $(distdir) related to current directory to match automake.
  • Loading branch information
Chris Bagwell committed Jan 17, 2009
1 parent c90e23a commit 88e5a02
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
2009-01-16 Chris Bagwell <cbagwell-guest at users.alioth.debian.org>
* doc/Makefile.in, frontend/Makefile.in, include/Makefile.in,
japi/Makefile.in, lib/Makefile.in, po/Makefile.in,
sanei/Makefile.in, testsuite/Makefile.in, tools/Makefile.in:
sanei/Makefile.in, testsuite/Makefile.in, tools/Makefile.in,
backend/Makefile.in:
Updates to Makefiles to prepare for transition to automake.
Fix a few bugs with "all" and "uninstall" targets to work when
$(builddir) != $(srcdir). Added $(DESTDIR) to uninstall target.
Expand Down
23 changes: 15 additions & 8 deletions backend/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ top_builddir = ..
PACKAGE = @PACKAGE@
VERSION = @VERSION@
package_version = @PACKAGE_STRING@
distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)
distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)/backend

prefix = @prefix@
exec_prefix = @exec_prefix@
Expand Down Expand Up @@ -214,7 +214,7 @@ DISTFILES = Makefile.in saned.conf.in sane_strstatus.c stubs.c \
v4l.c v4l.conf.in v4l-frequencies.h v4l.h \
xerox_mfp.c xerox_mfp.h

.PHONY: all clean depend dist distclean install uninstall
.PHONY: all clean depend dist distdir distclean install uninstall

libsane-%.la: %.lo %-s.lo $(EXTRA) $(LIBOBJS)
@$(LIBTOOL) $(MLINK) $(CC) -export-dynamic -o $@ $($*_LIBS) \
Expand Down Expand Up @@ -297,10 +297,10 @@ install-lockpath:
$(MKDIR) -m 775 -g $(LOCKPATH_GROUP) $(DESTDIR)$(locksanedir)

uninstall:
rm -rf $(libsanedir) $(configdir) $(locksanedir)
rm -f $(libdir)/libsane.*
rm -rf $(DESTDIR)$(libsanedir) $(DESTDIR)$(configdir) $(DESTDIR)$(locksanedir)
rm -f $(DESTDIR)$(libdir)/libsane.*
-for dir in $(FIRMWARE_DIRS) ; do \
rmdir $(datadir)/sane/$${dir} ; \
rmdir $(DESTDIR)$(datadir)/sane/$${dir} ; \
done

dll.lo: dll-preload.c
Expand Down Expand Up @@ -628,8 +628,15 @@ distclean: clean
rm -f $(DISTCLEAN_FILES)
rm -f Makefile libsane.so

dist: $(DISTFILES)
dist: distdir
distdir: $(DISTFILES)
for file in $(DISTFILES); do \
ln $$file $(distdir)/backend 2> /dev/null \
|| cp -p $$file $(distdir)/backend ; \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir) ; \
done

# Used by top level distcheck target
dvi:
check:
installcheck:
distuninstallcheck:

0 comments on commit 88e5a02

Please sign in to comment.