summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
12545e3)
The `distcheck' target shows how you can do this, though it's rather
cumbersome.
### with preload-hacks; if not, write to the Free Software Foundation, Inc.,
### 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
### with preload-hacks; if not, write to the Free Software Foundation, Inc.,
### 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-VERSION := $(shell ./auto-version)
+VERSION := $(shell cd $(srcdir) && ./auto-version)
.SECONDEXPANSION: #sorry
###--------------------------------------------------------------------------
.SECONDEXPANSION: #sorry
###--------------------------------------------------------------------------
REAL_CFLAGS = $(CFLAGS) -fPIC -MD
REAL_LDFLAGS = $(LDFLAGS) -shared
REAL_CFLAGS = $(CFLAGS) -fPIC -MD
REAL_LDFLAGS = $(LDFLAGS) -shared
+## Allow user overrides for this stuff.
+-include config.mk
+
###--------------------------------------------------------------------------
### Quiet building.
###--------------------------------------------------------------------------
### Quiet building.
## Constructing the scripts.
$(SCRIPTS): %: withlib.in
## Constructing the scripts.
$(SCRIPTS): %: withlib.in
- $(call v_tag,GEN)sed "s/@lib@/$@/" withlib.in >$@.new && \
+ $(call v_tag,GEN)sed "s/@lib@/$@/" $(srcdir)/withlib.in >$@.new && \
chmod +x $@.new && mv $@.new $@
-include $(patsubst %.c,%d,$(ALL_SOURCES))
chmod +x $@.new && mv $@.new $@
-include $(patsubst %.c,%d,$(ALL_SOURCES))
$(MKDIRS) $(DESTDIR)$(libdir)
$(INST_BIN) $(LIBS) $(DESTDIR)$(libdir)
$(MKDIRS) $(DESTDIR)$(man1dir)
$(MKDIRS) $(DESTDIR)$(libdir)
$(INST_BIN) $(LIBS) $(DESTDIR)$(libdir)
$(MKDIRS) $(DESTDIR)$(man1dir)
- $(INST_MAN) $(MAN1) $(DESTDIR)$(man1dir)
+ $(INST_MAN) $(addprefix $(srcdir)/,$(MAN1)) $(DESTDIR)$(man1dir)
.PHONY: install
uninstall:
.PHONY: install
uninstall:
d=$${i%/*} && $(MKDIRS) $(distdir)/$$d || exit 1 \
;; \
esac; \
d=$${i%/*} && $(MKDIRS) $(distdir)/$$d || exit 1 \
;; \
esac; \
- cp $$i $(distdir)/$$i || exit 1; \
+ cp $(srcdir)/$$i $(distdir)/$$i || exit 1; \
mkdir _distcheck
+cd _distcheck && \
tar xvfz ../$(DISTTAR) && \
mkdir _distcheck
+cd _distcheck && \
tar xvfz ../$(DISTTAR) && \
- cd $(distdir) && \
- make && \
- make install DESTDIR=../_install && \
- make dist
+ mkdir _build && cd _build && \
+ make -f../$(distdir)/Makefile srcdir=../$(distdir) && \
+ make -f../$(distdir)/Makefile srcdir=../$(distdir) \
+ install DESTDIR=../_install && \
+ make -f../$(distdir)/Makefile srcdir=../$(distdir) dist
rm -rf _distcheck
###----- That's all, folks --------------------------------------------------
rm -rf _distcheck
###----- That's all, folks --------------------------------------------------