[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with dependencies
From: |
Robert Bannocks |
Subject: |
Problem with dependencies |
Date: |
Mon, 20 Feb 2017 13:57:51 +0000 |
Hi,
I hope the list can assist with a makefile problem.
I have the following makefile:
---------
all: $(MANUALFILES)
.PRECIOUS: %.txt-manual %.txt-override %.txt-auto %.txt-gen-extract
.SUFFIXES: .PRECIOIUS
TARCMD=/usr/bin/tar
BASENAMECMD=/usr/bin/basename
BASEDIR=/home/user/makefile-development
MANUALTARFILE=$(BASEDIR)/manual-tar-file.tar
MANUALFILES=$(BASEDIR)/1.txt-manual $(BASEDIR)/2.txt-manual
$(BASEDIR)/3.txt-manual
manual-tar:
$(TARCMD) -Pcf $(MANUALTARFILE) $(MANUALFILES)
make-manual:
for file in $(MANUALFILES) ; do echo $$file> $$file ; done
SCPCMD=/usr/bin/scp
SERVERHOST=server.domainname
SERVERPATH=/export/file/manual-tar-file.tar
prereq:
$(SCPCMD) -p $(SERVERHOST):$(SERVERPATH) $(BASEDIR)
%.txt-manual: prereq
$(TARCMD) -xf $(MANUALTARFILE) `$(BASENAMECMD) address@hidden
-----
Which seems fine to me but when I run make I get as follows I get:
make: Nothing to be done for `all’.
But in tact none of the files (in the MANUALFILES variable) exist (neither does
the tar file) despite the MANUALFILES being the target of all.
However, when I run make on the individual files I get:
make /home/user/makefile-development/1.txt-manual -n
/usr/bin/scp -p server.domainname:/export/file/manual-tar-file.tar
/home/user/makefile-development
/usr/bin/tar -xf /home/user/makefile-development/manual-tar-file.tar
`/usr/bin/basename /home/user/makefile-development/1.txt-manual`
What am I misunderstanding
This email and any attachments are intended solely for the addressee and may
contain confidential information. If you are not the intended recipient of this
email and/or its attachments you must not take any action based upon them and
you must not copy or show them to anyone. Please send the email back to us and
immediately and permanently delete it and its attachments. Where this email is
unrelated to the business of University of the Arts London or of any of its
group companies the opinions expressed in it are the opinions of the sender and
do not necessarily constitute those of University of the Arts London (or the
relevant group company). Where the sender's signature indicates that the email
is sent on behalf of UAL Short Courses Limited the following also applies: UAL
Short Courses Limited is a company registered in England and Wales under
company number 02361261. Registered Office: University of the Arts London, 272
High Holborn, London WC1V 7EY
- Problem with dependencies,
Robert Bannocks <=