Prepare for factoring out common makefile code.

This commit is contained in:
Keith Marshall 2011-12-13 20:10:42 +00:00
parent eab07b8789
commit 5cc68751fd
2 changed files with 21 additions and 11 deletions

View File

@ -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>
* Makefile.in (FLAGS_TO_PASS): Pointless macro; remove it. (Defaults

View File

@ -37,14 +37,14 @@ endif
datadir = @datadir@
infodir = @infodir@
ifneq (,$(findstring cygwin,$(target_alias)))
inst_includedir:=$(tooldir)/include/w32api/ddk
inst_includedir:=$(tooldir)/include/w32api
inst_libdir:=$(tooldir)/lib/w32api
else
ifneq (,$(with_cross_host))
inst_includedir:=$(tooldir)/include/w32api/ddk
inst_includedir:=$(tooldir)/include/w32api
inst_libdir:=$(tooldir)/lib
else
inst_includedir:=$(includedir)/ddk
inst_includedir:=$(includedir)
inst_libdir:=$(libdir)
endif
endif
@ -162,10 +162,12 @@ install-libraries: all $(need-DESTDIR-compatibility)
$(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i; \
done
ddk_includedir = ${inst_includedir}/ddk
install-headers: $(need-DESTDIR-compatibility)
$(mkinstalldirs) $(DESTDIR)$(inst_includedir)
$(mkinstalldirs) $(DESTDIR)${ddk_includedir}
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
# uninstall headers and libraries from a target specified directory
@ -179,9 +181,9 @@ uninstall-libraries: $(need-DESTDIR-compatibility)
uninstall-headers: $(need-DESTDIR-compatibility)
@for i in $(HEADERS); do \
rm -r $(DESTDIR)$(inst_includedir)/$$i ; \
rm -r $(DESTDIR)${ddk_includedir}/$$i; \
done
rmdir $(DESTDIR)$(inst_includedir)
rmdir $(DESTDIR)${ddk_includedir}
dist: