Commit da477047 authored by Mike Gabriel's avatar Mike Gabriel

Makefile targets: Rewriting and consolidating the target structure for nx-X11/…

Makefile targets: Rewriting and consolidating the target structure for nx-X11/ subdir (except nx-X11/lib/).
parent 13bf7c03
...@@ -65,26 +65,24 @@ NX_XTRANS_HEADERS = \ ...@@ -65,26 +65,24 @@ NX_XTRANS_HEADERS = \
Xtransutil.c \ Xtransutil.c \
$(NULL) $(NULL)
%: all: build
if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp "$@"; fi
if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy "$@"; fi clean:
if test -d nx-X11; then \ if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp clean; fi
if test -f nx-X11/lib/Makefile; then ${MAKE} -C nx-X11/lib "$@"; fi; \ if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy clean; fi
if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad "$@"; fi; \ if test -f nx-X11/lib/Makefile; then ${MAKE} -C nx-X11/lib clean; fi
if test -f nx-X11/Makefile; then ${MAKE} -C nx-X11 "$@"; fi; \ if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad clean; fi
fi if test -d nx-X11; then ${MAKE} clean-env; fi
# clean auto-generated files distclean: clean
if [ "x$@" == "xclean" ] || [ "x$@" = "xdistclean" ]; then \ if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp distclean; fi
if [ -x ./mesa-quilt ]; then ./mesa-quilt pop -a; fi; \ if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy distclean; fi
rm -Rf nx-X11/extras/Mesa/.pc/; \ if test -f nx-X11/lib/Makefile; then ${MAKE} -C nx-X11/lib distclean; fi
rm -f nx-X11/config/cf/nxversion.def; \ if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad distclean; fi
rm -f nx-X11/config/cf/date.def; \ if test -d nx-X11; then ${MAKE} -C nx-X11 distclean; fi
${MAKE} clean-env; \ if [ -x ./mesa-quilt ]; then ./mesa-quilt pop -a; fi
fi rm -Rf nx-X11/extras/Mesa/.pc/
rm -f nx-X11/config/cf/nxversion.def
all:
${MAKE} build
test: test:
echo "No testing for NX (redistributed)" echo "No testing for NX (redistributed)"
...@@ -126,9 +124,7 @@ clean-env: version ...@@ -126,9 +124,7 @@ clean-env: version
[ -d exports/include/nx-X11/Xtrans ] && $(RM_DIR) exports/include/nx-X11/Xtrans/ || : [ -d exports/include/nx-X11/Xtrans ] && $(RM_DIR) exports/include/nx-X11/Xtrans/ || :
[ -d exports/include/nx-X11/ ] && $(RM_DIR) exports/include/nx-X11/ || : [ -d exports/include/nx-X11/ ] && $(RM_DIR) exports/include/nx-X11/ || :
# no parallel clean-up in nx-X11, it fails... ${MAKE} -C nx-X11 clean FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES)"
# see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895540
${MAKE} -j1 -C nx-X11 CleanEnv FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES)"
build-lite: build-lite:
cd nxcomp && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE} cd nxcomp && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE}
......
...@@ -24,8 +24,8 @@ MAKE_OPTS = -f xmakefile ...@@ -24,8 +24,8 @@ MAKE_OPTS = -f xmakefile
MAKE_CMD = $(MAKE) $(MAKE_OPTS) MAKE_CMD = $(MAKE) $(MAKE_OPTS)
all: all:
@${MAKE_CMD} xmakefile-exists || $(MAKE) all-initial @${MAKE} ${MAKE_OPTS} xmakefile-exists || $(MAKE) all-initial
@${MAKE_CMD} $@ @${MAKE} ${MAKE_OPTS} $@
all-initial: all-initial:
@echo Please use make World, or on NT use nmake World.Win32. @echo Please use make World, or on NT use nmake World.Win32.
...@@ -33,57 +33,44 @@ all-initial: ...@@ -33,57 +33,44 @@ all-initial:
@echo Read the release notes carefully before proceeding. @echo Read the release notes carefully before proceeding.
@echo Do not name your log file make.log or it will be deleted. @echo Do not name your log file make.log or it will be deleted.
World: World: BuildEnv
@echo "" @echo ""
@echo Building $(RELEASE). @echo Building $(RELEASE).
@echo "" @echo ""
@date @date
@echo "" @echo ""
if [ ! -f xmakefile ]; then ${MAKE} ${MFLAGS} BuildEnv; fi ${MAKE} ${MAKE_OPTS} $(MFLAGS) $(WORLDOPTS) World
${MAKE_CMD} $(MFLAGS) $(WORLDOPTS) World
@echo "" @echo ""
@date @date
@echo "" @echo ""
@echo Full build of $(RELEASE) complete. @echo Full build of $(RELEASE) complete.
@echo "" @echo ""
CleanEnv: CleanEnv: SetupEnv
@if [ -f xmakefile ]; then \ ${MAKE} ${MAKE_OPTS} -k clean
${MAKE_CMD} -k distclean || \ rm -f $(IRULESRC)/date.def; echo "" > $(IRULESRC)/date.def;
${MAKE_CMD} -k clean || \
$(RM) xmakefile; \
fi
@rm -f $(IRULESRC)/date.def; echo "" > $(IRULESRC)/date.def;
which $(IMAKE) 1>/dev/null && ${MAKE} $(MFLAGS) xmakefile || :
@if [ -f xmakefile ]; then \
${MAKE_CMD} $(MFLAGS) VerifyOS; \
${MAKE_CMD} $(MFLAGS) Makefiles; \
${MAKE_CMD} $(MFLAGS) BOOTSTRAPSUBDIRS= clean; \
fi
BuildEnv: CleanEnv BuildIncludes BuildDependsOnly SetupEnv: xmakefile VerifyOS Makefiles
BuildIncludes: CleanEnv BuildEnv: SetupEnv BuildIncludes BuildDependsOnly
${MAKE_CMD} $(MFLAGS) includes
BuildDependsOnly: BuildIncludes: SetupEnv includes
${MAKE_CMD} $(MFLAGS) depend
.PRECIOUS: Makefile BuildDependsOnly: SetupEnv depend
# This is just a sequence of bootstrapping steps we have to do.
# The steps are listed as separate targets so clearmake can wink in
# the Makefile.proto files.
Makefile:: Makefile::
$(MAKE) $(MFLAGS) xmakefile $(MAKE) $(MFLAGS) xmakefile
.PRECIOUS: Makefile
xmakefile: Imakefile xmakefile:
@if [ -f xmakefile ]; then set -x; \ if [ -f xmakefile ]; then \
$(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak; \ set -x; \
else exit 0; fi $(RM) xmakefile.bak; \
@rm -f $(IRULESRC)/date.def; echo "" > $(IRULESRC)/date.def; $(MV) xmakefile xmakefile.bak; \
$(IMAKE_CMD) -s xmakefile -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) else \
exit 0; \
fi
which $(IMAKE) 1>/dev/null && $(IMAKE_CMD) -s xmakefile -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
# don't allow any default rules in this Makefile # don't allow any default rules in this Makefile
.SUFFIXES: .SUFFIXES:
...@@ -92,36 +79,48 @@ xmakefile: Imakefile ...@@ -92,36 +79,48 @@ xmakefile: Imakefile
# a copy of every rule that might be invoked at top level # a copy of every rule that might be invoked at top level
clean: clean: CleanEnv
-${MAKE_CMD} $@
find config lib programs include -type f -name Makefile | while read makefile; do rm -f $$makefile; done dangerous_strip_clean: xmakefile
${MAKE} ${MAKE_OPTS} $@
dangerous_strip_clean:
${MAKE_CMD} $@ distclean: clean
distclean: -${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
-${MAKE_CMD} $@ find config programs include -type f -name Makefile | while read makefile; do rm -f $$makefile; done
$(RM) xmakefile $(RM) xmakefile
depend:
${MAKE_CMD} $@ depend: xmakefile
Everything: ${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
${MAKE_CMD} $@
external.ln: Everything: SetupEnv
${MAKE_CMD} $@ ${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
includes:
${MAKE_CMD} $@ external.ln: xmakefile
install.sdk: ${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
${MAKE_CMD} $@
install.ln: includes: xmakefile VerifyOS Makefiles
${MAKE_CMD} $@ ${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
install.man:
${MAKE_CMD} $@ install.sdk: SetupEnv
install: ${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
${MAKE_CMD} $@
Makefiles: install.ln: SetupEnv
${MAKE_CMD} $@ ${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
man_keywords:
${MAKE_CMD} $@ install.man: SetupEnv
tags: ${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
${MAKE_CMD} $@
VerifyOS: install: SetupEnv
${MAKE_CMD} $@ ${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
Makefiles: xmakefile VerifyOS
${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
man_keywords: SetupEnv
${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
tags: xmakefile
${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
VerifyOS: xmakefile
${MAKE} ${MAKE_OPTS} ${MFLAGS} $@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment