[Omake] vmount bug?
Aleksey Nogin
nogin at metaprl.org
Thu Nov 6 17:29:23 PST 2008
Dmitry,
Sorry for taking sooo long to response - it took me a while to figure it
out. The problem has nothing to do with vmount - it's just that both
"debug/OMakefile" and "release/OMakefile" would *each* add a separate
rule for building $(TEMP_DIR)\testfile. It's the release directory that
adds this target as an "install" dependency, but somehow it's the debug
rule that gets executed.
Basically, you need to place the "$(TEMP_DIR)\testfile: testfile" rule
under the if.
P.S. Also, it's better to have a common ".PHONY: clean" outside of
"version".
Aleksey
On 20.10.2008 07:32, Dmitry Bely wrote:
> Consider the following test project:
>
> [OMakeroot]
> .SUBDIRS: .
>
> [OMakefile]
> version(name) =
> if $(not $(file-exists $(name)))
> mkdir $(name)
> vmount(-l, src, $(name))
> .SUBDIRS: $(name)
> .PHONY: clean
> clean:
> rm -rf $(name)
>
> section
> DEBUG_VERSION = true
> version(debug)
> section
> DEBUG_VERSION = false
> version(release)
>
> [src\OMakefile]
> TEMP_DIR = e:\
>
> testfile:
> echo $(if $(DEBUG_VERSION),debug,release) > $@
>
> $(TEMP_DIR)\testfile: testfile
> cp -v $< $@
>
> .PHONY: install
> if $(not $(DEBUG_VERSION))
> install: $(TEMP_DIR)\testfile
>
> .DEFAULT: install
>
> I would expect this to create e:\testfile containing "release". But
> this is not the case:
>
> C:\Work\omake-test>omake
> *** omake: reading OMakefiles
> *** omake: finished reading OMakefiles (0.02 sec)
> Copying debug\testfile to e:\testfile
> *** omake: done (0.03 sec, 0/0 scans, 2/3 rules, 4/29 digests)
>
> C:\Work\omake-test>type testfile
> debug
>
> Any comments?
>
> - Dmitry Bely
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake
>
More information about the Omake
mailing list