I cannot build a simple helloworld.cpp file using one of the make rules. Taken from '$ make -p': %.cpp: %: %.cpp # commands to execute (built-in): $(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ =============================================== $ make make: Nothing to be done for `all'. $ touch helloworld.cpp $ make make: Nothing to be done for `all'. $ echo "changes" >> helloworld.cpp $ make make: Nothing to be done for `all'. =============================================== And helloworld doesn't even exist (has never been built). sys-devel/make-3.81 Portage 2.1.2.2 (default-linux/amd64/2006.1, gcc-4.1.2, glibc-2.4-r4, 2.6.20-gentoo x86_64) ================================================================= System uname: 2.6.20-gentoo x86_64 AMD Turion(tm) 64 Mobile Technology MT-32 Gentoo Base System release 1.12.9 Timestamp of tree: Fri, 09 Mar 2007 09:00:02 +0000 dev-java/java-config: 1.3.7, 2.0.31-r4 dev-lang/python: 2.4.3-r4, 2.4.4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.17, 1.2.18.1 sys-devel/autoconf: 2.13, 2.60, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3, 2.17 sys-devel/gcc-config: 1.3.13-r4, 1.3.14 sys-devel/libtool: 1.5.22, 1.5.23b virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=athlon64 -msse3 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=athlon64 -msse3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acpi alsa amd64 apache2 audiofile bitmap-fonts blender-game bluetooth bzip2 cairo cdr cli contentcache cracklib crypt dbus disassembler djvu dvb dvd dvdr dvdread dvi encode examples fat ffmpeg firefox flac fuse gd gdbm gif glibc-omitfp glitz gnome gpm gstreamer gtk hal howl iconv imagemagick immqt isdnlog java java5 javascript jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility libg++ libnotify mad midi mikmod mjpeg mng mp3 mpeg mplayer music musicbrainz mysql nautilus ncurses nforce2 nls nptl nptlonly nsplugin ntfs nvidia ogg opengl pam pcre pdf pdo php plotutils pmu png postgres ppds pppd python qt3 quicktime readline reflection reiserfs ruby samba sdl session sharedmem sndfile socks5 spell spl sqlite ssl subtitles svg tagwriting tcpd theora tidy truetype truetype-fonts type1-fonts unicode urandom usb vcd vorbis xforms xfs xine xml xorg xv xvid zip zlib" ALSA_CARDS="snd-intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa vmware" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 112913 [details] Makefile
Created attachment 112914 [details] helloworld.cpp
The object file is built though editing the Makefile a bit: $(OUTPUTFILE): helloworld.o
(In reply to comment #3) > The object file is built though editing the Makefile a bit: > $(OUTPUTFILE): helloworld.o Yeah; also note that this is not a support forum for writing your code.
What can I do to find the root of the problem? WORKSFORME shouldn't mean that the bug is resolved. Shoot me but it doesn't work on my other two PCs, too. Please try again to reproduce my problem. I will attach a tar.bz2 archive.
Created attachment 112921 [details] A tar.bz2 archive with all the files
(In reply to comment #5) > What can I do to find the root of the problem? WORKSFORME shouldn't mean that > the bug is resolved. Maybe re-read what you've yourself written in Comment #3? Plus stop using bugzilla as 'hello-world-writing-support'.
$(OUTPUTFILE): helloworld.cpp should work (build an ELF binary file helloworld) but it doesn't work - that's the problem... I am confused.
Sigh... --- Makefile.orig 2007-03-11 12:59:33.000000000 +0100 +++ Makefile 2007-03-11 13:45:34.000000000 +0100 @@ -1,9 +1,10 @@ OUTPUTFILE=helloworld INSTALLDIR=bin +$(OUTPUTFILE): helloworld.cpp + all: $(OUTPUTFILE) -$(OUTPUTFILE): helloworld.cpp .PHONY: install install:
Thanks, Jakub! It worked. I still don't understand why all target should be below.
The problem was with the two spurious \t <arbscht> remove the spurious \t's beneath $(OUTPUTFILE): helloworld.cpp and cp -p hello bin/ Close the bug if it is an intended behavior.
Please, last time - this is NOT a support forum for fixing your broken Makefiles... CLOSED.