Ticket #44526: patch-Makefiles.diff

File patch-Makefiles.diff, 2.2 KB (added by RJVB (René Bertin), 10 years ago)
  • src/Makefile.bootstrap

    diff -r b193168bad98 src/Makefile.bootstrap
     
    66
    77# Rule to generate the qmake Makefile for building xxdiff.
    88QMAKE ?= /usr/bin/qmake-qt4
     9MAKEDIR ?= .
    910
    1011all: Makefile
    1112
     
    1516    export QMAKESPEC=macx-g++
    1617endif
    1718
    18 Makefile.qmake: xxdiff.pro
     19Makefile.qmake: $(MAKEDIR)/xxdiff.pro
    1920        $(QMAKE) -o Makefile.qmake $<
    2021
    21 Makefile: Makefile.qmake Makefile.extra
    22         cat $^ > Makefile
     22Makefile: Makefile.qmake $(MAKEDIR)/Makefile.extra
     23        echo "MAKEDIR = $(MAKEDIR)" > Makefile
     24        cat $^ >> Makefile
    2325
  • src/Makefile.extra

    diff -r b193168bad98 src/Makefile.extra
     
    44#
    55
    66# Extra targets.
    7 EXTRA_FILES = version.h doc.h
     7EXTRA_FILES = version.h $(MAKEDIR)/doc.h
    88
    99.SUFFIXES: .html .txt .h
    1010
     
    2323#
    2424
    2525# Automatically generate a simple include file with version number in it.
    26 version.h: ../VERSION
    27         echo "#define XX_VERSION \"`cat ../VERSION`\"" > $@
     26version.h: $(MAKEDIR)/../VERSION
     27        echo "#define XX_VERSION \"`cat $(MAKEDIR)/../VERSION`\"" > $@
    2828
    2929# Dependencies for the generated version file.
    3030proginfo.o: version.h
     
    4141        sed -e 's/\"/\\\"/g;s/$$/\\n\\/;1s/^/char text[]=\"/;$$s/\\$$/\"\;/' $< > $@
    4242
    4343# Dependencies for the generated documentation file.
    44 help.o: doc.h
    45 help.obj: doc.h
     44help.o: $(MAKEDIR)/doc.h
     45help.obj: $(MAKEDIR)/doc.h
    4646
    4747# Convert the reStructuredText documentation to html.  (this is only used by the
    4848# author, directly, manually, not that important for xxdiff packagers.)
    49 .txt.html:
    50         rst2html.py --output-encoding=iso-8859-1 $< $@
     49#.txt.html:
     50#       rst2html.py --output-encoding=iso-8859-1 $< $@
    5151
    5252#
    5353# clean_extra
     
    6060        rm -f $(EXTRA_FILES)
    6161
    6262
    63 # Override the qmake we use because the one in the path might be different.
    64 QMAKE = $(QTDIR)/bin/qmake
    65 
    6663
    6764# Note: we would need to add this to be correct.  Danger!  If the Makefile gets
    6865# remade, this file does not get appended again to the new makefile!
    6966all: Makefile
    7067
    71 Makefile: xxdiff.pro
    72         $(MAKE) -f Makefile.bootstrap Makefile
     68Makefile: $(MAKEDIR)/xxdiff.pro
     69        $(MAKE) -f $(MAKEDIR)/Makefile.bootstrap Makefile