Prepare for factoring out common makefile code.
This commit is contained in:
parent
eab07b8789
commit
5cc68751fd
|
@ -1,3 +1,11 @@
|
||||||
|
2011-12-13 Keith Marshall <keithmarshall@users.sf.net>
|
||||||
|
|
||||||
|
* lib/ddk/Makefile.in (ddk_includedir): New macro; define it, then use
|
||||||
|
it in install-headers and uninstall-headers rules, in place of...
|
||||||
|
(inst_includedir): ...this; we then redefine this for consistency with
|
||||||
|
makefiles in other subdirectories, as a prerequisite to factoring out
|
||||||
|
of common code.
|
||||||
|
|
||||||
2011-12-12 Keith Marshall <keithmarshall@users.sf.net>
|
2011-12-12 Keith Marshall <keithmarshall@users.sf.net>
|
||||||
|
|
||||||
* Makefile.in (FLAGS_TO_PASS): Pointless macro; remove it. (Defaults
|
* Makefile.in (FLAGS_TO_PASS): Pointless macro; remove it. (Defaults
|
||||||
|
|
|
@ -37,14 +37,14 @@ endif
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
infodir = @infodir@
|
infodir = @infodir@
|
||||||
ifneq (,$(findstring cygwin,$(target_alias)))
|
ifneq (,$(findstring cygwin,$(target_alias)))
|
||||||
inst_includedir:=$(tooldir)/include/w32api/ddk
|
inst_includedir:=$(tooldir)/include/w32api
|
||||||
inst_libdir:=$(tooldir)/lib/w32api
|
inst_libdir:=$(tooldir)/lib/w32api
|
||||||
else
|
else
|
||||||
ifneq (,$(with_cross_host))
|
ifneq (,$(with_cross_host))
|
||||||
inst_includedir:=$(tooldir)/include/w32api/ddk
|
inst_includedir:=$(tooldir)/include/w32api
|
||||||
inst_libdir:=$(tooldir)/lib
|
inst_libdir:=$(tooldir)/lib
|
||||||
else
|
else
|
||||||
inst_includedir:=$(includedir)/ddk
|
inst_includedir:=$(includedir)
|
||||||
inst_libdir:=$(libdir)
|
inst_libdir:=$(libdir)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -159,13 +159,15 @@ install: install-libraries install-headers
|
||||||
install-libraries: all $(need-DESTDIR-compatibility)
|
install-libraries: all $(need-DESTDIR-compatibility)
|
||||||
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
|
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
|
||||||
for i in $(LIBS); do \
|
for i in $(LIBS); do \
|
||||||
$(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
|
$(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
ddk_includedir = ${inst_includedir}/ddk
|
||||||
|
|
||||||
install-headers: $(need-DESTDIR-compatibility)
|
install-headers: $(need-DESTDIR-compatibility)
|
||||||
$(mkinstalldirs) $(DESTDIR)$(inst_includedir)
|
$(mkinstalldirs) $(DESTDIR)${ddk_includedir}
|
||||||
for i in $(HEADERS); do \
|
for i in $(HEADERS); do \
|
||||||
$(INSTALL_DATA) $(srcdir)/../../include/ddk/$$i $(DESTDIR)$(inst_includedir)/$$i ; \
|
$(INSTALL_DATA) $(srcdir)/../../include/ddk/$$i $(DESTDIR)${ddk_includedir}; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# uninstall headers and libraries from a target specified directory
|
# uninstall headers and libraries from a target specified directory
|
||||||
|
@ -173,27 +175,27 @@ uninstall: uninstall-libraries uninstall-headers
|
||||||
|
|
||||||
uninstall-libraries: $(need-DESTDIR-compatibility)
|
uninstall-libraries: $(need-DESTDIR-compatibility)
|
||||||
@for i in $(LIBS); do \
|
@for i in $(LIBS); do \
|
||||||
rm -f $(DESTDIR)$(inst_libdir)/$$i ; \
|
rm -f $(DESTDIR)$(inst_libdir)/$$i; \
|
||||||
done
|
done
|
||||||
rmdir $(DESTDIR)$(inst_libdir)
|
rmdir $(DESTDIR)$(inst_libdir)
|
||||||
|
|
||||||
uninstall-headers: $(need-DESTDIR-compatibility)
|
uninstall-headers: $(need-DESTDIR-compatibility)
|
||||||
@for i in $(HEADERS); do \
|
@for i in $(HEADERS); do \
|
||||||
rm -r $(DESTDIR)$(inst_includedir)/$$i ; \
|
rm -r $(DESTDIR)${ddk_includedir}/$$i; \
|
||||||
done
|
done
|
||||||
rmdir $(DESTDIR)$(inst_includedir)
|
rmdir $(DESTDIR)${ddk_includedir}
|
||||||
|
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
mkdir $(distdir)/include/ddk
|
mkdir $(distdir)/include/ddk
|
||||||
chmod 755 $(distdir)/include/ddk
|
chmod 755 $(distdir)/include/ddk
|
||||||
@for i in $(HEADERS); do \
|
@for i in $(HEADERS); do \
|
||||||
cp -p $(srcdir)/../../include/ddk/$$i $(distdir)/include/ddk/$$i ; \
|
cp -p $(srcdir)/../../include/ddk/$$i $(distdir)/include/ddk/$$i; \
|
||||||
done
|
done
|
||||||
mkdir $(distdir)/lib/ddk
|
mkdir $(distdir)/lib/ddk
|
||||||
chmod 755 $(distdir)/lib/ddk
|
chmod 755 $(distdir)/lib/ddk
|
||||||
@for i in $(DISTFILES); do \
|
@for i in $(DISTFILES); do \
|
||||||
cp -p $(srcdir)/$$i $(distdir)/lib/ddk/$$i ; \
|
cp -p $(srcdir)/$$i $(distdir)/lib/ddk/$$i; \
|
||||||
done
|
done
|
||||||
|
|
||||||
Makefile: Makefile.in ../../config.status ../../configure
|
Makefile: Makefile.in ../../config.status ../../configure
|
||||||
|
|
Loading…
Reference in New Issue