Skip to content

Commit

Permalink
more build system tweakery
Browse files Browse the repository at this point in the history
maybe one of these days I'll figure out how to fix issue #6 properly...

Change-Id: Iee539af59fa527261b7d7d54f856127363e8338d
  • Loading branch information
cooljeanius committed Jan 8, 2024
1 parent 4bab730 commit 0738e54
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 129 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/apple-gdb-1824-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ jobs:
fi
date && sync
brew install autogen texi2html texinfo deja-gnu expect dmalloc fastjar openssl@3 gperf help2man ant-contrib findutils grep coreutils remake byacc texlive gawk "${COMPILER_FORMULA}"
- run: test -e ./.profile_generic && test -r ./.profile_generic && source ./.profile_generic && sync && (env | uniq | sort | uniq) && sync
- run: test -e ./.profile_generic && test -r ./.profile_generic && source ./.profile_generic && sync && (env | uniq | sort | uniq) && sync && sleep 1
- run: ./configure --enable-silent-rules CC=${{ matrix.compiler }} OBJC=${{ matrix.compiler }}
- run: make -ki -C libcheckpoint || make -ki -C libcheckpoint -f Makefile_orig || make -ki -C macsbug || make -ki -C macsbug/gdb_plugin_support || (if test -x "$(which ant)"; then ant; else echo "ant missing"; fi)
- run: if test ! -e libcheckpoint/libcheckpoint.dylib; then (sync && echo "ensuring libcheckpoint is built" && sync && make -ki -C libcheckpoint -f Makefile_orig RC_CFLAGS="-std=gnu89 -w -Wno-error" && sync) || (sync && make -ki -C macsbug) || (sync && make -ki -C macsbug/gdb_plugin_support) || (if test -x "$(which ant)"; then ant; else echo "ant missing"; fi); else (sync && stat libcheckpoint/libcheckpoint.dylib); fi
- run: if test -d .. && test -w .. && test ! -e ../gdb; then (echo "symlinking source directory" && pushd .. && sync && ln -sv apple-gdb-1824 gdb && sync && readlink gdb && sync && popd); else (sync && stat .. && ls ..); fi
- run: if test -d .. && test -w .. && test ! -e ../gdb; then (sync && echo "symlinking source directory" && pushd .. && sync && ln -sv apple-gdb-1824 gdb && sync && readlink gdb && sync && popd); else (sync && stat .. && ls ..); fi
- run: (if test -n "$(type ant 2>/dev/null)" && test -x "$(which ant)" && test -r build.xml; then if test ! -d build; then mkdir build; elif test ! -d "${HOME}"/work/apple-gdb-1824/build; then mkdir -pv "${HOME}"/work/apple-gdb-1824/build; fi; ant; else (echo "ant missing" && sync); fi) || (if test -x ./gradlew; then (./gradlew build || ./gradlew assemble || ./gradlew); elif test -r ./gradlew; then sh ./gradlew; elif test -e ./gradlew; then stat ./gradlew; else echo "gradlewrapper missing"; fi) || (if test -x "$(which gradle)"; then gradle; else echo "gradle missing"; fi) || (if test -x ~rc/bin/buildit; then sudo ~rc/bin/buildit "$(pwd)" -arch ppc -arch i386 -arch armv5 -target cross -project gdb -release RELEASENAME RC_CROSS_ARCHS=armv6; else echo "buildit missing"; fi) || ls
- run: (if test -x ./gradlew; then (./gradlew build || ./gradlew assemble || ./gradlew); elif test -r ./gradlew; then sh ./gradlew; elif test -e ./gradlew; then stat ./gradlew; else echo "gradlewrapper missing" >&2; fi) || (if test -x "$(which gradle)"; then gradle; else echo "gradle missing"; fi) || (if test -x ~rc/bin/buildit; then sudo ~rc/bin/buildit "$(pwd)" -arch ppc -arch i386 -arch armv5 -target cross -project gdb -release RELEASENAME RC_CROSS_ARCHS=armv6; else echo "buildit missing"; fi) || ls
- run: cd src && ./configure --disable-werror --disable-opts-test --enable-carbon-framework --enable-debug-symbols-framework --enable-64-bit-bfd --enable-silent-rules CC=${{ matrix.compiler }} OBJC=${{ matrix.compiler }}
- run: cd src && make configure-bfd
- run: cd src && sync && make -C bfd headers && sync
- run: cd src && if test ! -e bfd/bfd.h; then (sync && make -C bfd bfd.h); else (sync && stat bfd/bfd.h); fi
- run: cd src && if test ! -e bfd/bfd.h; then (sync && make -C bfd bfd.h); else (sync && stat bfd/bfd.h); fi && sync && find . -name bfd.h -print && sync
- run: cd src && make -C bfd diststuff
- run: cd src && make all-bfd
- run: if test ! -e macsbug/MacsBug_plugin; then make -ki -C macsbug || make -ki -C macsbug/gdb_plugin_support || (if test -x "$(which ant)"; then ant; else echo "ant missing"; fi); else stat macsbug/MacsBug_plugin; fi
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
else \
sync && (ls ./*.h || ls || pwd); \
fi
sync && find . -name arparse.h -type f -print
sync && find . -name arparse.h -type f -print && sync
- run: cd src && make all-binutils
- run: cd src && make all-cgen && make all-libiberty && make all-intl
- run: cd src && make all-electric-fence
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apple-gdb-1824.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- run: test -e ./.profile_generic && source ./.profile_generic && (env | uniq | sort | uniq) && sync && sleep 1
- run: cd src && ./configure --with-x --disable-werror --disable-opts-test --enable-64-bit-bfd --enable-silent-rules --with-system-zlib CC=${{ matrix.compiler }} OBJC=${{ matrix.compiler }}
- run: cd src && make configure-bfd
- run: cd src && make -C bfd headers && (ls bfd/bfd*.h || stat bfd) && sleep 1
- run: cd src && sync && make -C bfd headers && sync && (ls bfd/bfd*.h || stat bfd) && sync && sleep 1
- run: cd src && if test ! -e bfd/bfd.h; then make -C bfd bfd.h; else stat bfd/bfd.h; fi && find . -name bfd.h -print && sleep 1
- run: cd src && if test -e autogen/Makefile; then make -C autogen; elif test -d autogen; then (echo "listing autogen Makefiles present" && ls autogen/Makefile* && sleep 1); else echo "skipping autogen"; fi
- run: cd src && make -C bfd diststuff
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
(sync && stat /home/runner/work/apple-gdb-1824/build); \
fi
(cd src && sync && echo "now in $(pwd)..." && sync)
if test ${{ matrix.language }} == 'go'; then sleep 1; fi
if test ${{ matrix.language }} == 'go' || test ${{ matrix.language }} == 'csharp'; then sleep 1; fi
- name: Dependencies
if: matrix.language == 'c-cpp'
Expand Down
5 changes: 5 additions & 0 deletions libcheckpoint/Makefile_orig
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ $(SYMROOT)/$(LIB) : $(OBJS)
-current_version 1 $(OBJS) -framework ApplicationServices
stat $(SYMROOT)/$(LIB) || stat $(GDBDIR)/$(LIB) || stat $(OBJS)
du $(SYMROOT)/$(LIB) || du $(GDBDIR)/$(LIB) || du $(OBJS)
if test -x "`which machocheck`"; then \
machocheck -progress $(SYMROOT)/$(LIB) || test -r $(SYMROOT)/$(LIB); \
else \
echo "no usable machocheck found; skipping running on $(SYMROOT)/$(LIB)"; \
fi
119 changes: 83 additions & 36 deletions src/bfd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ stamp-lofiles: Makefile @MAINT@ $(PATH_TO_MOVEIFCHANGE)
done; \
echo $${f} $(AM_V_redir) tlofiles
$(RUN_MOVEIFCHANGE) tlofiles lofiles
$(AM_V_at)touch stamp-lofiles
$(AM_V_at)if test stamp-lofiles -ot lofiles; then touch stamp-lofiles; fi

stamp-ofiles: Makefile @MAINT@ $(PATH_TO_MOVEIFCHANGE)
rm -f $(AM_V_v) tofiles
Expand All @@ -1011,7 +1011,7 @@ stamp-ofiles: Makefile @MAINT@ $(PATH_TO_MOVEIFCHANGE)
done; \
echo $${f} $(AM_V_redir) tofiles
$(RUN_MOVEIFCHANGE) tofiles ofiles
$(AM_V_at)touch stamp-ofiles
$(AM_V_at)if test stamp-ofiles -ot ofiles; then touch stamp-ofiles; fi

stamp-plistfiles: Makefile @MAINT@ $(PATH_TO_MOVEIFCHANGE)
rm -f $(AM_V_v) tplistfiles
Expand All @@ -1024,7 +1024,9 @@ stamp-plistfiles: Makefile @MAINT@ $(PATH_TO_MOVEIFCHANGE)
done; \
echo $${f} $(AM_V_redir) tplistfiles
$(RUN_MOVEIFCHANGE) tplistfiles plistfiles
$(AM_V_at)touch stamp-plistfiles
$(AM_V_at)if test stamp-plistfiles -ot plistfiles; then \
touch stamp-plistfiles; \
fi

lofiles: stamp-lofiles
@echo "this target, '$@', just makes its dependency, '$<'"
Expand Down Expand Up @@ -1097,7 +1099,7 @@ stamp-lib: libbfd.la @MAINT@ ofiles $(PATH_TO_MOVEIFCHANGE) ltmain.sh
$(RANLIB) libbfd.a; \
fi; \
fi
$(AM_V_at)touch stamp-lib
$(AM_V_at)if test $@ -ot stamp-staticlib; then touch stamp-lib; fi

# since OFILES no longer works as a dependency, have to make it explicitly
# as part of a rule instead:
Expand All @@ -1110,8 +1112,14 @@ stamp-staticlib: stamp-ofiles @MAINT@ bfd.h
fi
if [ -f libbfd.a ]; then \
$(RANLIB) libbfd.a; \
elif [ -f $(srcdir)/libbfd.a ]; then \
cp $(AM_V_v) $(srcdir)/libbfd.a .; \
elif [ -f $(builddir)/libbfd.a ]; then \
cp $(AM_V_v) $(builddir)/libbfd.a .; \
else \
echo "$@ target: warning: missing libbfd.a" >&2; \
fi
$(AM_V_at)touch stamp-staticlib
$(AM_V_at)if test $@ -ot libbfd.a; then touch stamp-staticlib; fi

# likewise with making PLISTFILES when running `make check`:
check-local: stamp-plistfiles @MAINT@ plistfiles
Expand Down Expand Up @@ -1297,7 +1305,7 @@ DEP: dep.sed $(CFILES) $(HFILES) bfd.h
else \
mv -f $(AM_V_v) DEPA $@; \
fi
$(AM_V_at)touch $@
$(AM_V_at)if test $@ -ot dep.sed; then touch $@; fi
# I also want to include a check for variables not being closed properly
# (missing parentheses), but I am not sure how to do that in a way where
# the bad syntax for which we would be grepping does not also get
Expand All @@ -1310,39 +1318,43 @@ DEP1: $(CFILES)
echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >>DEP2
$(MKDEP) $(AM_CPPFLAGS) $(CFLAGS) $? $(AM_V_redir_a) DEP2
mv -f $(AM_V_v) DEP2 $@
$(AM_V_at)touch $@
$(AM_V_at)if test $@ -ot DEP2; then touch $@; fi

#FIXME: this sed script is broken and hack-ish:
dep.sed: dep-in.sed @MAINT@ config.status
$(SED) <$(srcdir)/dep-in.sed >dep.sed \
-e 's!@BFD_H@!$(BFD_H)!' \
-e 's!@SRCDIR@!$(srcdir)!' \
-e 's!@TOPDIR@!'`echo $(srcdir) | $(SED) -e s,/bfd$$,,`'!'
touch $@
if test $@ -ot dep-in.sed; then touch $@; fi

#FIXME: this target relies on dep.sed, which is broken (see above)
dep: DEP @MAINT@ $(PATH_TO_MOVEIFCHANGE)
$(SED) -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
cat DEP >> tmp-Makefile
$(RUN_MOVEIFCHANGE) tmp-Makefile Makefile
$(AM_V_at)touch Makefile
$(AM_V_at)if test Makefile -ot DEP; then touch Makefile; fi

#FIXME: this target relies on dep.sed, which is broken (see above)
dep-in: DEP @MAINT@ $(PATH_TO_MOVEIFCHANGE)
$(SED) -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
cat DEP >> tmp-Makefile.in
$(RUN_MOVEIFCHANGE) tmp-Makefile.in $(srcdir)/Makefile.in
$(AM_V_at)touch $(srcdir)/Makefile.in
$(AM_V_at)if test $(srcdir)/Makefile.in -ot DEP; then \
touch $(srcdir)/Makefile.in; \
fi

#FIXME: this target relies on dep.sed, which is broken (see above)
dep-am: DEP @MAINT@ $(PATH_TO_MOVEIFCHANGE)
@echo "this target is broken/dangerous; not letting you use it" >&2
@echo "edit Makefile.am if you have fixed things"
@echo "edit Makefile.am manually if you have fixed things"
exit 1
$(SED) -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
cat DEP >> tmp-Makefile.am
$(RUN_MOVEIFCHANGE) tmp-Makefile.am $(srcdir)/Makefile.am
$(AM_V_at)touch $(srcdir)/Makefile.am
$(AM_V_at)if test $(srcdir)/Makefile.am -ot DEP; then \
touch $(srcdir)/Makefile.am; \
fi

# Some manually-specified dependencies:
archive64.o: archive64.lo
Expand Down Expand Up @@ -1398,15 +1410,17 @@ $(BFD_H): stmp-bfd-h $(srcdir)/bfd-in2.h bfd-in3.h $(srcdir)/libbfd.h \
fi; \
else \
echo "checking status of BFD_H ($(BFD_H))..." && stat $(BFD_H); \
echo "also checking its length..." && wc -l $(BFD_H); \
echo "also checking its disk usage..." && du $(BFD_H); \
fi

stmp-bfd-h: bfd-in3.h @MAINT@ headers @MAINT@ $(PATH_TO_MOVEIFCHANGE)
rm -f $(AM_V_v) bfd-tmp.h
cp $(AM_V_v) bfd-in3.h bfd-tmp.h
$(RUN_MOVEIFCHANGE) bfd-tmp.h $(BFD_H)
$(AM_V_at)touch $(BFD_H)
$(AM_V_at)if test $(BFD_H) -ot $@; then touch $(BFD_H); fi
rm -f $(AM_V_v) bfd-tmp.h
touch $@
if test $@ -ot bfd-in3.h; then touch $@; fi

BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
reloc.c syms.c bfd.c bfdio.c bfdwin.c \
Expand Down Expand Up @@ -1439,7 +1453,7 @@ stamp-framework-headers: bfd.h headers
cp -p $(AM_V_v) $(srcdir)/*.h $(FRAMEWORK).framework/Versions/Current/Headers/
cp -p $(AM_V_v) *.h $(FRAMEWORK).framework/Versions/Current/Headers/
cp -p $(AM_V_v) $(BFD_H_DEPS) $(FRAMEWORK).framework/Versions/Current/Headers/
$(AM_V_at)touch stamp-framework-headers
$(AM_V_at)if test $@ -ot bfd.h; then touch stamp-framework-headers; fi

stamp-framework: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
$(MAKE) $(FRAMEWORK_OFILES)
Expand All @@ -1448,7 +1462,6 @@ stamp-framework: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
$(MKDIR_P) $(AM_V_v) $(FRAMEWORK).framework/Versions/$(FRAMEWORK_VERSION)/Resources
$(LN_S) $(AM_V_v) Versions/Current/Resources $(FRAMEWORK).framework/Resources
$(MKDIR_P) $(AM_V_v) $(FRAMEWORK).framework/Versions/Current/Resources/English.lproj

set -ex; \
if [ "x$(FRAMEWORK_SUFFIX)" != "x" ]; then \
test -n "$(FRAMEWORK_SUFFIX)" && echo "$(FRAMEWORK_SUFFIX)"; \
Expand All @@ -1462,15 +1475,21 @@ stamp-framework: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
$(NSLIBTOOL) -arch $(HOST_ARCHITECTURE) -compatibility_version 1 -current_version 1 -install_name /System/Library/PrivateFrameworks/$(FRAMEWORK).framework/Versions/$(FRAMEWORK_VERSION)/$(FRAMEWORK_PREFIX)$(FRAMEWORK) -o $(FRAMEWORK).framework/Versions/Current/$(FRAMEWORK_PREFIX)$(FRAMEWORK) $(FRAMEWORK_OFILES) $(FRAMEWORK_LIB); \
$(LN_S) $(AM_V_v) Versions/Current/$(FRAMEWORK_PREFIX)$(FRAMEWORK) $(FRAMEWORK).framework/$(FRAMEWORK_PREFIX)$(FRAMEWORK); \
fi
$(AM_V_at)touch stamp-framework
$(AM_V_at)if test $@ -ot stamp-framework-headers; then touch $@; fi
# APPLE LOCAL end framework building.

# Could really use a "copy-if-change"...
headers: $(sdocdir)/Makefile stmp-bin2-h stmp-lbfd-h stmp-lcoff-h @MAINT@ $(PATH_TO_MOVEIFCHANGE)
(cd $(sdocdir); $(MAKE) protos $(FLAGS_TO_PASS))
(cd $(sdocdir); $(MAKE) libbfd.h $(FLAGS_TO_PASS))
(cd $(sdocdir); $(MAKE) libcoff.h $(FLAGS_TO_PASS))
(cd $(sdocdir); $(MAKE) bfd.h $(FLAGS_TO_PASS))
if test ! -e $(sdocdir)/libbfd.h || test $(sdocdir)/libbfd.h -ot $(sdocdir)/Makefile; then \
(cd $(sdocdir); $(MAKE) libbfd.h $(FLAGS_TO_PASS)); \
fi
if test ! -e $(sdocdir)/libcoff.h || test $(sdocdir)/libcoff.h -ot $(sdocdir)/Makefile; then \
(cd $(sdocdir); $(MAKE) libcoff.h $(FLAGS_TO_PASS)); \
fi
if test ! -e $(sdocdir)/bfd.h || test $(sdocdir)/bfd.h -ot $(sdocdir)/Makefile; then \
(cd $(sdocdir); $(MAKE) bfd.h $(FLAGS_TO_PASS)); \
fi
if test $(srcdir) != "."; then \
echo "out-of-tree build detected; checking back in srcdir ($(srcdir)) for $@..."; \
(cd $(sdocdir); $(MAKE) $(srcdir)/libbfd.h $(FLAGS_TO_PASS)); \
Expand All @@ -1479,15 +1498,34 @@ headers: $(sdocdir)/Makefile stmp-bin2-h stmp-lbfd-h stmp-lcoff-h @MAINT@ $(PATH
else \
echo "$@ target: already in srcdir ($(srcdir)): `pwd`"; \
fi
cp $(AM_V_v) $(sdocdir)/bfd.h bfd-in2.h-new
$(RUN_MOVEIFCHANGE) bfd-in2.h-new $(srcdir)/bfd-in2.h
$(AM_V_at)touch $(srcdir)/bfd-in2.h
cp $(AM_V_v) $(sdocdir)/libbfd.h libbfd.h-new
$(RUN_MOVEIFCHANGE) libbfd.h-new $(srcdir)/libbfd.h
$(AM_V_at)touch $(srcdir)/libbfd.h
cp $(AM_V_v) $(sdocdir)/libcoff.h libcoff.h-new
$(RUN_MOVEIFCHANGE) libcoff.h-new $(srcdir)/libcoff.h
$(AM_V_at)touch $(srcdir)/libcoff.h
if test ! -e bfd-in2.h-new || test bfd-in2.h-new -ot $(sdocdir)/bfd.h; then \
cp $(AM_V_v) $(sdocdir)/bfd.h bfd-in2.h-new; \
$(RUN_MOVEIFCHANGE) bfd-in2.h-new $(srcdir)/bfd-in2.h; \
fi
$(AM_V_at)if test $(srcdir)/bfd-in2.h -ot stmp-bin2-h; then \
touch $(srcdir)/bfd-in2.h; \
elif test stmp-bin2-h -ot $(srcdir)/bfd-in2.h; then \
touch stmp-bin2-h; \
fi
if test ! -e libbfd.h-new || test libbfd.h-new -ot $(sdocdir)/libbfd.h; then \
cp $(AM_V_v) $(sdocdir)/libbfd.h libbfd.h-new; \
$(RUN_MOVEIFCHANGE) libbfd.h-new $(srcdir)/libbfd.h; \
fi
$(AM_V_at)if test $(srcdir)/libbfd.h -ot stmp-lbfd-h; then \
touch $(srcdir)/libbfd.h; \
elif test stmp-lbfd-h -ot $(srcdir)/libbfd.h; then \
touch stmp-lbfd-h; \
fi
if test ! -e libcoff.h-new || test libcoff.h-new -ot $(sdocdir)/libcoff.h; then \
cp $(AM_V_v) $(sdocdir)/libcoff.h libcoff.h-new; \
$(RUN_MOVEIFCHANGE) libcoff.h-new $(srcdir)/libcoff.h; \
fi
$(AM_V_at)if test $(srcdir)/libcoff.h -ot stmp-lcoff-h; then \
touch $(srcdir)/libcoff.h; \
elif test stmp-lcoff-h -ot $(srcdir)/libcoff.h; then \
touch stmp-lcoff-h; \
fi
-rm -f $(AM_V_v) *.h-new || echo "done with $@ target"
.PHONY: headers

$(sdocdir)/Makefile: $(sdocdir)/Makefile.in $(top_builddir)/config.status
Expand Down Expand Up @@ -1541,8 +1579,11 @@ stmp-bin2-h: $(sdocdir)/Makefile $(BFD_H_FILES) $(BFD64_H_FILES) @MAINT@ $(PATH_
fi
cp $(AM_V_v) $(sdocdir)/bfd.h bfd-in2.h-new
$(RUN_MOVEIFCHANGE) bfd-in2.h-new $(srcdir)/bfd-in2.h
$(AM_V_at)touch $(srcdir)/bfd-in2.h
touch $@
$(AM_V_at)if test $(srcdir)/bfd-in2.h -ot $@; then \
touch $(srcdir)/bfd-in2.h; \
elif test $@ -ot $(srcdir)/bfd-in2.h; then \
touch $@; \
fi

$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h
@echo "this target, '$@', just makes its dependency, '$<', when in maintainer mode"
Expand All @@ -1556,8 +1597,11 @@ stmp-lbfd-h: $(LIBBFD_H_FILES) @MAINT@ $(PATH_TO_MOVEIFCHANGE)
fi
cp $(AM_V_v) $(sdocdir)/libbfd.h libbfd.h-new
$(RUN_MOVEIFCHANGE) libbfd.h-new $(srcdir)/libbfd.h
$(AM_V_at)touch $(srcdir)/libbfd.h
touch $@
$(AM_V_at)if test $(srcdir)/libbfd.h -ot $@; then \
touch $(srcdir)/libbfd.h; \
elif test $@ -ot $(srcdir)/libbfd.h; then \
touch $@; \
fi

$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h
@echo "this target, '$@', just makes its dependency, '$<', when in maintainer mode"
Expand All @@ -1571,8 +1615,11 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) @MAINT@ $(PATH_TO_MOVEIFCHANGE)
fi
cp $(AM_V_v) $(sdocdir)/libcoff.h libcoff.h-new
$(RUN_MOVEIFCHANGE) libcoff.h-new $(srcdir)/libcoff.h
$(AM_V_at)touch $(srcdir)/libcoff.h
touch $@
$(AM_V_at)if test $(srcdir)/libcoff.h -ot $@; then \
touch $(srcdir)/libcoff.h; \
elif test $@ -ot $(srcdir)/libcoff.h; then \
touch $@; \
fi

MOSTLYCLEANFILES = tofiles ofiles stamp-ofiles
MOSTLYCLEANFILES += tlofiles lofiles stamp-lofiles
Expand Down Expand Up @@ -1615,7 +1662,7 @@ bfdver.h: $(srcdir)/version.h @MAINT@ $(srcdir)/development.sh \
echo "$${bfd_soversion}" > libtool-soversion

libtool-soversion: bfdver.h
stat $@ || touch $@
stat $@ || (if test $@ -ot $<; then touch $@; fi)

# Disable -Werror, if it has been enabled, since coffswap.h fails
# to compile with gcc 4.5 and above:
Expand Down
Loading

0 comments on commit 0738e54

Please sign in to comment.